msd calculation from nve+langevin or nvt

Hello everyone,

I have been trying to calculate the msd of small penetrates in polymers.

I have calculated msd using two cases :

  1. case 1 : nve+langevin was used and then msd was calculated

  2. case 2 : nvt was used and then msd was calculated.

I had properly equilibrated my system. Most of the research in this field uses nvt. However, I found that nvt gives about a thousand times more msd than what I must expect. However, in case of nve+langevin the result was quite close to the experimental result. Can anyone tell what was done wrong. I have attached my configuration file for both cases.

in.config (1.69 KB)

in.config (1.67 KB)

Hello everyone,

I have been trying to calculate the msd of small penetrates in polymers.

I have calculated msd using two cases :

1. case 1 : nve+langevin was used and then msd was calculated

2. case 2 : nvt was used and then msd was calculated.

I had properly equilibrated my system. Most of the research in this field
uses nvt. However, I found that nvt gives about a thousand times more msd
than what I must expect. However, in case of nve+langevin the result was
quite close to the experimental result. Can anyone tell what was done wrong.
I have attached my configuration file for both cases.

are you sure, you are not comparing apples to oranges here?
did those publications you compare to really provide MSD values and
not compute self-diffusion from MSD?
for mobile atoms/molecules, the MSD would be proportional to the time
elapsed and thus not a good parameter (but the slope of it is). please
look up Einstein-relation in your MD text book.

there is little that can be said about your input without having the
time and the data to rerun it and check it out in detail.
some choices are strange.
e.g. your force field parameters hint that some of your atoms are
hydrogens, however, your choice of timestep (1fs) is extremely
aggressive for an input with unconstrained hydrogen atoms. at 1fs
people usually constrain all bonds involving hydrogen atoms.
similarly, the choice of neighborlist rebuild settings seems very
aggressive for your choice of timestep and temperature. does your
simulation conserve energy sufficiently well, when run without any
thermostatting? does LAMMPS report dangerous builds?

have you been able to successfully reproduce MSD calculations for
simpler systems, e.g. small hydrocarbon molecules?

your input indicates, that you create 10 methane molecules, which
means, that your statistics are not going to be very good. have you
tried rerunning the input with different decorrelated starting points?
do you get the same result for each of them? have you compared the
displacement of the individual methane molecules (easily doable from
the trajectory)? what is the statistical variation of the results?
what is the behavior of the MSD over time? does it plateau? does it
approach a linear relation? something else?

axel.

I have added fix shake and corrected the neighbor lists.

The papers that I consulted did use msd to calculate diffusion coefficient using the slope of it and I did employ the same methods. In my system, I added 10 molecules of methane (around 2-3% of the total mass). Why will the statistics not be good? Upon plotting individually, they are not forming linear curve. However, they are increasing with time with huge fluctuations or noise over the time giving a diffusion coefficient way different in case of nvt.

in your last response, you have done three things that a personally find extremely irritating, off-putting and counterproductive.

  1. rather than rationalizing your choices, you announce that you made some changes to the input, which are not rationalized either. this is not the scientific way.

  2. you have not answered any of my questions, instead you are asking more questions yourself. my questions were designed to make you rethink and understand the underlying physics better.

  3. you don’t seem to be interested in actually understanding the problem that you are simulating and then making educated choices, but rather in getting something that pleases you (and me). that is not something i care about. your continued questions indicate that your understanding of basic simulation methods is insufficient (which probably also explains, why you avoid answering most of my questions for fear of exposing this condition).

well, considering we are no longer in the domain of “how to make LAMMPS do this?”, but have moved on to “how do i do my science?”, we have also reached the point, where you need to consult with your adviser or people designated by your adviser to train you and oversee your work and its correctness. i don’t have the time and am not interested in doing this. i’d rather spend my time to make LAMMPS a better software.

so have a nice day and good luck (you’ll need a lot),
axel.

1 Like