# [gmx-users] (no subject)

Nguyen Hoang Phuong phuong at theochem.uni-frankfurt.de
Thu Jul 18 13:22:33 CEST 2002

```Dear All,

I use the nmrun program to obtain the Hessian (stored in the file
hessian.mtx). I use my program to diagonalize this matrix and I got the
negative value of the eigenvalues (the program g_nmeig does the
diagonalization and gives the positive value of the eigenvalues, the
absolute values are the same in both cases). I look at the source of the
program  g_nmeig (in g_nmeig.c) and I saw the lines:

/*open Hessian matrix and read first 'line' */

ndim=natoms*DIM;

fprintf(stderr,"Dimensionality of matrix: %d\n",ndim);

/* store two dimensional Hessian matrix in one dimensional array
* to facilitate communication with fortran */

snew(hess,ndim*ndim);

snew(eigv,ndim);

for (i=0; (i<natoms); i++) {
for (j=0; (j<DIM); j++) {
hess[i*DIM+j]=0.0-x[i][j];    /
}
}

/* read in rest of Hessian */

for (i=1; (i<ndim); i++) {
for (j=0; (j<natoms); j++) {
for (k=0; (k<DIM); k++) {
hess[i*ndim+j*DIM+k]=0.0-x[j][k];
}
}
}

As I understood, the array elements x[i][j] computed by the nmrun and
stored in the hessian.mtx are not really the matrix element of the
Hessian, but they should be -x[i][j]. If this is the case, then my results
can anyone correct me? Thanks in advance.

Regards,

Phuong

```