[gmx-users] Reordering of water molecules with Na+ ions coordinates in xtc file
leila karami
karami.leila1 at gmail.com
Mon Jan 3 15:04:02 CET 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20110103/b965fcb6/attachment.html>
More information about the gromacs.org_gmx-users
mailing list