Dear AMBER Experts,
I am trying to perform PCA using cpptraj using the following script
(combining multiple trajectories from independent MD runs):
# RMS-Fit to first frame to remove global translation/rotation
parm REF/OPEN_WT/run1/step5_input.parm7
trajin REF/OPEN_WT/run1/combined_longrun.nc
trajin REF/OPEN_WT/run2/combined_longrun.nc
trajin REF/OPEN_WT/run3/combined_longrun.nc
center
autoimage
rms ToFirst :1-438&!.H=
average crdset avg_set
createcrd traj_set
run
crdaction traj_set rms ref avg_set
:4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA&!.H=
crdaction traj_set matrix covar \
:4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA&!.H= name
WT_covar \
out output_combined.PCA_backbone/OPEN_WT/WT_covmat.dat #Write covariance
matrix based on given selection mask
*runanalysis diagmatrix WT_covar out
output_combined.PCA_backbone/OPEN_WT/WT_evecs.dat \ vecs 5 name myevecs
nmwiz nmwizvecs 5 nmwizfile
output_combined.PCA_backbone/OPEN_WT/WT_porcupine.nmd \ nmwizmask
:4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA&!.H=*
crdaction traj_set projection p1 modes myevecs beg 1 end 5
:4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA&!.H= \
out output_combined.PCA_backbone/OPEN_WT/WT_open_pca-5.dat #write
projections of first 5 PCs
hist p1:1 bins 100 out output_combined.PCA_backbone/OPEN_WT/WT-hist.agr
norm name WT-1
hist p1:2 bins 100 out output_combined.PCA_backbone/OPEN_WT/WT-hist.agr
norm name WT-2
hist p1:3 bins 100 out output_combined.PCA_backbone/OPEN_WT/WT-hist.agr
norm name WT-3
hist p1:4 bins 100 out output_combined.PCA_backbone/OPEN_WT/WT-hist.agr
norm name WT-4
hist p1:5 bins 100 out output_combined.PCA_backbone/OPEN_WT/WT-hist.agr
norm name WT-5
run
clear all
readdata output_combined.PCA_backbone/OPEN_WT/WT_evecs.dat name Evecs
parm REF/OPEN_WT/run1/step5_input.parm7
parmstrip !(:4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA
&!.H=)
parmwrite out output_combined.PCA_backbone/OPEN_WT/modes.prmtop
runanalysis modes name Evecs trajout
output_combined.PCA_backbone/OPEN_WT/WT-mode1.nc \
pcmin -100 pcmax 100 tmode 1 trajoutmask
::4-34,51-90,121-150,155-183,241-271,280-306,333-360,366-394.CA&!.H=
trajoutfmt netcdf
I am running this script for different systems (wild-type protein, mutant
etc.). Instead of the default "porcupine" visualization showing the
direction and variance of different PCs, I was interested in calculating a
"difference" vector between the single mutant and WT by changing the bold
highlighted lines above where I print out a difference in vectors between
the mutant and WT systems from within the script directly. Is there a way
to do this inside the script or do I have to post-process it after writing
out the vectors for the WT and mutant systems?
Any help/guidance would be greatly appreciated.
Best regards,
P.N.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Dec 12 2022 - 08:00:03 PST