I’m running a very simple system of 4000 spheres with embedded dipoles, intended to be a coarse grained water simulation. The log file is attached. In order to thermostat the rotational degrees of freedom, I thermostat the system using “fix langevin omega yes” for 20000 timesteps (10fs per timestep) and then run an NVE simulation for 100000 timesteps by simply unfix-ing the thermostat. During the thermostatted portion of the simulation, the temperature appears well thermostatted and the total energy seems to be sensible. However, over the first 100-200 timesteps of the NVE potion of the simulation, ie without any thermostatting applied, the total energy of the system increases and the system temperature falls to new stable values where they remain for the rest of the NVE portion.
I have defined a compute (compute all temp/sphere dof all) which includes the spheres’ 6 degrees of freedom for the temperature calculation and used that compute for the temperature in both thermo_modify and fix_modify. This has reduced the increase in total energy at the beginning of the NVE run that I was previously seeing but there still is an increase. If I run the system without dipoles (ie I don’t include the set all dipole/random line and just leave the default 0 implied by create_atoms) I don’t get the increase in total energy at the beginning of the NVE portion.
I’ve tried various different timesteps (1.5fs - 15fs) and I see the same energy increase over a similar time for each. Can anybody shed any light on what I’m getting wrong - I suspect there’s a default I need to change but I’ve checked the manual thoroughly for all the commands I’m using and I can’t find it.
Very many thanks
log.lammps (59.8 KB)
I don't know. I assume you mean that you are monitoring
the temperature in both the NVT and NVE portions with
the same compute temp/sphere.
Yes (at least, I hope so!)
I define a compute, all_temp which is temp/sphere dof all. I then use thermo_modify (after the thermo_style line!) to make sure that the temp returned by thermo_style is calculated using that compute. I then use thermo 100 to return temp and etotal every 100 steps throughout the thermostatted and non-thermostatted portions.
The input script is attached in case I’m not being clear…
in.water (774 Bytes)
Maybe Mario (author of the dipole/sf potential
you are using)
has an idea about this. I've CCd him.
Hi, thanks, I’ve spoken to Mario.
I’m sorry, I should have said in my initial email, I get a similar energy jump using dipole/cut. Its slightly harder to see because using the cut potential does not conserve the energy so well in the NVE portion of the simulation. I have run a short simulation (1000 steps NVT, followed by 1000 steps NVE) using dipole/cut. Hopefully you can see from the attached jpeg that the total energy increases very fast at the beginning of the NVE portion, much faster than the energy drift later in the NVE portion. I have also attached the input script for this dipole/cut simulation.
Thanks for your help
in.water (711 Bytes)
I didn't mean there was a problem with
Mario's potential, just that he might have
an idea about energy conservation.
I don't think in general that you can
run a dipole potential with a cutoff and
get good energy conservation - you
need a thermostat.
the issue here is not about the energy conservation generally - I agree that using a straight cutoff the total energy in an NVE run should steadily increase (as it does in this case).
The problem is that the energy shows an unexpected jump at the very beginning of the NVE run (step 1000 in the diagram attached by Sophia in her previous message), before settling on a steady increase.
Using the shifted-force version (where a better energy conservation is expected), the same issue shows up as an anomalous jump at the very beginning of the NVE run, which you can see in the first three lines of this portion of the log file that Sophia attached to her first message:
step temp total energy
20000 305.08978 -7.3865959
20100 294.05146 -7.2999789
20200 288.63684 -7.2808333
20300 289.29937 -7.2749058
20400 290.26777 -7.2736988
20500 288.93675 -7.273748
20600 287.01137 -7.2732754
20700 287.14707 -7.2736927
20800 289.3932 -7.2732614
20900 292.28469 -7.274424
21000 290.48953 -7.2737598
21100 293.49788 -7.2734407
21200 290.54642 -7.2737024
21300 291.32528 -7.2738741
21400 286.51444 -7.2735693
21500 287.39865 -7.2735044
Why does the total energy initially increase before settling on a constant value (-7.27[…])? It should be fluctuating about a constant value from the very beginning.
In fact, if the dipoles are removed, this issue also disappears, i.e., the energy steadily increases using the cut potential (no jump), or immediately settles on a constant value using the sf potential.
I can't think of any reason why the new NVE run
would have a memory of the previous NVT run.