RDF Calculation

GROMACS version: 2021.3
GROMACS modification: No

I have a small system with 100 identical UA molecules, and I’m trying to get the RDFs, with the groups made up of selections of atoms from these molecules. So, for example, if one molecule consists of 20 atoms, I’d like to get the RDF between atoms 1-4 and 8-10.

I’m using this gmx command

gmx rdf -f traj.xtc -s min.gro -rmax 3 -bin 0.02 -o rdf.xvg -b 0 -e 50000 -ref A -sel B -selrpos dyn_res_cog -seltype dyn_res_cog -n index.ndx

The index.ndx file (which I wrote) reads something like this:

[ A ]
1 2 3 4
21 22 23 24
41 42 43 44
and so on

[ B ]
8 9 10
28 29 30
48 49 50

Given the above, I’m getting really odd and unexpected results, such as high RDFs at 0 nm (which is obviously incorrect).

My questions are thus:

  1. am I using the correct gmx syntax?
  2. is the index.ndx file written correctly? does one line correspond to one atom grouping? or does it read the grouping as being 1 2 3 4 21 22 23 24… i.e. as one big group?
  3. What if I have multiple atom groupings on the same molecule which I want to classify as being the same type of group e.g. atoms 11-13 and 18-20 are both of type [ C ]?

Thanks,

Robert

Hi,
As far as I understood, you want to calculate the rdf between part A and part B of a group of molecules, where A and B belong to the same molecule.
How large is the distance between cog of part A and part B.
Do you think that it could be that pick at zero is the due to the part A and part B of the same molecule or of two molecules (e.i if they are very flexible) ?
Did you try to use tpr as input in place of gro file? Atom names and residue information is read from the structure/topology file.

It looks correct to me, but it depends of course from system and the question. Here you find more on syntax
https://manual.gromacs.org/current/onlinehelp/selections.html?highlight=selection

is the index.ndx file written correctly? does one line correspond to one atom grouping? or does it read the grouping as being 1 2 3 4 21 22 23 24… i.e. as one big group?

The group is read as a whole, but the option -selrpos -selttype will inform gmx rdf to account for molecule or residue definition .

Sorry I do not fully understand the third question.
I hope it helps
\Alessandra