Skip to content

How can I calculated centre of mass rdf of aromatic ring from any peptide which containing aromatic ring using code and selecting atom of that ring? #4701

Answered by orbeckst
AzizSimX asked this question in Q&A
Discussion options

You must be logged in to vote

First you need to learn how to select the atoms that you're interested in — see Selections in the User Guide. This selection will give you an AtomGroup.

Then you can compute the center of mass of your AtomGroup with the AtomGroup.center_of_mass() method for each frame of the trajectory.

Once you have the coordinates of all centers that you want to calculate a RDF for, you need to write your own code because I am not aware of code in MDA that does it for you. You can look at the RDF code for atoms. In particular you need to first calculate all distances with code similar to

pairs, dist = distances.capped_…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AzizSimX
Comment options

Answer selected by AzizSimX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants