Re: [AMBER] PCA analysis

From: Thakur, Abhishek <axt651.miami.edu>
Date: Thu, 9 Feb 2017 15:30:02 +0000

Thank you so much Dr.Martis


________________________________
From: Elvis Martis <elvis.martis.bcp.edu.in>
Sent: Thursday, February 9, 2017 4:06:41 AM
To: AMBER Mailing List
Subject: Re: [AMBER] PCA analysis

Sorry I replied in haste,
Please see this script, its similar to what you have sent but with additional keywords to enable you to visualize your PCs modes in VMD
#########################################################################################
# #
# 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 cpu/cpu.prmtop [cpu]
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 cpu/cpu.nc parm [cpu]
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 :1-36&!.H=

#####################################################
# Create an average structure considering all #
# the loaded frames and save it as a single frame #
# using the AMBER restart format #
#####################################################
average crdset cpu-gpu-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 cpu-gpu-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 cpu-gpu-trajectories rms ref cpu-gpu-average :1-36&!.H=

#####################################################
# Calculate coordinate covariance matrix #
#####################################################
crdaction cpu-gpu-trajectories matrix covar \
  name cpu-gpu-covar :1-36&!.H=

#####################################################
# Diagonalize coordinate covariance matrix #
# Get first 3 eigenvectors #
#####################################################
runanalysis diagmatrix cpu-gpu-covar out cpu-gpu-evecs.dat \
  vecs 3 name myEvecs \
  nmwiz nmwizvecs 3 nmwizfile dna.nmd nmwizmask :1-36&!.H=

#####################################################
# Now create separate projections #
# for each set of trajectories #
# More details: pag 610 #
#####################################################
crdaction cpu-gpu-trajectories projection CPU modes myEvecs \
  beg 1 end 3 :1-36&!.H= crdframes 1,10001
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 CPU:1 bins 100 out cpu-gpu-hist.agr norm name CPU-1
hist CPU:2 bins 100 out cpu-gpu-hist.agr norm name CPU-2
hist CPU:3 bins 100 out cpu-gpu-hist.agr norm name CPU-3

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 cpu-gpu-evecs.dat name Evecs


#####################################################
# Load a topology #
# This is necesary to create a new topology #
# that will match the read in eigenmodes
#####################################################
parm cpu/cpu.prmtop
parmstrip !(:1-36&!.H=)
parmwrite out cpu-gpu-modes.prmtop

#####################################################
# Create a NetCDF trajectory file with the #
# modes of motion of the first PCA #
#####################################################
runanalysis modes name Evecs trajout cpu-gpu-mode1.nc \
  pcmin -100 pcmax 100 tmode 1 trajoutmask :1-36&!.H= 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 #
#####################################################


    Best Regards



Elvis Martis
Ph.D. Student (Computational Chemistry)
 at Bombay College of Pharmacy


A Kalina, Santacruz [E], Mumbai 400098, INDIA
W www.elvismartis.in<http://www.elvismartis.in>
Skype. adrian_elvis12




-----Original Message-----
From: Thakur, Abhishek [mailto:axt651.miami.edu]
Sent: Thursday, February 09, 2017 8:28 PM
To: amber.ambermd.org
Subject: [AMBER] PCA analysis

Hi everyone,

It is my first time for PCA analysis


I have figured out my script, can anyone help me out how to analysis it after running following scrip. Do I need some other software to analyze it?


trajin PRMT7_ILE71_aMD_0_300ns.crd.gz
# Fit to first frame for averaging
rms first .CA
# Average the trajectory
average PRMT7_ILE71_aMD_avg_pdb.pdb pdb
# Save the rms-fit coords
createcrd crd1
# First run
run
# Load the generated average as reference reference PRMT7_ILE71_aMD_avg_pdb.pdb # Fit saved coords to the reference crdaction crd1 rms reference .CA # Calculate covariance matrix from fit coords crdaction crd1 matrix out matrix.dat name mymatrix covar .CA # Diagonalize matrix to get eigenvectors/eigenvalues runanalysis diagmatrix mymatrix out evecs.dat vecs 20 name mymode # Project fit coords along eigenvectors 1-3 crdaction crd1 projection myproj modes mymode out projection1-3.out beg 1 end 3 .CA # Set up hitograms for PC projections multihist myproj bins 200 normint out PC.multi.hist.agr #hist myproj:2 bins 200 normint out PC.hist.2.agr #hist myproj:3 bins 200 normint out PC.his.3.agr # Run analyses runanalysis




Thanking you,

Abhishek

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIFAw&c=y2w-uYmhgFWijp_IQN0DhA&r=0Hah93XWYYBgmROOVcaccg&m=2fqQqGu5qGboZwmUDdDj5cziMIQcUPiy9_ndtfUQpTs&s=bm9i5CvsitaYgtW2ePR-ZjGQ2QzZ2W86VyQ8qCOfgNU&e=

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIFAw&c=y2w-uYmhgFWijp_IQN0DhA&r=0Hah93XWYYBgmROOVcaccg&m=2fqQqGu5qGboZwmUDdDj5cziMIQcUPiy9_ndtfUQpTs&s=bm9i5CvsitaYgtW2ePR-ZjGQ2QzZ2W86VyQ8qCOfgNU&e=
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Feb 09 2017 - 08:00:02 PST
Custom Search