Last active
June 29, 2023 12:05
-
-
Save orbeckst/b611626e7640f399580e233195c6429c to your computer and use it in GitHub Desktop.
Radial distribution function (RDF) calculation of the centers of mass of molecules with MDAnalysis.
Also note that the COM RDF looks a bit funny because it gets very close to r=0 even though self-distances had been excluded.
There's a possibility that this is a problem with unwrap=True
. Please check carefully for your own system and let us know on the mailing list https://groups.google.com/group/mdnalysis-discussion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first version that I posted was incorrect – the way that one replaces coordinates in the transformation is crucial: This is correct
but the following does not work
(The reason is that
.positions
is a managed attribute that handles setting in a special way — you can't assume that you can just manipulatepositions
like a simple numpy array.)