Converting 1D matrix to square hessian matrix


Clicked A Few Times
Hi everyone,

The format that NWChem uses for the Hessian is that of a flat 1D matrix which is represented as

x1
x2
x3
x4
x5
x6
etc.

in the output.hess

Does anyone know a quick way to convert this into a square Hessian matrix as follows?

x1 x2 x4
x2 x3 x5
x4 x5 x6

Thanks!


Forum >> NWChem's corner >> General Topics