-
Hi everyone, I have a simulation containing 884 water molecules, 1 Na+ atom and 1 Cl- atom. I am trying to compute the RDF of Na+ and Cl- in water and also the coordination number. At first I did:
And using a function I calculated the coordination number of Na+ in this case, which was close to 6. However, if you look at my code you will see that I've calculated RDF with respect to the water molecules (water_selection is "resname SOL"). Is the RDF function on MDAnalysis capable of performing this calculation for a whole molecule, instead of just for atoms? I am asking because pretty much all RDF calculations that I've seen consider the oxygen atoms of the water molecule instead of the whole water molecule. So I also did this:
In this case, I consider only the oxygen atoms of the water molecules around Na+. As I'm having two very different results (images attached), I'd like to understand the handling of the RDF function. Which way of calculating the RDF and the coordination number makes more sense in the context of MDAnalysis? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Hi! Could you clarify which graph is which experiment? I am assuming that the 5.2 coordination number is the one using water oxygens. From my knowledge use of the oxygens as the reference is standard and gives a number that makes a lot of sense, octahedral with ~ 6 * 1 coordinating atoms (likely has 0.8 fractional Cl- coordination). Using all the solvent molecule as a whole gives a number that also makes sense (~6 * 3 atoms per molecule), but is not the standard way to talk about water coordination, as the oxygen is normally the coordinating atom. You can see from the data tables in a paper parametrising ions such as this one: https://pubs.acs.org/doi/10.1021/jp505875v that coordination numbers are normally reported as directly chelating atoms only. If you are looking at data of this kind, I would reccomend our solvation subpackage Hope this helps. Hugo |
Beta Was this translation helpful? Give feedback.
-
For RDF calculations if ions in water I would choose ion-oxygen. The MDA |
Beta Was this translation helpful? Give feedback.
-
@horlust is your question answered? If so can you mark one of the answers as such. |
Beta Was this translation helpful? Give feedback.
Hi Maria,
I checked your code and found two mistakes.
First, I think you should not use bbox but u.trajectory.ts.dimensions, namely:
x_l = u.trajectory.ts.dimensions[0]
y_l = u.trajectory.ts.dimensions[1]
z_l = u.trajectory.ts.dimensions[2]
This should give a better estimate of the volume.
Second, I think you should not set n_part to the total number of atoms in your universe but only the number of atoms in the second species, namey water oxygen atoms only. Again, this will correct the density.
With these corrections, I think you should obtain the correct result. Do you confirm?
Hope this helps,
Rodolphe