[gmx-developers] possible bug connected to the velocity-Verlet integrator

Ullmann, Thomas thomas.ullmann at mpibpc.mpg.de
Tue Jul 1 16:31:47 CEST 2014


Thank you for your patience. It might well be that I missed something or used problematic settings, but If so I would like to understand where.

Regarding the two-particle system:

>----
That's almost certainly not a good test of anything integrator related.  You can't test ensembles when looking at the approach to equilibrium.  I look at those two graphs and see perfectly valid approaches to equilibrium, especially if vv is using a different random number seed in each. Half step velocities will not be interpreted the same way by both problems, so looking at the first picosecond or so will likely not yield any useful information; it will be entirely equilibration artifacts from the different starting points. There's also a real ergodicity problem, in that if COM motion is being removed, there are only a few degrees of freedom for a symmetric particle system, none of which can exchange kinetic energy with each other, making all thermostats other than langevin suspect.  A nice little box of water or LJ fluid would be much preferable a test, especially since it would allow separate tests of NVT and NPT (in fact, I suspect an issue with non isotropic pressure control and + md-vv)

I'm not sure how being dominated by different initial conditions really helps anything. To me, it looks like several valid approaches to equilibrium, with different velocity verlet seeds.
<----

I fully understand that thermostatting a single moving particle will most likely not result in a thermodynamically correct ensemble or anything physically relevant. I just set the system up in this way to have something simple for for easy numerical comparison of what the two integrators do.
To keep it simple, the small test system does not involve pressure coupling, only the velocity-rescaling thermostat or no thermostat at all. The time step is very small, so that the different conventions of the integrators for the velocity as belonging to the current time or half a time step before should not matter, at least I thought that.  In line with this assumption, I get identical results for both integrators in the absence of the temperature coupling.
The results begin to differ if I add temperature coupling with velocity rescaling (I did not yet test different thermostats).
All the settings except for the integrator are the same, including the random number seed  for the thermostat (ld_seed according to the user manual, the full setup is also available from the link in the first email).
Shouldn't I also get the same results for the thermostatted system with both integrators then?


Regarding the large membrane protein system

>>------
I fully agree that the actual system is not suitable for testing, but it lead me to think that there might be > a bug. Thanks for the paper, I already saw it, but I think that it is obvious that the large systems do not
sample the correct ensemble.
-----<<
>---
Sure, but in what way?  For example, is the right ensemble sampled in NVT?  That would allow one to separate out issues with just NPT.
<---

I also downloaded your scripts for the ensemble verification and will use them for further tests, but that will take some time because I need to run the simulations for a different temperature.

>---
Overall:
My guess is that you are using md-vv with Parinello-Rahnman in semiisotropic mode, which I think is supposed to have a warning, but perhaps it got missed.   Perhaps if we saw the mdp's of the system that was clearly having area problems, it would be possible to tell what what combination of options might be causing problems.  If you think it was md vs md-vv, test a box of water or LJ particles over 50 or so times tau_t, and see if they have the same thermodynamics.
<----

I agree that a simple system would be better for testing, I will also try a water box.

The full .mdp file for the simulations that yielded the data show in the plots is attached below. I just exchanged the integrator accordingly.If there is something problematic in my settings, please let me know.
I used semiisotropic pressure coupling, but not with the Parinello-Rahman, but the Berendsen barostat (it was the only option working with all the other settings).

Please note again that
a) running the simulation from the same starting conditions / input results in seemingly normal behavior with the leap-frog integrator, but repeated, large increases and subsequent decreases with velocity-Verlet.
b) a simulation began with the velocity-Verlet integrator and showing the membrane area expansion quickly recovers and keeps the lower, normal membrane area if the simulation is extended with the leap-frog integrator. This was observed in a total of more than 20 simulations on two different membrane proteins in slightly different charge forms -- so it seems to be more than just a single, random anomaly.


------------------------------------------------------
;
;    equilibration
;

; VARIOUS PREPROCESSING OPTIONS
; Preprocessor information: use cpp syntax.
; e.g.: -I/home/joe/doe -I/home/mary/roe
include                  =
; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive)
define                   =

