Re: [AMBER] Difference in velocity values between parmed and pytraj

From: Hai Nguyen <nhai.qn.gmail.com>
Date: Wed, 7 Aug 2019 11:47:37 -0400

Hi,

I think pytraj (which is cpptraj under the hood) reads whatever velocity
stored in the trajectory file as it is.
It seems like parmed does the auto-conversion if traj is in amber format.

In [31]: import pytraj as pt



In [32]: from scipy.io import netcdf



In [33]: traj = pt.iterload('trunc.nc', 'system.prmtop')



In [34]: fh = netcdf.netcdf_file('./trunc.nc')



In [35]: # pytraj



In [36]: traj[0].velocity


Out[36]:
array([[-0.06234377, -0.212735 , -0.07553997],
       [-0.33413538, -0.97585237, 0.41033223],
       [ 0.28189024, 0.3869082 , 0.55642217],
       ...,
       [-0.06586777, -0.31600413, 0.39305016],
       [-0.53357279, 0.21872835, -0.2971119 ],
       [-0.28074518, -0.06457534, 0.27767515]])

In [37]: # raw data (via scipy)



In [38]: fh.variables['velocities'].data[0]


Out[38]:
array([[-0.06234377, -0.212735 , -0.07553997],
       [-0.33413538, -0.9758524 , 0.41033223],
       [ 0.28189024, 0.3869082 , 0.5564222 ],
       ...,
       [-0.06586777, -0.31600413, 0.39305016],
       [-0.5335728 , 0.21872835, -0.2971119 ],
       [-0.28074518, -0.06457534, 0.27767515]], dtype=float32)

Hai

On Wed, Aug 7, 2019 at 11:13 AM Irfan Alibay <irfan.alibay.lists.gmail.com>
wrote:

> Hi all,
>
> I have noticed that on reading a NetCDF restart file, parmed and pytraj
> will report different velocity values which are off by a factor of 20.455.
>
> I unfortunately couldn't find a definite answer as to what velocity units
> are used in parmed and pytraj respectively. So, as a sanity check, I was
> wondering if anyone on-list could confirm that:
>
> parmed reports velocities in Angstroms per ps
> pytraj reports velocities in Angstroms per 1/20.455 ps (as per
> http://ambermd.org/formats.html)
>
> Many thanks,
>
> Irfan Alibay
> Postdoctoral Research Associate
> Department of Biochemistry
> The University of Oxford
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Aug 07 2019 - 09:00:02 PDT
Custom Search