Re: [AMBER] Unwrapping in MSD calculations with pytraj/cpptraj

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Fri, 29 Jul 2022 15:49:55 -0400

Hi,

I think I see the behavior you are seeing. I need to look into it more
and I'll update you with what I find.

What kind of unit cell are you using? Also, what versions of cpptraj
and pytraj are you using?

Thanks!

-Dan

On Mon, Jul 25, 2022 at 8:58 AM Cianna Calia via AMBER
<amber.ambermd.org> wrote:
>
> Hello AMBER community!
>
> I am wondering if anyone can help me understand how the diffusion functions
> in pytraj/cpptraj handle unwrapping. When I try using pytraj to calculate
> an atom's MSD from a trajectory unwrapped in cpptraj (with "unwrap
> byatom"), I am unsure why it deviates from pytraj's result for the original
> wrapped trajectory, since I thought pytraj would deal with unwrapping
> automatically in a way that would give the same result as using the already
> unwrapped trajectory. But the X, Y, and Z datasets differ starting where
> unwrapping becomes relevant for each dimension.
>
> More detail - I have the original wrapped trajectory
> 1hg7_WT_cubic_100ns_1_last2ns.nc and an unwrapped trajectory
> unwrap_2ns_test1.nc made in cpptraj like this:
>
> parm 1hg7_WT_cubic.prmtop
> trajin 1hg7_WT_cubic_100ns_1_last2ns.nc
> unwrap byatom
> trajout unwrap_2ns_test1.nc
>
> I tried the following diffusion calculations with pytraj:
>
> import pytraj as pt
>
> original_traj = pt.load('1hg7_WT_cubic_100ns_1_last2ns.nc',
> '1hg7_WT_cubic.prmtop')
> pt_diffusion_orig_traj = pt.diffusion(original_traj, '.1730', dtype='dict',
> frame_indices=[i for i in range(len(original_traj))])
>
> unwrapped_traj = pt.load('unwrap_2ns_test1.nc', '1hg7_WT_cubic.prmtop')
> pt_diffusion_unw_traj = pt.diffusion(unwrapped_traj, '.1730', dtype='dict',
> frame_indices=[i for i in range(len(unwrapped_traj))])
>
> I am hoping for clarification on why pt_diffusion_orig_traj and
> pt_diffusion_unw_traj are not the same.
>
> I observe the same situation when I do analogous calculations with cpptraj
> as opposed to pytraj. I also tried seeing how the noimage option with the
> cpptraj diffusion function affects the results, and I am similarly confused
> about why the two diffusion calculations below give different results
> (again, differing starting from where there's unwrapping):
>
> parm 1hg7_WT_cubic.prmtop
> trajin 1hg7_WT_cubic_100ns_1_last2ns.nc
> diffusion out orig_traj_1730_diff_cpptraj.dat time 1.0 ".1730" nocalc
> unwrap byatom
> diffusion out unwrapped_traj_1730_diff_cpptraj.dat time 1.0 noimage ".1730"
> nocalc
>
> Taking out the "byatom" option makes no noticeable difference, nor does
> removing the "noimage" option from the diffusion command acting on the
> already unwrapped trajectory. The difference between the diffusion data
> before and after unwrapping here is not the same as the difference I
> observe when I use the diffusion command on the original wrapped trajectory
> with vs. without the "noimage" option.
>
> Thanks in advance for any help with understanding this!
> Cianna Calia
> _______________________________________________
> 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 Thu Aug 04 2022 - 13:37:44 PDT
Custom Search