Dear Justin and Chris very thanks for your reply and guidance.
I did all the steps successfully. then I used (./my_tool -f final.xtc -o final.pdb -b 300 -e 350), the final.pdb file was created without problem. when I opened final.pdb file by text editor, order of waters and ions in final.pdb was like final.xtc (waters are before ions). my purpose was to reorder water molecules with Na+ ions in final.xtc file as at first 1-1867 complex (protein and dna) 1868 - 24085 SOL (water molecules) 24086 - 24099 Na+ (ions) after reordering 1-1867 complex (protein and dna) 1868 -1881 Na+ (ions) 1882 - 24099 SOL (water molecules) but this wasn't done. Is there problem in modification made in gmx_trjconv.c or same my_tool.c file: ####### Now go to line 1264 of the file and replace this: for(i=0; i<nout; i++) { copy_rvec(fr.x[index[i]],frout.x[i]); if (bVels && fr.bV) { copy_rvec(fr.v[index[i]],frout.v[i]); } if (bForce && fr.bF) { copy_rvec(fr.f[index[i]],frout.f[i]); } } ####### with this: for(i=0; i<=1866; i++) { copy_rvec(fr.x[index[i]],frout.x[i]); } for(i=24085; i<=24098; i++) { copy_rvec(fr.x[index[i]],frout.x[i-22218]); } for(i=1867; i<=24084; i++) { copy_rvec(fr.x[index[i]],frout.x[i+14]); } for(i=0; i<nout; i++) { if (bVels && fr.bV) { copy_rvec(fr.v[index[i]],frout.v[i]); } if (bForce && fr.bF) { copy_rvec(fr.f[index[i]],frout.f[i]); } } } -- Leila Karami Ph.D. student of Physical Chemistry K.N. Toosi University of Technology Theoretical Physical Chemistry Group
-- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users 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