LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Issue with pressure control not giving the correct fluctuation properties with Lennard-Jones solids
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Issue with pressure control not giving the correct fluctuation properties with Lennard-Jones solids

From: Steve Plimpton <sjplimp@...24...>
Date: Thu, 20 Jul 2017 08:05:17 -0600

Aidan (CCd) can likely give some insight on this.

One note: in your scripts, you are using a time constant
of 5.0 with real units on both the thermo and barostats.
That's 5 fs in real units, which is quite short and could
affect the fluctuations.  More typical would be 100 fs
for the thermostat and 1000 fs for the barostat.

5.0 in LJ units would be fine, since it is ~1000 timesteps.


On Wed, Jul 19, 2017 at 1:17 PM, Michael R Shirts <Michael.Shirts@...780...> wrote:
Hi, all-

I’m using MD to simulate FCC Lennard-Jones.  I am not getting consistent values between compressibility determined by finite difference and by fluctuation formulas. I tried it in reduced units, was getting inconsistent results, and switched to real units to make it easier to compare numbers. I’ve also compared to GROMACS, where I get much better consistency.  This appears to be an underlying issue with LAMMPS not getting the proper Boltzmann distribution for the NPT ensemble.  I wonder if there is some subtle setting I’m getting wrong?

Some info:

Formula for finite difference used = - <Vhigh>-<Vhlow>/(((Phigh-Plow) (0.5(<Vhigh> + vlow>)))
Formula for finite difference by fluctuation: std(V)^2/kBT*<V>, kB = 0.1380 bar/nm^3 / K.

T     P        <V (A^3)>       dV/<V>
44 797 36833.043     0.002410
44 897 36751.109     0.002408
compressibility from finite difference = 2.2565e-05 atm^-1
compressibility from fluctuation (at 797 atm) = 3.5237e-05 atm^-1
compressibility from fluctuation (at 897 atm) = 3.5108e-05 atm^-1
compressibility from fluctuation (average) = 3.5173e-05 atm^-1

T     P        <V (nm^3)>      dV/<V>
44 797     37.33091       0.002465
44 897     37.19381       0.002427
compressibility from finite difference = 3.6792e-05 bar^-1
compressibility from fluctuation (at 797 bar) = 3.7367e-05 bar^-1
compressibility from fluctuation (at 897 bar) = 3.6073e-05 bar^-1
compressibility from fluctuation (average) = 3.6720e-05 bar^-1

I expect the fantastic agreement of GROMACS to be somewhat a statistical fluke, but it is consistent.

I’ve also run ‘checkensemble’ ( on the volume fluctuations.  In this case, I got for the maximum likelihood analysis of the slope of log P_1(V)/P_2(V):

     Estimated slope       vs.   True slope
 -15.963630 +/-    0.345655  |   -17.006006
(That's 3.02 quantiles from true slope=-17.006006)
 True dP = 100.000, Eff. dP =  93.871+/-2.033

And for LAMMPS:
     Estimated slope       vs.   True slope
  -9.768420 +/-    0.462170  |   -17.006006
(That's 15.66 quantiles from true slope=-17.006006)
 True dP = 100.000, Eff. dP =  57.441+/-2.718

Which seems problematic (GROMACS is a bit off, but much less so).

I’ve attached the lammps input files.  To analyze them, I threw out the first 50000 steps for equilibration.  I’ve attached the GROMACS mdp files (though not the coordinates and topologies because of size.

There are a few differences between the inputs, though they shouldn't affect the comparison I’m doing.  I accidentally didn’t convert from bar to atm when going between GROMACS and LAMMPS runs, but did in the analysis.  I don’t expect the average volumes to be exactly the same between GROMACS and LAMMPS because of the way the cutoffs are handled, but they should be internally consistent within the program.  The dimensions of the box are not quite the same between the two programs for various reasons, but they are both roughly square, with 768 atoms.  There are some difference in tau_t and tau_p, though they are all differences that shouldn’t really matter.   Parameters should be the same – though again, it shouldn’t matter since we’re looking at internal consistency.  Here, GROMACS uses  Martyna-Tuckerman-Tobias-Klein equations, and did not use mtk yes with lammps, though I would think the 1/V term should be negligible here (though I will test it).

Any insight would be useful!

Michael Shirts
Associate Professor
Phone: (303) 735-7860
Office: JSCBB C123
Department of Chemical and Biological Engineering
University of Colorado Boulder

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list