Re: [AMBER] Diffusion in pmemd.cuda

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Fri, 9 Jun 2023 09:47:18 -0400

Hi,

In addition to everything Dave said, be aware that until recently
there were issues calculating diffusion constants from NPT simulations
with Cpptraj (NVT and NVE trajectories are fine). I've just made some
fixes and improvements for calculating diffusion from NPT
trajectories, see:

https://github.com/Amber-MD/cpptraj/pull/1027
https://github.com/Amber-MD/cpptraj/pull/1028
https://github.com/Amber-MD/cpptraj/pull/1030
https://github.com/Amber-MD/cpptraj/pull/1032

These changes currently only apply to the GitHub version of cpptraj,
so you'll have to install that to take advantage of these
changes/fixes.

On Thu, Jun 8, 2023 at 2:24 PM David Poole via AMBER <amber.ambermd.org> wrote:
> Interestingly, despite this being in line with literature procedures, the
> resulting diffusion constants calculated with the velocity autocorrelation
> function or diffusion analysis in cpptraj did not match literature nor was
> there an expected correlation between the molecule size and diffusion
> constant. This was alarming, so we have now varied the simulations using

A few points here:

1) As Dave alluded to, Diffusion calculations can be tough to get
correct. First, note there was a bug in the SPFP GPU code that caused
an energy drift in NVE simulations, so if you're using older
pmemd.cuda this could be an issue. I think that Scott Legrand has
since fixed it, but you should double check that the energy drift in
your NVE simulations looks reasonable (i.e. small to negligible). If
the issue is still there you can work around it by using the DPFP code
or switch back to CPU.

2) In general for diffusion calculations you may want to use a smaller
time step (1 fs) and increase your SHAKE and direct sum tolerances
(say 0.000001 and 0.000001 respectively).

3) If you're calculating diffusion from velocity autocorrelation you
need to save your velocities at a pretty high frequency (about every 5
fs or so) to get the VAC function smooth enough for integrating over -
in general MSD is better to use IMO.

4) If you're calculating diffusion from a small amount of molecules
(like only 10 or so) you'll either need really long simulations or
you'll need to average over multiple time origins to get a
well-averaged MSD vs time curve (it should look fairly straight and
linear, not wavy). The new 'calcdiffusion' analysis in cpptraj will do
this, but it is only available in the latest GitHub version of cpptraj
(and you need to explicitly unwrap the trajectories beforehand). For
water there are generally enough molecules in the simulation that
10-20 ns or so of simulation time is OK, but again look at your MSD vs
time curves and make sure they look linear.

5) If you haven't already seen it, this best-practices article on
calculating diffusion constants has a lot of good info:
https://livecomsjournal.org/index.php/livecoms/article/view/v1i1e6324

> NVE, NPT, or NVT setups, turning off shake, decreasing or increasing the

Don't turn off SHAKE for rigid water models! They weren't designed for
that and resulting trajectories won't really be valid.

Hope any or all of this helps,

-Dan

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Jun 09 2023 - 07:00:03 PDT
Custom Search