Thank you so much, Elaine.

Best,
Junjie


From: Elaine Meng <meng@cgl.ucsf.edu>
Sent: Monday, February 24, 2025 4:08 PM
To: junjie han <hanjunjie2014@gmail.com>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Measure angle between domains in chimeraX
 
Hi Junjie,
For atomspec purposes, using "define axis" is exactly the same as using "measure inertia" --- it doesn't require only 2 atoms, you can give an atomspec that is the whole model (or whatever set of atoms or residues you used for "measure inertia"). This is explained in the help links I sent before.
Elaine


> On Feb 24, 2025, at 12:56 PM, junjie han via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Hi Elaine,
>
> I am not sure which two atoms can be used to define the axis to represent the longest axis of a specific subunit. That's why I do it in a little bit complicated way.
>
> Thank you,
> Junjie
> From: Elaine Meng <meng@cgl.ucsf.edu>
> Sent: Monday, February 24, 2025 2:18 PM
> To: junjie han <hanjunjie2014@gmail.com>
> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
> Subject: Re: Measure angle between domains in chimeraX
>  Why don't you just use "define axis" with "massWeighting true" to get the same axis directly (if you specify the same atoms) instead of two steps with "measure inertia"?
>
> Elaine
>
>
> > On Feb 24, 2025, at 11:57 AM, junjie han <hanjunjie2014@gmail.com> wrote:
> >
> > Hi Elaine,
> >
> > Thank you. My understanding is that the 3D vector of v1 starts from the coordinate (0, 0, 0), which is why I define the axis by connecting coordinate (0,0,0) to the coordinate (-0.508,-0.554,0.659).
> > If not so, is there a way to measure the angle between two 3D vectors in ChimeraX?
> >
> > Best,
> > Junjie
> > From: Elaine Meng <meng@cgl.ucsf.edu>
> > Sent: Monday, February 24, 2025 1:39 PM
> > To: junjie han <hanjunjie2014@gmail.com>
> > Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu>
> > Subject: Re: Measure angle between domains in chimeraX
> >  Hi Junjie,
> > All I can say is what it already says in the help page:
> >
> > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#inertia>
> >
> > "The vectors v1, v2, and v3 are the principal axes (longest to shortest). The lengths a, b, c are half-diameters along axes v1, v2, and v3, respectively. The moments r1, r2, and r3 are calculated as (inertia/mass)½ about axes v1, v2, and v3, respectively. "
> >
> > Aren't 3D vectors always given as 3 numbers?  It is the standard way of expressing a vector. See also the standard definition of principal axis.
> >
> > Also I cannot answer whether it divides a subunit into two equal parts.  You would need a plane to divide a 3D object, not an axis.  Also the object would need to be perfectly symmetric around that plane, which is not likely for a lumpy molecule.
> >
> > Elaine
> >
> > > On Feb 24, 2025, at 10:26 AM, junjie han <hanjunjie2014@gmail.com> wrote:
> > >
> > > Hi Elaine,
> > >
> > > Thank you.
> > >
> > > Could you please help to confirm that whether the v1 vector represents the direction of the axis defined based on the two coordinates (0,0,0) and ( -0.508,-0.554, 0.659) for the subunit A? If so, is the defined axis parallel to the direction of the black line that divides subunit A into two equal parts?
> > >
> > > measure inertia #1/A showEllipsoid true
> > > Inertia axes for 8dzs, 2074 atoms
> > > v1 = -0.508 -0.554 0.659 a = 36.027 r1 = 12.001
> > > v2 = 0.356 -0.832 -0.425 b = 19.480 r2 = 18.103
> > > v3 = 0.784 0.019 0.620 c = 18.455 r3 = 18.316
> > > center = 125.9 126.14 150.23<image.png>Please let me know when you have a chance.
> > >
> > > Very appreciated,
> > > Junjie
> > >
> > >
> > >
> > > From: Elaine Meng <meng@cgl.ucsf.edu>
> > > Sent: Monday, February 24, 2025 10:34 AM
> > > To: junjie han <hanjunjie2014@gmail.com>
> > > Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu>
> > > Subject: Re: Measure angle between domains in chimeraX
> > >  You could just use "define axis" with "massWeighting true" -- as far as I know, it should give the same principal axis as "measure inertia" for the same set of atoms.
> > >
> > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#inertia>
> > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis>
> > >
> > > Both commands take specified atoms, so they are equally "biased," if by biased you mean based on the atoms you specified.  You can specify all atoms in the model if that's what you want, but it would really include everything like waters, ligand, etc.
> > >
> > > The "measure inertia" help explains the output (v1, v2, v3 etc.) and yes the first one is the longest one.
> > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#inertia>
> > >
> > > I hope this helps,
> > > Elaine
> > > -----
> > > Elaine C. Meng, Ph.D.                     
> > > UCSF Chimera(X) team
> > > Resource for Biocomputing, Visualization, and Informatics
> > > Department of Pharmaceutical Chemistry
> > > University of California, San Francisco
> > >
> > >
> > > > On Feb 23, 2025, at 2:46 PM, junjie han <hanjunjie2014@gmail.com> wrote:
> > > >
> > > >  Hi Elaine,
> > > >
> > > > Thanks for your great response. It is really helpful. Could I ask more questions?
> > > > Based on your direction, I already figured out how to define the axes and planes and then use 'angle' command to measure the angles between them.
> > > > However, it may induce a bit of a bias by defining the axes manually. Could the ChimeraX generate a more accurate axis automatically that is through the mass center of the molecule?
> > > > For instance, the command 'measure inertia #1/A showEllipsoid  true' can generate the ellipsoid that is oriented based on the principal axes of inertia. I assume that the principal axis of inertia is through the mass center of the molecule.<image.png>What I need is to generate axes like the black and red lines that go through the center of mass of the molecule and divide it into two equal parts. So how do I get this?
> > > >
> > > > Below is the output after I ran the command 'measure inertia' to show the ellipsoid of two subunits of a complex.
> > > >
> > > > measure inertia #1/A showEllipsoid true
> > > > Inertia axes for 8dzs, 2074 atoms
> > > > v1 = -0.508 -0.554 0.659 a = 36.027 r1 = 12.001
> > > > v2 = 0.356 -0.832 -0.425 b = 19.480 r2 = 18.103
> > > > v3 = 0.784 0.019 0.620 c = 18.455 r3 = 18.316
> > > > center = 125.9 126.14 150.23
> > > >
> > > > measure inertia #1/b showEllipsoid true
> > > > Inertia axes for 8dzs, 1641 atoms
> > > > v1 = 0.520 0.842 0.141 a = 39.590 r1 = 11.344
> > > > v2 = -0.329 0.045 0.943 b = 18.123 r2 = 19.403
> > > > v3 = 0.788 -0.537 0.301 c = 17.747 r3 = 19.472
> > > > center = 148.04 146.61 117.1
> > > >
> > > > The output shows three vectors, v1, v2, and v3 and the mass center of the subunit. My question is whether the v1 vector represents the direction of the black line of subunit A. If it is, I can define the axis based on the two coordinates (0,0,0) and ( -0.508,-0.554, 0.659) for unit A, and  the coordinates (0,0,0) and ( 0.520,0.842, 0.141) for subunit B. After this, I can use the command 'angle' to calculate the angles between two axes.
> > > > Is my understanding correct? Please let me know if it is, or share your strategy when you have a chance.
> > > > Thank you very much.
> > > >
> > > > Looking forward your response,
> > > > Jianming
> > > >
> > > >
> > > >
> > > > From: Elaine Meng <meng@cgl.ucsf.edu>
> > > > Sent: Sunday, February 23, 2025 10:44 AM
> > > > To: junjie han <hanjunjie2014@gmail.com>
> > > > Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu>
> > > > Subject: Re: Measure angle between domains in chimeraX
> > > >  Hi Junjie,
> > > > In general there are two ways:
> > > >
> > > > (1) use Define Axes/Planes/Centroids tool or "define" command to define axis or plane objects based on specified atoms.  Then you can get the crossing angles between any pairs of these objects using the Axes/Planes/Centroids GUI or the "angle" command.  See the following for details:
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/tools/axesplanes.html>
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html>
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/angle.html>
> > > >
> > > > (2) if the two domains are structurally similar to each other, you could open two copies of the structure and fit one onto the other, superimposing the parts you want to superimpose (using whatever method you want, "align" or "matchmaker" or manual movements).  Then you can get the relationship between the two models with "measure rotation" -- see the following for details:
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#rotation>
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/align.html>
> > > > <https://rbvi.ucsf.edu/chimerax/docs/user/commands/matchmaker.html>
> > > >
> > > > I hope this helps,
> > > > Elaine
> > > > -----
> > > > Elaine C. Meng, Ph.D.                    
> > > > UCSF Chimera(X) team
> > > > Resource for Biocomputing, Visualization, and Informatics
> > > > Department of Pharmaceutical Chemistry
> > > > University of California, San Francisco
> > > >
> > > >
> > > > > On Feb 22, 2025, at 8:39 PM, junjie han <hanjunjie2014@gmail.com> wrote:
> > > > >
> > > > > Hi Elaine,
> > > > >
> > > > > I hope this email finds you well. May I ask how to measure the angle between two domains from one molecule or two different molecules in ChimeraX. Here are some examples below.
> > > > > Example 1:
> > > > >
> > > > > <image.png>How to calculate these angles (54°, 38°)?
> > > > >
> > > > > Example 2:<image.png>How to calculate this angle (75°) ?
> > > > >
> > > > > Example 3:<image.png>How can I measure the rotation angle between A and B, or between two specific regions of these two molecules in ChimeraX?
> > > > > If I need to calculate the rotation angles of two molecules relative to a specific molecule, how can I define a shared axis for calculating the rotation angles? The rotation axes are different when I use the command “measure rotation A toModel B” to calculate the rotation angles, which is not an ideal way to compare them in parallel.
> > > > >
> > > > > Thank you in advance for your any suggestions.
> > > > >
> > > > > Very appreciated,
> > > > > Junjie
>
>
> _______________________________________________
> ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/