I am using Gromacs.2021 compiled on my own pc with Intel MKL and MSVC++/Intel C++ compilers. I performed an MD simulation on a spherical cluster of ~200 H2O molecules kept at the centre of a 6 nm cubic box. The simulation ran fine.
Then I calculated the radial distribution function with gmx rdf -f md.xtc -s md.tpr -n index.ndx -ref 2 -sel 2
In the index file, 2 represents SOL (i.e. all the solvent molecules). I thought this would use the centres of masses of all the H2O molecules and then create a distribution from that. The graph I got was this: image.png - Google Drive . It does not look like what I would expect at all. There are two peaks for some reason. Is it taking the O and H atoms separately for each molecule? How can I direct it to use the centre of mass?
However, now I want to run an rdf of all O atoms from the centre of mass of the whole unit cell. I cannot figure out how to do this with -selrpos. I have read the manual for the rdf page and selection options page.
Hi,
The reason is that whole_ calculates the centers for the whole residue/molecule, even if only part of it is selected, and not of the whole system (many waters molecules).
What about to calculate the rdf between one O and all the other options?
So how do I get gmx rdf to calculate the centre of mass of the whole system. Would dyn_mol_com do the job? (I have tried looking through the gromacs manual but the documentation is minimal and difficult to understand for me)
I can’t choose one O and calculate rdf from that because I am calculating rdf over a trajectory, so I can’t choose one O because it won’t stay at the centre after a few frames.
Also do I need the -seltype option? I don’t understand what it does.
In the end I decided not to use gmx rdf, and instead used MDAnalysis python library to read the trajectory and manually calculate the RDF (i.e. using the formula for rdf).