Re: [AMBER] RMSD of independent trajectories using cpptraj

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Mon, 14 Jan 2019 19:41:58 -0500

Hi,

This can be done; you just need to process each trajectory separately.
For example:

parm 2fct_WT_solv.prmtop
reference ../2fct_WT_npt2.rst
# Traj 1
trajin ../1/2fct_WT_nvt-binary.nc
autoimage
rmsd BB1 :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat
run
clear trajin
# Traj 2
trajin ../2/2fct_WT_nvt-binary.nc
autoimage
rmsd BB2 :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat
run
clear trajin
# Traj 3
trajin ../1/2fct_WT_nvt-binary.nc
autoimage
rmsd BB3 :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat
run
clear trajin
# Average
runanalysis avg oversets BB? out Avg.dat

If you have a recent (i.e. AmberTools 18 or GitHub) version of
cpptraj, you can use a for loop to simplify things:

parm 2fct_WT_solv.prmtop
reference ../2fct_WT_npt2.rst
for i=1;i<4;i++
  trajin ../$i/2fct_WT_nvt-binary.nc
  autoimage
  rmsd BB$i :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat
  run
  clear trajin
done
runanalysis avg oversets BB? out Avg.dat

Hope this helps,

-Dan

On Mon, Jan 14, 2019 at 4:25 PM Hunter Wilson <wils1872.umn.edu> wrote:
>
> Afternoon all,
>
> I want to calculate an average RMSD across the timescale of my simulation
> by using three independent trajectories as inputs. Currently, cpptraj is
> catenating all of the three trajectories when calculating the RMSD. Below
> is my input script:
>
> trajin ../1/2fct_WT_nvt-binary.nc
> trajin ../2/2fct_WT_nvt-binary.nc
> trajin ../3/2fct_WT_nvt-binary.nc
> reference ../2fct_WT_npt2.rst
> center :1-308
> image
> rmsd BB :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat
>
> And this is the output:
> PARAMETER FILES:
> 0: '2fct_WT_solv.prmtop', 39040 atoms, 11749 res, box: Orthogonal, 11443
> mol, 11408 solvent, 18750 frames
>
> INPUT TRAJECTORIES:
> 0: '2fct_WT_nvt-binary.nc' is a NetCDF AMBER trajectory, Parm
> 2fct_WT_solv.prmtop (Orthogonal box) (reading 6250 of 6250)
> 1: '2fct_WT_nvt-binary.nc' is a NetCDF AMBER trajectory, Parm
> 2fct_WT_solv.prmtop (Orthogonal box) (reading 6250 of 6250)
> 2: '2fct_WT_nvt-binary.nc' is a NetCDF AMBER trajectory, Parm
> 2fct_WT_solv.prmtop (Orthogonal box) (reading 6250 of 6250)
> Coordinate processing will occur on 18750 frames.
>
> REFERENCE FRAMES (1 total):
> 0: '../2fct_WT_npt2.rst', frame 1
> Active reference frame for masks is 0
> TIME: Run Initialization took 0.0001 seconds.
>
> BEGIN TRAJECTORY PROCESSING:
> .....................................................
> ACTION SETUP FOR PARM '2fct_WT_solv.prmtop' (3 actions):
> 0: [center :1-308]
> Mask [:1-308] corresponds to 4783 atoms.
> 1: [image]
> Number of molecules to be imaged is 11443 based on mask '*'
> 2: [rmsd BB :110.C,CA,N,:229.C,CA,N,:305-308 first mass out rmsd-BB.dat]
> Mask [:110.C,CA,N,:229.C,CA,N,:305-308] corresponds to 21 atoms.
> Mask [:110.C,CA,N,:229.C,CA,N,:305-308] corresponds to 21 atoms.
> Warning: Coordinates are being rotated and box coordinates are present.
> Warning: Unit cell vectors are NOT rotated; imaging will not be possible
> Warning: after the RMS-fit is performed.
> ----- 2fct_WT_nvt-binary.nc (1-6250, 1) -----
> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Complete.
>
> ----- 2fct_WT_nvt-binary.nc (1-6250, 1) -----
> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Complete.
>
> ----- 2fct_WT_nvt-binary.nc (1-6250, 1) -----
> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Complete.
>
> Read 18750 frames and processed 18750 frames.
> TIME: Trajectory processing: 32.2032 s
> TIME: Avg. throughput= 582.2396 frames / second.
>
> ACTION OUTPUT:
>
> DATASETS:
> 1 data set:
> BB "BB" (double, rms), size is 18750
>
> DATAFILES:
> rmsd-BB.dat (Standard Data File): BB
> ---------- RUN END ---------------------------------------------------
> TIME: Total execution time: 32.6381 seconds.
> --------------------------------------------------------------------------------
> ,
> The output gives the RMSD of my mask over 18750 frames, when what I want is
> the average value of the three simulations, which will only give 6250
> frames. Any tips or suggestions?
>
> Best,
> Hunter
> --
> Hunter Wilson
> Chemistry PhD Student
> General Chemistry Teaching Assistant
> wils1872.umn.edu
>
> Department of Chemistry
> University of Minnesota- Twin Cities
> _______________________________________________
> 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 Mon Jan 14 2019 - 17:00:01 PST
Custom Search