Re: [AMBER] Calculating a dot product between eigenvectors

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Thu, 11 Dec 2025 08:40:36 -0500

Hi,

I'm not sure where you got that syntax, but that's not something
cpptraj will understand.

I never got around to doing a straight dot product for eigenvectors,
but to compare two sets of eigenvectors you can calculate the
root-mean-square inner product (rmsip) which of course is made up of
dot products:

# Read in previously generated eigenvectors
readdata evecs.dat name MyModes1
readdata evecs.dat name MyModes2
# Calculate the RMSIP for only the first mode
runanalysis modes rmsip setname FirstMode name MyModes1 name2 MyModes2
beg 1 end 1 out rmsip.dat
runanalysis modes rmsip setname FiveModes name MyModes1 name2 MyModes2
beg 1 end 5 out rmsip.dat

Hope this helps!

-Dan

PS - for more info on generating eigenvectors (i.e. running PCA) see
here: https://amberhub.chpc.utah.edu/introduction-to-principal-component-analysis/

On Wed, Dec 10, 2025 at 10:30 PM Osman, Roman via AMBER
<amber.ambermd.org> wrote:
>
> Hello,
>
> I would like to calculate the dot product between eigenvectors from two separate PCA on the same protein.
> I found these instructions:
>
> * Load both sets of modes: load traj1.nc, load traj2.nc.
> * Use vectormath to calculate the dot product or angle. For example, to compare the first mode of each set:
>
> vector v1 = modes1[1] // First mode from modes1.nc
> vector v2 = modes2[1] // First mode from modes2.nc
> vectormath vec1 v1 vec2 v2 dotproduct [out dot1.dat]
>
>
> It all makes sense in principle, except for the definitions of the vectors (the = sign). How do I equate vector v1 with the first eigenvector?
>
>
> Roman Osman
>
> Professor
>
> Department of Pharmacological Sciences
>
> Icahn School of Medicine at Mount Sinai
>
>
>
> ________________________________
> Confidentiality Notice: This electronic mail transmission and any documents, files, or previous email messages attached to it may contain confidential information and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, or a person responsible for delivering such information to the intended recipient, you are hereby notified that any further review, disclosure, copying, dissemination, distribution, or use of any of the information contained in or attached to this email transmission is strictly prohibited. If you have received this message in error, please notify the sender immediately by email, discard any paper copies, and delete all electronic files of the message. Thank you for your cooperation.
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Dec 11 2025 - 06:00:02 PST
Custom Search