GROMACS version:2023
GROMACS modification: No
In the simulation, if the MSD of the water molecules surrounding the S atom is required, how should I write the command? The command I used is gmx -f md.xtc -s md.tpr -o msd.xvg, but I can only find the msd of the overall water molecules in the system.
for this you first make an index file to include all the indexes of that ‘S’ atom using make_ndx command (let’s say s_atom.ndx)
then use command for msd:
gmx msd -f md.xtc -s md.tpr -n s_atom.ndx -o msd.xvg
You can generate the index file of the molecules surrounding the S atom with gmx select tool and specifying the -on flag. However, if you reference a frame, then you will have the molecules surrounding atoms S at the time of the frame, then they may (or may not) diffuse around, depending on the nature of what you are looking at.