Closed arm61 closed 2 months ago
How does it know which O–C–O are bonded and which are in separate molecules?
If they are in a single tuple that is a molecule (in the structure I am suggesting). So if there were two molecules and you wanted the combined MSD of them it would be:
specie = [('C', 'O1', 'O2'), ('C', 'H1', 'H2', 'H3', 'H4')]
Say I have two CO2 molecules in my simulation cell. Do I then set
species = [('C1', 'O1', 'O2'), ('C2', 'O3', O4')]
?
It depends what the atom names in the simulation output are.
I think that having the index identifier stuff helps with this as indices are more unique.
I still don’t understand the proposal. Atoms in separate molecules should only contribute to the displacements of those molecules.
Yeah so in:
species = [('C1', 'O1', 'O2'), ('C2', 'O3', O4')]
You would calculate 2 diffusions, one for the centre of geometry for molecule O1=C1=O2
and one for molecule O3=C2=O4
(I acknowledge that symmetrical CO2 molecules are not the most exciting to get the centre of geometry for).
But why would you ever want individual diffusion for just two molecules, and not run e.g. a simulation with 1000s of CO2 molecules to get D*(CO2)? In which case, the specification syntax above becomes cumbersome.
Just spoken to @jd15489, and we agree that having the specie working for both element types and atom types doesn't really work, i.e., if you want to look at all the molecule types of CO2 has two possible ways to be defined.
Therefore the proposed solution is that specie
stays as it is to be user-friendly and only work with single elements. But if a users wants to track the centre-of-geometry of a molecule (or some molecules) then they would need to pass a indices
keyword argument (and set specie
to None
), and this argument would be a list of list (or list of tuple) where each sub-list is the specific atom indices to be used to find the centre-of-geometry.
Closing with @jd15489's PR #38. Thanks for the contribution @jd15489! 🚀 🎉
Oops, closed the wrong issue
@jd15489 can this be closed now?
Yes, this can be closed.
Currently, if you want to calculate the MSD for a molecule, there is a lot of gymnastics involving
MDAnalysis
to get here. This could be greatly simplified for the user by allowing a centre of geometry/mass calculation withinkinisi
(before the displacements are determined.I think this would look best as something like
For a CO2 molecule, i.e., the tuple defines the molecule that the centre of geometry/mass should be found over.
This should probably wait for the conclusion of #30 as it should also work for indices.