Skip to content

RDF of NaCl in water #4437

Answered by rodpollet
horlust asked this question in Q&A
Jan 23, 2024 · 3 comments · 11 replies
Discussion options

You must be logged in to vote

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

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
11 replies
@horlust
Comment options

@rodpollet
Comment options

Answer selected by horlust
@horlust
Comment options

@hmacdope
Comment options

@orbeckst
Comment options

@horlust
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants