I am running a simple benzene simulation in GROMOS54a7. I want to calculate the RDF of the center of masses of each benzene molecule, using MDAnalysis 1.0.0.
Is this possible? I have create the rdf for the C molecules g_cc(r) using the following code in a Jupyter Notebook:
import MDAnalysis
import numpy as np
%matplotlib inline
import MDAnalysis.analysis.rdf as mda
import matplotlib.pyplot as plt
u = MDAnalysis.Universe("739-c6h6-MolDynamics.tpr","739-c6h6-MolDynamics_good-pbc.xtc")
s1 = u.select_atoms("resid 0 and type CAro")
s2 = u.select_atoms("not (resid 0) and type CAro")
rdf = mda.InterRDF(s1, s2)
rdf.run()
I want to take each benzene molecule (each benzene molecule is a residue in my simulation), calculate its COM and run a script like the one above on it. Is it possible to do something like that?
A general question about RDFs: does the method I have used above construct an RDF using every frame of my trajectory? I don't know if this was made clear in the documentation, so I apologize if this is an obvious question.
Thank you for any advice you have!