#CPPTRAJ input to do a Principal Component Analysis between two different trajectories # # of a 36-mer dsDNA (sequence: GCACGAACGAACGAACGC). One run using GPU technology # # and the other using CPU technology. # # # # This instructions is a set of examples with a brief description in each step # # Please refer to the AMBER15 manual for more details about each keyword. # # Page numbers are included when necessary. # # # # The script is written so it can run in one pass and all the commands will execute, # # generating multiple output files. # # # # It can also be used as a step-by-step guide in CPPTRAJ's interactive mode. # # # ######################################################################################### # # Prof. Thomas E. Cheatham III # tec3@utah.edu # Medicinal Chemistry Department, College of Pharmacy # University of Utah. # ######################################################################################### ##################################################### # Load two topologies, each with a different # # name handler depicted inside [] # ##################################################### parm first.prmtop #parm gpu/gpu.prmtop [gpu] ##################################################### # Load two different trajectories # # each with their respective topology. # # Each trajectory is 10001 frames long, so # # we will have a dataset of 20002 frames long, # # the first 10001 frames correspond to the cpu # # frames and the from 10002 to 20002, correspond # # to the GPU frames. # ##################################################### trajin first.dcd #trajin gpu/gpu.nc parm [gpu] ##################################################### # Move and translate the coordinates so they will # # fit as close as possible to the first frame. # # Only fit residues 1 through 36 (the DNA) # # and ignore everything that matches the atom 'H' # # This means that no hydrogens are going to be # # part of the fitting. # ##################################################### rms first @CA ##################################################### # Create an average structure considering all # # the loaded frames and save it as a single frame # # using the AMBER restart format # ##################################################### average crdset first-average ##################################################### # CPPTRAJ works with datasets of multiple formats # # create a coordinate dataset that refers to the # # loaded frames. Call the loaded frames # # 'cpu-gpu-trajectories' # ##################################################### createcrd first-trajectories ##################################################### # Run the commands because we need our reference # # structure. With the 'run' command, the # # commands so far will run and will generate our # # average reference structure with the AMBER # # restart format # ##################################################### run ##################################################### # Fit our frames, which we named: # # cpu-gpu-trajectories # # to the previously loaded average structure # # Always use the same mask # ##################################################### crdaction first-trajectories rms ref first-average @CA ##################################################### # Calculate coordinate covariance matrix # ##################################################### crdaction first-trajectories matrix covar \ name first-covar @CA ##################################################### # Diagonalize coordinate covariance matrix # # Get first 3 eigenvectors # ##################################################### runanalysis diagmatrix first-covar out first-evecs.dat \ vecs 3 name myEvecs \ nmwiz nmwizvecs 3 nmwizfile first.nmd nmwizmask @CA ##################################################### # Now create separate projections # # for each set of trajectories # # More details: pag 610 # ##################################################### crdaction first-trajectories projection first modes myEvecs \ beg 1 end 3 @CA crdframes 1,last #crdaction cpu-gpu-trajectories projection GPU modes myEvecs \ # beg 1 end 3 :1-36&!@H= crdframes 10002,last ##################################################### # Make a normalized histogram of the 3 # # calculated projections # # More details: pag 598 # ##################################################### hist first:1 bins 100 out first-hist.agr norm name first-1 hist first:2 bins 100 out first-hist.agr norm name first-2 hist first:3 bins 100 out first-hist.agr norm name first-3 hist first:1 first:2 bins 100 out all-sim-c0_hist_1_2.gnu norm name All_1_2 #hist GPU:1 bins 100 out cpu-gpu-hist.agr norm name GPU-1 #hist GPU:2 bins 100 out cpu-gpu-hist.agr norm name GPU-2 #hist GPU:3 bins 100 out cpu-gpu-hist.agr norm name GPU-3 ##################################################### # Run the analysis # # ** cross-fingers ** # ##################################################### run ##################################################### ##################################################### # DELETE EVERYTHING AND START FRESH # ##################################################### ##################################################### clear all ##################################################### # Visualize the fluctuations of the eigenmodes # # Read the file with the eigenvectores # ##################################################### readdata first-evecs.dat name Evecs ##################################################### # Load a topology # # This is necesary to create a new topology # # that will match the read in eigenmodes ##################################################### parm first.prmtop parmstrip !(@CA) parmwrite out first-modes.prmtop ##################################################### # Create a NetCDF trajectory file with the # # modes of motion of the first PCA # ##################################################### runanalysis modes name Evecs trajout first-mode1.nc \ pcmin -100 pcmax 100 tmode 1 trajoutmask @CA trajoutfmt netcdf ##################################################### # Now you can open the files: # # cpu-gpu-modes.prmtop # # cpu-gpu-modes.nc # # in Chimera / VMD and watch the movie # # which shows the first mode of motion # #####################################################