Dear gmx users, I am using template.c of gromacs 4.0.7 for writing my own analysis tool. When I am using the fr.x[i][XX], it writes the coordinates of the particles (i crosschecked it with the coordinates written by the trjconv command). But the problem arises when I use fr.v[i][XX] for writing the velocities of the particles or fr.f[i][XX] for writing the force. The program compiles fine by using make command. But finally the template stops showing segmentation fault. The main loop is as follows -
do { fprintf(fp,"BOX %f %f %f %f \n",fr.time,fr.box[XX][XX],fr.box[YY][YY],fr.box[ZZ][ZZ]); for (i=0; i<top.atoms.nr; i++) { fprintf(fp,"Velocity at t=%8.3f : %f %f %f\n",fr.time,fr.v[i][XX],fr.v[i][YY],fr.v[i][ZZ]); } } while(read_next_frame(status,&fr)); Am I using the variable used for writing velocity/force wrongly? -- Prithvi Raj Pandey National Chemical Laboratory, Pune 411008 India. -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users * Only plain text messages are allowed! * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! * Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists