# include "util.h" # include "pdb.h" # include "fit.h" /* Fortran convention for array indicies. WRITE(6,'(/A,3(/3F12.6))') & ' Rotation matrix =',((ROT(I,J),J=1,3),I=1,3) ROT(row,col) so for all nr routines I will use ROT[row][col] */ /* In fortran matrices are stored so that the first index is fast moving: A(1,1) A(2,1) A(3,1) A(1,2) A(2,2) A(3,2) A(1,3) A(2,3) A(3,3) This is opposite the order in C: A[1][1] A[1][2] A[1][3] A[2][1] A[2][2] A[2][3] A[3][1] A[3][2] A[3][3] */ /* ========== */ double * nr33tofort(double ** nr) /* ========== */ { int s,f ; double * fort = dvector(0,8) ; for (s=1;s<=3;s++) for (f=1;f<=3;f++) { fort[s+3*(f-1)-1] = nr[s][f]; /* FTOD(fort[s+3*(f-1)-1]); */ } return fort ; }