; RUN CONTROL PARAMETERS
integrator               = md
; Start time and timestep in ps
tinit                    = 0
dt                       = 0.004
nsteps                   = 50000000
; For exact run continuation or redoing part of a run
init-step                = 0
; Part index is updated automatically on checkpointing (keeps files separate)
simulation-part          = 1
; mode for center of mass motion removal
comm_mode                = Linear
; number of steps for center of mass motion removal
nstcomm                  = 50
; group(s) for center of mass motion removal
comm-grps                = System

; LANGEVIN DYNAMICS OPTIONS
; Friction coefficient (amu/ps) and random seed
bd-fric                  = 0
ld-seed                  = 1993

; ENERGY MINIMIZATION OPTIONS
; Force tolerance and initial step-size
emtol                    = 2000
emstep                   = 0.01
; Max number of iterations in relax-shells
niter                    = 20
; Step size (ps^2) for minimization of flexible constraints
fcstep                   = 0
; Frequency of steepest descents steps when doing CG
nstcgsteep               = 1000
nbfgscorr                = 10

; TEST PARTICLE INSERTION OPTIONS
rtpi                     = 0.05

; OUTPUT CONTROL OPTIONS
; Output frequency for coords (x), velocities (v) and forces (f)
nstxout                  = 250000
nstvout                  = 250000
nstfout                  = 0
; Output frequency for energies to log file and energy file
nstlog                   = 5000
nstcalcenergy            = 50
nstenergy                = 5000
; Output frequency and precision for .xtc file
nstxtcout                = 5000
xtc-precision            = 1000
; This selects the subset of atoms for the .xtc file. You can
; select multiple groups. By default all atoms will be written.
xtc-grps                 =
; Selection of energy groups
energygrps               =

; NEIGHBORSEARCHING PARAMETERS
; cut-off scheme (group: using charge groups, Verlet: particle based cut-offs)
cutoff-scheme            = Verlet
; nblist update frequency
nstlist                  = 50
; ns algorithm (simple or grid)
ns_type                  = grid
; Periodic boundary conditions: xyz, no, xy
pbc                      = xyz
periodic-molecules       = no
; Allowed energy drift due to the Verlet buffer in kJ/mol/ps per atom,
; a value of -1 means: use rlist
verlet-buffer-drift      = 0.005
; nblist cut-off
rlist                    = 1.2
; long-range cut-off for switched potentials
rlistlong                = 1.6
nstcalclr                = -1

; OPTIONS FOR ELECTROSTATICS AND VDW
; Method for doing electrostatics
coulombtype              = pme
coulomb-modifier         = Potential-shift-Verlet
rcoulomb-switch          = 0
rcoulomb                 = 1.2
; Relative dielectric constant for the medium and the reaction field
epsilon-r                = 1
epsilon-rf               = 0
; Method for doing Van der Waals
vdwtype                  = Cut-off
vdw-modifier             = Potential-shift-Verlet
; cut-off lengths
rvdw_switch              = 1.0
rvdw                     = 1.2
; Apply long range dispersion corrections for Energy and Pressure
DispCorr                 = No
; Extension of the potential lookup tables beyond the cut-off
table-extension          = 1
; Separate tables between energy group pairs
energygrp-table          =
; Spacing for the PME/PPPM FFT grid
fourierspacing           = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used
fourier-nx               = 0
fourier-ny               = 0
fourier-nz               = 0
; EWALD/PME/PPPM parameters
pme_order                = 6
ewald_rtol               = 1e-6
ewald-geometry           = 3d
epsilon-surface          = 0
optimize_fft             = yes

; IMPLICIT SOLVENT ALGORITHM
implicit-solvent         = No

; GENERALIZED BORN ELECTROSTATICS
; Algorithm for calculating Born radii
gb-algorithm             = Still
; Frequency of calculating the Born radii inside rlist
nstgbradii               = 1
; Cutoff for Born radii calculation; the contribution from atoms
; between rlist and rgbradii is updated every nstlist steps
rgbradii                 = 1
; Dielectric coefficient of the implicit solvent
gb-epsilon-solvent       = 80
; Salt concentration in M for Generalized Born models
gb-saltconc              = 0
; Scaling factors used in the OBC GB model. Default values are OBC(II)
gb-obc-alpha             = 1
gb-obc-beta              = 0.8
gb-obc-gamma             = 4.85
gb-dielectric-offset     = 0.009
sa-algorithm             = Ace-approximation
; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA
; The value -1 will set default value for Still/HCT/OBC GB-models.
sa-surface-tension       = -1

; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
tcoupl                   = V-rescale
nsttcouple               = 1
nhchainlength            = 1
print-nose-hoover-chain-variables = no
; Groups to couple separately
tc-grps                  = Protein POPE    Water_and_ions
; Time constant (ps) and reference temperature (K)
tau_t                    = 0.1     0.1     0.1
ref_t                    = 310.15  310.15  310.15
; pressure coupling
Pcoupl                   = berendsen ; parrinello-rahman
Pcoupltype               = semiisotropic
nstpcouple               = -1
; Time constant (ps), compressibility (1/bar) and reference P (bar)
tau_p                    = 5.0          5.0
compressibility          = 4.5e-5       4.5e-5
ref_p                    = 1.0          1.0
; Scaling of reference coordinates, No, All or COM
refcoord-scaling         = No

; OPTIONS FOR QMMM calculations
QMMM                     = no
; Groups treated Quantum Mechanically
QMMM-grps                =
; QM method
QMmethod                 =
; QMMM scheme
QMMMscheme               = normal
; QM basisset
QMbasis                  =
; QM charge
QMcharge                 =
; QM multiplicity
QMmult                   =
; Surface Hopping
SH                       =
; CAS space options
CASorbitals              =
CASelectrons             =
SAon                     =
SAoff                    =
SAsteps                  =
; Scale factor for MM charges
MMChargeScaleFactor      = 1
; Optimization of QM subsystem
bOPT                     =
bTS                      =

; SIMULATED ANNEALING
; Type of annealing for each temperature group (no/single/periodic)
annealing                =
; Number of time points to use for specifying annealing in each group
annealing-npoints        =
; List of times at the annealing points for each group
annealing-time           =
; Temp. at each annealing point, for each group.
annealing-temp           =

; GENERATE VELOCITIES FOR STARTUP RUN
gen_vel                  = no
gen_temp                 = 310.15
gen-seed                 = 240381

; OPTIONS FOR BONDS
constraints              = all-bonds
; Type of constraint algorithm
constraint_algorithm     = Lincs
; Do not constrain the start configuration
continuation             = no
; Use successive overrelaxation to reduce the number of shake iterations
Shake-SOR                = no
; Relative tolerance of shake
shake-tol                = 0.0001
; Highest order in the expansion of the constraint coupling matrix
lincs-order              = 8
; Number of iterations in the final step of LINCS. 1 is fine for
; normal simulations, but use 2 to conserve energy in NVE runs.
; For energy minimization with constraints it should be 4 to 8.
lincs-iter               = 10
; Lincs will write a warning to the stderr if in one step a bond
; rotates over more degrees than
lincs-warnangle          = 30
; Convert harmonic bonds to morse potentials
morse                    = no

; ENERGY GROUP EXCLUSIONS
; Pairs of energy groups for which all non-bonded interactions are excluded
energygrp-excl           =

; WALLS
; Number of walls, type, atom types, densities and box-z scale factor for Ewald
nwall                    = 0
wall-type                = 9-3
wall-r-linpot            = -1
wall-atomtype            =
wall-density             =
wall-ewald-zfac          = 3

; COM PULLING
; Pull type: no, umbrella, constraint or constant-force
pull                     = no

; ENFORCED ROTATION
; Enforced rotation: No or Yes
rotation                 = no

; NMR refinement stuff
; Distance restraints type: No, Simple or Ensemble
disre                    = No
; Force weighting of pairs in one distance restraint: Conservative or Equal
disre-weighting          = Conservative
; Use sqrt of the time averaged times the instantaneous violation
disre-mixed              = no
disre-fc                 = 1000
disre-tau                = 0
; Output frequency for pair distances to energy file
nstdisreout              = 100
; Orientation restraints: No or Yes
orire                    = no
; Orientation restraints force constant and tau for time averaging
orire-fc                 = 0
orire-tau                = 0
orire-fitgrp             =
; Output frequency for trace(SD) and S to energy file
nstorireout              = 100

