Hi Smith -

Check out how I did it in the http://pymolwiki.org/index.php/Elbow_angle 
script.  As long as you have the vectors, the angle is easy.  In particular, 
have a look at this line:

    elbow = int(numpy.degrees(numpy.arccos(numpy.dot(direction_v, 
direction_c))))


i.e. the angle (in radians) will be given by the arccos of the dot product of 
the two vectors.  For the elbow angle script, I converted to degrees and 
reported an integer value.

Cheers,
Jared

—
Jared Sampson
Graduate Student
Department of Biochemistry and Molecular Biophysics
Columbia University

On Nov 30, 2015, at 8:33 PM, Smith Liu 
<smith_liu...@163.com<mailto:smith_liu...@163.com>> wrote:


Thanks Jared, it works.

In addition, if by your way I created 2 vectors for 2 different chains, will 
you please show me how to determine the angle formed by the 2 vectors created?

Smith






At 2015-12-01 00:51:46, "Sampson, Jared M." 
<jms2...@cumc.columbia.edu<mailto:jms2...@cumc.columbia.edu>> wrote:
Hi Smith -

I’m not quite sure what you mean by "axis of a subunit."  If you mean the 
principal axis of that selection of atoms, `orient my_selection` will get it 
aligned along one of the axes.  Then you can create pseudoatoms on that axis 
and create a dash between them with the distance command.

# Get it lined up with the viewport axes.
select domain, chain A and resi 1-100
orient domain

# Here I’m assuming this put the long axis of the domain along the
# x axis.  We move the view along the x axis, and place pseudoatoms
# at the viewport center in two places.  You can change the length of the
# displayed axis based on how far you move.
move x, -10
pseudoatom ps1
move x, 20
pseudoatom ps2
move x, -10
distance axis, ps1, ps2

This is a bit clumsy and not a rigorous approach, but it will work for any 
other kind of vector you want to show, as long as you can get it aligned with 
one of the view axes.

Cheers,
Jared

—
Jared Sampson
Graduate Student
Department of Biochemistry and Molecular Biophysics
Columbia University

On Nov 29, 2015, at 7:42 AM, Smith Liu 
<smith_liu...@163.com<mailto:smith_liu...@163.com>> wrote:

Dear All,

Will you please show me how to display an axis of a subunit or a domain by 
pymol?

Smith



------------------------------------------------------------------------------
_______________________________________________
PyMOL-users mailing list 
(PyMOL-users@lists.sourceforge.net<mailto:PyMOL-users@lists.sourceforge.net>)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net





------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to