Re: [AMBER] PCA eigenvalues

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Mon, 27 Nov 2017 11:09:18 -0500

Hi,

On Thu, Nov 23, 2017 at 1:56 PM, Lizelle Lubbe <LBBLIZ002.myuct.ac.za> wrote:
> It worked out well but I noticed the following warning in the output: Warning: Frame 25 Coordinates out of bounds (100). What does it mean and should I be worried about it?

No, this is innocuous. Cpptraj isn't as smart about determining the
min/max automatically as it could be. The value is probably exactly a
minimum or maximum and so falls just outside the histogram. You can
either manually specify min/max values for the histogram or just
ignore the message.

> The projection of PC1 vs PC2 was written as a gnu file like you suggested and displays a scatter of frames. However, the plot has a black background and purple dots for each frame which is really not very clear.
> Is there any way that I can change the colour or write it in another format? I can't seem to edit the plot at all in gnuplot.

You could edit the gnuplot file yourself - the gnuplot file that
cpptraj writes out is just a bunch of gnuplot commands followed by
data. There are also a couple of options you can use with gnuplot
output in cpptraj that help control what it looks like, like the
'palette' keyword. See section '28.4.3 Gnuplot Data File Options' in
the Amber17 manual for more details.

-Dan

>
> Regards
>
> Lizelle
>
> ________________________________________
> From: Daniel Roe <daniel.r.roe.gmail.com>
> Sent: 20 November 2017 05:53:21 PM
> To: AMBER Mailing List
> Subject: Re: [AMBER] PCA eigenvalues
>
> s.dat vHi,
>
> On Sat, Nov 18, 2017 at 10:05 AM, Lizelle Lubbe <LBBLIZ002.myuct.ac.za> wrote:
>> Hi Amber users,
>>
>> I have performed PCA analysis on my MD trajectories in cpptraj and would like to plot the fraction of total variance vs eigenvalue as shown in figure s9 of Roe et al 2014 (j phys chem b, 118, 3543-3552).
>
> To do this you'll want to calculate all principal components (i.e.
> eigenvectors) from your covariance matrix, so 3 * the number of
> selected atoms. Then you run the 'modes' analysis command with the
> 'eigenval' keyword on the resulting modes data, e.g.
>
> runanalysis diagmatrix myCovar out evececs 246 name myEvecs :1-4&!.H=
> runanalysis modes eigenval name myEvecs out evalfrac.dat
>
>> I also want to have a scatter plot of pc1 vs pc2 and pc2 vs pc3 to visualize clusters in this space.
>> Could someone please guide me in how this can be accomplished?
>
> For these, just give desired the principal component projection data
> set names to the 'hist' command, e.g. for the projection of PC 1 vs 2:
>
> hist Ndom:1 Ndom:2 bins 100 out Ndom_hist.gnu norm name Ndom_1_2
>
>> Also, how should the pca histogram analysis be interpreted?
>
> This is a lot trickier. As you probably know principal components
> represent axes that in this case describe variance in the selected
> atoms in your system. So PCs can tell you about what the dominant
> modes of motion in your system look like, but generally may not tell
> you how your system actually moves. Personally I like to visualize the
> modes of motion with the 'trajout' keyword of 'modes' (which it
> appears you are doing). It can also help to look at the so-called
> 'porcupine plots' - I use the nmwiz plugin for VMD (it appears you are
> doing that as well).
>
> Hope this helps,
>
> -Dan
>
>>
>> This is my pca script:
>>
>> trajin traj.nc
>>
>> rms first :1-720&!.H=
>>
>> average crdset Ndom_average
>>
>> createcrd Ndom_trajectories
>>
>> run
>>
>> crdaction Ndom_trajectories rms ref Ndom_average :1-720&!.H=
>>
>> crdaction Ndom_trajectories matrix covar name Ndom_covar :1-720&!.H=
>>
>> runanalysis diagmatrix Ndom_covar out Ndom_evecs.dat vecs 20 name NdomEvecs nmwiz nmwizvecs 3 nmwizfile Ndom_pca.nmd nmwizmask :1-720&!.H=
>>
>> crdaction Ndom_trajectories projection Ndom modes NdomEvecs beg 1 end 3 :1-720&!.H= crdframes 1,3000
>>
>> hist Ndom:1 bins 100 out Ndom_hist.agr norm name Ndom_1
>>
>> hist Ndom:2 bins 100 out Ndom_hist.agr norm name Ndom_2
>>
>> hist Ndom:3 bins 100 out Ndom_hist.agr norm name Ndom_3
>>
>> run
>>
>> clear all
>>
>> readdata Ndom_evecs.dat name Evecs
>>
>> parm NDOM_CPLX_rnb_stripped_box.prmtop
>>
>> parmstrip !(:1-720&!.H=)
>>
>> parmwrite out Ndom_modes.prmtop
>>
>> runanalysis modes name Evecs trajout Ndom_mode1.nc pcmin -100 pcmax 100 tmode 1 trajoutmask :1-720&!.H= trajoutfmt netcdf
>>
>> runanalysis modes name Evecs trajout Ndom_mode2.nc pcmin -100 pcmax 100 tmode 2 trajoutmask :1-720&!.H= trajoutfmt netcdf
>>
>> runanalysis modes name Evecs trajout Ndom_mode3.nc pcmin -100 pcmax 100 tmode 3 trajoutmask :1-720&!.H= trajoutfmt netcdf
>>
>> Kind regards
>>
>> Lizelle Lubbe
>> PhD Chemical Biology candidate
>> University of Cape Town
>> Disclaimer - University of Cape Town This e-mail is subject to UCT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. If this e-mail is not related to the business of UCT, it is sent by the sender in an individual capacity. Please report security incidents or abuse via csirt.uct.ac.za
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
> --
> -------------------------
> Daniel R. Roe
> Laboratory of Computational Biology
> National Institutes of Health, NHLBI
> 5635 Fishers Ln, Rm T900
> Rockville MD, 20852
> https://www.lobos.nih.gov/lcb
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
> Disclaimer - University of Cape Town This e-mail is subject to UCT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. If this e-mail is not related to the business of UCT, it is sent by the sender in an individual capacity. Please report security incidents or abuse via csirt.uct.ac.za
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



-- 
-------------------------
Daniel R. Roe
Laboratory of Computational Biology
National Institutes of Health, NHLBI
5635 Fishers Ln, Rm T900
Rockville MD, 20852
https://www.lobos.nih.gov/lcb
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 27 2017 - 08:30:03 PST
Custom Search