; Free energy variables
free-energy              = no
couple-moltype           =
couple-lambda0           = vdw-q
couple-lambda1           = vdw-q
couple-intramol          = no
init-lambda              = -1
init-lambda-state        = -1
delta-lambda             = 0
nstdhdl                  = 50
fep-lambdas              =
mass-lambdas             =
coul-lambdas             =
vdw-lambdas              =
bonded-lambdas           =
restraint-lambdas        =
temperature-lambdas      =
calc-lambda-neighbors    = 1
init-lambda-weights      =
dhdl-print-energy        = no
sc-alpha                 = 0
sc-power                 = 1
sc-r-power               = 6
sc-sigma                 = 0.3
sc-coul                  = no
separate-dhdl-file       = yes
dhdl-derivatives         = yes
dh_hist_size             = 0
dh_hist_spacing          = 0.1

; Non-equilibrium MD stuff
acc-grps                 =
accelerate               =
freezegrps               =
freezedim                =
cos-acceleration         = 0
deform                   =

; simulated tempering variables
simulated-tempering      = no
simulated-tempering-scaling = geometric
sim-temp-low             = 300
sim-temp-high            = 300

; Electric fields
; Format is number of terms (int) and for all terms an amplitude (real)
; and a phase angle (real)
E-x                      =
E-xt                     =
E-y                      =
E-yt                     =
E-z                      =
E-zt                     =

; AdResS parameters
adress                   = no

; User defined thingies
user1-grps               =
user2-grps               =
userint1                 = 0
userint2                 = 0
userint3                 = 0
userint4                 = 0
userreal1                = 0
userreal2                = 0
userreal3                = 0
userreal4                = 0
-----------------------------

________________________________
From: Shirts, Michael R. (mrs5pt) [mrs5pt at eservices.virginia.edu]
Sent: Tuesday, July 01, 2014 2:02 PM
To: Ullmann, Thomas; gmx-developers at gromacs.org
Subject: Re: [gmx-developers] possible bug connected to the velocity-Verlet integrator

I fully agree that the actual system is not suitable for testing, but it lead me to think that there might be > a bug. Thanks for the paper, I already saw it, but I think that it is obvious that the large systems do not
sample the correct ensemble.

Sure, but in what way?  For example, is the right ensemble sampled in NVT?  That would allow one to separate out issues with just NPT.

How about the second, simpler test described at the end of the mail (two particles only)?

That's almost certainly not a good test of anything integrator related.  You can't test ensembles when looking at the approach to equilibrium.  I look at those two graphs and see perfectly valid approaches to equilibrium, especially if vv is using a different random number seed in each. Half step velocities will not be interpreted the same way by both problems, so looking at the first picosecond or so will likely not yield any useful information; it will be entirely equilibration artifacts from the different starting points. There's also a real ergodicity problem, in that if COM motion is being removed, there are only a few degrees of freedom for a symmetric particle system, none of which can exchange kinetic energy with each other, making all thermostats other than langevin suspect.  A nice little box of water or LJ fluid would be much preferable a test, especially since it would allow separate tests of NVT and NPT (in fact, I suspect an issue with non isotropic pressure control and + md-vv)

should be usable to test the technical function. The small time step should also make the results independent > of the slightly different interpretation
of the input velocities, as verified without thermostat).

I'm not sure how being dominated by different initial conditions really helps anything. To me, it looks like several valid approaches to equilibrium, with different velocity verlet seeds.

Overall:
My guess is that you are using md-vv with Parinello-Rahnman in semiisotropic mode, which I think is supposed to have a warning, but perhaps it got missed.   Perhaps if we saw the mdp's of the system that was clearly having area problems, it would be possible to tell what what combination of options might be causing problems.  If you think it was md vs md-vv, test a box of water or LJ particles over 50 or so times tau_t, and see if they have the same thermodynamics.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20140701/0a88bba8/attachment-0003.html>


More information about the gromacs.org_gmx-developers mailing list