-
Notifications
You must be signed in to change notification settings - Fork 4
Calculating radial distribution functions
Use rdf.py
to calculate the radial distribution function of components in an HII system with respect to the pore centers.
In its simplest usage, run:
rdf.py -g system.gro -t system.trr -r residue
.
This will tell the script to calculate the average distance of the center of mass of residue from each average pore center.
Calculating the distance from the average pore center is a big assumption. The pores are actually a lot more wiggly and the pore center therefore changes as a function of the z coordinate. Therefore, a "pore spline" is implemented which traces the center of the pore along the z-axis. The radial distribution then becomes a function of z. That is, the radial distance is measured from the solute center of mass to the point on the pore spline at the same z coordinate as the solute. Make rdf.py
use pore splines with the flag '-spline'. Control the number of points in the spline the -spts
(or --spline_pts
) flag.
Finally, you can make rdf.py
calculate and plot the RDFs of multiple residues or sections of monomer. For each residue, pass the -r
flag. If you want to restrict the calculation to the center of mass of a certain group of atoms within the chosen residue, also pass the -a
(or -atoms
) flag, followed by the names of each atom in the group of interest. For example, the following code will plot the radial distribution of the center of mass of atoms C6 O3 and O4 of residue HII, the center of mass of atoms C C1 C2 C3 C4 C5 of residue HII and the center of mass of the ETH residue. (Note that -a all
is only necessary in this case since multiple groups are specified).
rdf.py -t PR_whole.xtc -g PR.gro -spline -spts 20 -r HII -atoms O3 O4 C6 -r HII -atoms C C1 C2 C3 C4 C5 -r ATO -atoms all -normalize
The -normalize
flag makes visual comparison easier by normalizing the data so that the maximum peak height is equal to 1.