[gmx-developers] correct usage of do_fit

Martin Höfling martin.hoefling at gmx.de
Sat Mar 3 15:58:03 CET 2007


Hi there,

i am getting a Fatal error:
Error: Too many iterations in routine JACOBI

I am trying to output the rotation matrices when rotating a part of the 
trajectory using gmx_trjconv as a template for my program.

First step was rewriting do_fitWO(natoms,masses,xorig,x,out_file); as a copy 
of do_fit with additional output.

After the usual stuff like setting up and reading first frame, i do the 
following:

/*Storing masses*/
fprintf(stderr,"\nStoring masses of %d atoms\n",isize[0]);
real *masses;
snew(masses,isize[0]);
for (i=0; i<isize[0];i++) {
        	j=index[0][i];
        	masses[i]=top.atoms.atom[j].m;
}

/*prepare and center copy of first frame*/
snew(xorig,natoms);
memcpy(xorig,x,sizeof(rvec)*natoms);
reset_x(isize[0],index[0],natoms,NULL,xorig,masses);	

/*Main loop over frames*/
while(1) {
		/*remove com position*/
		reset_x(isize[0],index[0],natoms,NULL,x,masses);

		/*do fit with writeout*/	
		do_fitWO(natoms,masses,xorig,x,out_file);

		/*try to read next frame*/	
                if ( read_next_x ( status,&t,natoms,x,box ) ==FALSE )
	            break;
}

What could I have done wrong?

Cheers
	Martin



More information about the gromacs.org_gmx-developers mailing list