parm noions.prmtop trajin gamd2.nc # Average the trajectory rms first :1-1530&!@H= average gaccAvg.rst7 restart # Save coordinates in memory for further processing createcrd crd1 run # Read in average structure, tag as [avg] reference gaccAvg.rst7.1 [avg] # RMS-fit coordinates in crd1 to average crdaction crd1 rms ref [avg] :1-1530&!@H= # Calculate coordinate covariance matrix crdaction crd1 matrix covar :1-1530&!@H= name gaccCovar # Diagonalize coordinate covariance matrix for eigenmodes runanalysis diagmatrix gaccCovar out evecs.dat vecs 2 nmwiz nmwizvecs 2 nmwizfile cas.nmd nmwizmask :1-1530&!@H= # Now create separate PC projections for each trajectory crdaction crd1 projection T1 modes evecs.dat beg 1 end 2000 :1-1530&!@H= \ crdframes 1,50000 out T1.dat crdaction crd1 projection T2 modes evecs.dat beg 1 end 2000 :1-1530&!@H= \ crdframes 50001,100000 out T2.dat crdaction crd1 projection T3 modes evecs.dat beg 1 end 2000 :1-1530&!@H= \ crdframes 100001,150000 out T3.dat crdaction crd1 projection T4 modes evecs.dat beg 1 end 2000 :1-1530&!@H= \ crdframes 150001,200000 out T4.dat crdaction crd1 projection T5 modes evecs.dat beg 1 end 2000 :1-1530&!@H= \ crdframes 200001,250000 out T5.dat # Calculate Kullback-Leibler Divergence vs time for PC histograms # Trajectories 1 and 2, modes 1-5 kde T1:1 kldiv T2:1 klout KL-PC.agr bins 400 name AMD-MREMD-1 kde T1:2 kldiv T2:2 klout KL-PC.agr bins 400 name AMD-MREMD-2 kde T1:3 kldiv T2:3 klout KL-PC.agr bins 400 name AMD-MREMD-3 kde T1:4 kldiv T2:4 klout KL-PC.agr bins 400 name AMD-MREMD-4 kde T1:5 kldiv T2:5 klout KL-PC.agr bins 400 name AMD-MREMD-5 # This is repeated for trajectory pairs 3+4, 5+6, 7+8, and 9+10 # Calculate PC histogram with KDE, trajectory 1, mode 1 kde T1:1 out kde-PC.agr bins 400 name KDE1-1 # Calculate PC histogram, trajectory 1, mode 1 hist T1:1,*,*,*,200 out pca.hist.agr normint name HIST1-1 # Histogram calcs repeated for all trajectories+modes