Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread gilleain torrance
Hi,

I might be wrong, but might it be that you need the axis through the
structure that minimises the distance of all the points to it. Or, to
put it another way, the least-square-plane through the structure, the
normal to that plane, and a thir axis perpendicular to both.

If this is the case, you are in luck, as I already made such a thing:

  http://pymolwiki.org/index.php/Bounding_Box

this script was designed to make a minimal bounding box (not just an
axis-aligned one). I think that it does this, although my geometry is
not good enough to know if I am right.

Anyway, you already mention joining opposite faces of the box - well
just use the axes calculated half-way through the first function.

Hope this helps.

gilleain

On Tue, Jun 2, 2009 at 11:41 PM, Sean Law magic...@hotmail.com wrote:
 Hi,

 For the past couple of days I've been trying to find a way to rotate an
 object in order to show a front and side profile for publication.  However,
 rotating with respect to the x, y, or z axes does not produce the correct
 result (even after moving the center-of-mass of the structure to the
 origin).  What I need is a way to determine the principal axes of rotation
 for a given selection so that rotation about any one of these axes does not
 produce a wobble effect.  I've even tried drawing a rectangular box around
 the object and then drawing an axes through the centroids of opposing faces
 but I still see wobbling.  I've basically exhausted all of my attempts at
 this problem.

 Any help or suggestions would be greatly appreciated.

 Sean

 
 Create a cool, new character for your Windows Live™ Messenger. Check it out
 --
 OpenSolaris 2009.06 is a cutting edge operating system for enterprises
 looking to deploy the next generation of Solaris that includes the latest
 innovations from Sun and the OpenSource community. Download a copy and
 enjoy capabilities such as Networking, Storage and Virtualization.
 Go to: http://p.sf.net/sfu/opensolaris-get
 ___
 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


--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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


Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Warren DeLano
Sean,
 
orient selection
 
followed by a 90 degree rotation about the camera's ]X-axis should give you a 
couple of views with the desired characteristics.
 
turn x, 90
 
Cheers,
Warren
 



From: gilleain torrance [mailto:gilleain.torra...@gmail.com]
Sent: Wed 6/3/2009 5:02 AM
To: pymol-users
Subject: Re: [PyMOL] Principal Axes of Rotation



Hi,

I might be wrong, but might it be that you need the axis through the
structure that minimises the distance of all the points to it. Or, to
put it another way, the least-square-plane through the structure, the
normal to that plane, and a thir axis perpendicular to both.

If this is the case, you are in luck, as I already made such a thing:

  http://pymolwiki.org/index.php/Bounding_Box

this script was designed to make a minimal bounding box (not just an
axis-aligned one). I think that it does this, although my geometry is
not good enough to know if I am right.

Anyway, you already mention joining opposite faces of the box - well
just use the axes calculated half-way through the first function.

Hope this helps.

gilleain

On Tue, Jun 2, 2009 at 11:41 PM, Sean Law magic...@hotmail.com wrote:
 Hi,

 For the past couple of days I've been trying to find a way to rotate an
 object in order to show a front and side profile for publication.  However,
 rotating with respect to the x, y, or z axes does not produce the correct
 result (even after moving the center-of-mass of the structure to the
 origin).  What I need is a way to determine the principal axes of rotation
 for a given selection so that rotation about any one of these axes does not
 produce a wobble effect.  I've even tried drawing a rectangular box around
 the object and then drawing an axes through the centroids of opposing faces
 but I still see wobbling.  I've basically exhausted all of my attempts at
 this problem.

 Any help or suggestions would be greatly appreciated.

 Sean

 
 Create a cool, new character for your Windows Live(tm) Messenger. Check it out
 --
 OpenSolaris 2009.06 is a cutting edge operating system for enterprises
 looking to deploy the next generation of Solaris that includes the latest
 innovations from Sun and the OpenSource community. Download a copy and
 enjoy capabilities such as Networking, Storage and Virtualization.
 Go to: http://p.sf.net/sfu/opensolaris-get
 ___
 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


--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
___
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





--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get___
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

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Sean Law
 heavyweights like Barbarian
 Group, R/GA,  Big Spaceship. http://www.creativitycat.com
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
 
 
 
 
 
 -- next part --
 An HTML attachment was scrubbed...
 
 --
 
 Message: 2
 Date: Wed, 3 Jun 2009 11:01:59 +0100
 From: gilleain torrance gilleain.torra...@gmail.com
 Subject: Re: [PyMOL] Principal Axes of Rotation
 To: pymol-users pymol-users@lists.sourceforge.net
 Message-ID:
   d0d153660906030301k2467519m2b742192248fa...@mail.gmail.com
 Content-Type: text/plain; charset=windows-1252
 
 Hi,
 
 I might be wrong, but might it be that you need the axis through the
 structure that minimises the distance of all the points to it. Or, to
 put it another way, the least-square-plane through the structure, the
 normal to that plane, and a thir axis perpendicular to both.
 
 If this is the case, you are in luck, as I already made such a thing:
 
   http://pymolwiki.org/index.php/Bounding_Box
 
 this script was designed to make a minimal bounding box (not just an
 axis-aligned one). I think that it does this, although my geometry is
 not good enough to know if I am right.
 
 Anyway, you already mention joining opposite faces of the box - well
 just use the axes calculated half-way through the first function.
 
 Hope this helps.
 
 gilleain
 
 On Tue, Jun 2, 2009 at 11:41 PM, Sean Law magic...@hotmail.com wrote:
  Hi,
 
  For the past couple of days I've been trying to find a way to rotate an
  object in order to show a front and side profile for publication.? However,
  rotating with respect to the x, y, or z axes does not produce the correct
  result (even after moving the center-of-mass of the structure to the
  origin).? What I need is a way to determine the principal axes of rotation
  for a given selection so that rotation about any one of these axes does not
  produce a wobble effect.? I've even tried drawing a rectangular box around
  the object and then drawing an axes through the centroids of opposing faces
  but I still see wobbling.? I've basically exhausted all of my attempts at
  this problem.
 
  Any help or suggestions would be greatly appreciated.
 
  Sean
 
  
  Create a cool, new character for your Windows Live? Messenger. Check it out
  --
  OpenSolaris 2009.06 is a cutting edge operating system for enterprises
  looking to deploy the next generation of Solaris that includes the latest
  innovations from Sun and the OpenSource community. Download a copy and
  enjoy capabilities such as Networking, Storage and Virtualization.
  Go to: http://p.sf.net/sfu/opensolaris-get
  ___
  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
 
 
 
 
 --
 
 Message: 3
 Date: Wed, 3 Jun 2009 06:05:26 -0700
 From: Warren DeLano war...@delsci.com
 Subject: Re: [PyMOL] Principal Axes of Rotation
 To: gilleain torrance gilleain.torra...@gmail.com,pymol-users
   pymol-users@lists.sourceforge.net
 Message-ID:
   896b75251ba19745a529b1b867893fa50bd...@planet.delsci.local
 Content-Type: text/plain; charset=iso-8859-1
 
 Sean,
  
 orient selection
  
 followed by a 90 degree rotation about the camera's ]X-axis should give you a 
 couple of views with the desired characteristics.
  
 turn x, 90
  
 Cheers,
 Warren
  
 
 
 
 From: gilleain torrance [mailto:gilleain.torra...@gmail.com]
 Sent: Wed 6/3/2009 5:02 AM
 To: pymol-users
 Subject: Re: [PyMOL] Principal Axes of Rotation
 
 
 
 Hi,
 
 I might be wrong, but might it be that you need the axis through the
 structure that minimises the distance of all the points to it. Or, to
 put it another way, the least-square-plane through the structure, the
 normal to that plane, and a thir axis perpendicular to both.
 
 If this is the case, you are in luck, as I already made such a thing:
 
   http://pymolwiki.org/index.php/Bounding_Box
 
 this script was designed to make a minimal bounding box (not just an
 axis-aligned one). I think that it does this, although my geometry is
 not good enough to know if I am right.
 
 Anyway, you already mention joining opposite faces of the box - well
 just use the axes calculated half-way through the first function.
 
 Hope this helps.
 
 gilleain
 
 On Tue, Jun 2, 2009 at 11:41 PM, Sean Law magic...@hotmail.com wrote:
  Hi,
 
  For the past couple of days I've been trying to find a way to rotate an
  object in order to show a front and side profile for publication.  However,
  rotating with respect to the x, y, or z axes does not produce the correct
  result

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Sean Law

Matt,

Unfortunately, as a somewhat experienced PyMOL user, I already have 
orthoscopic view turned off (along with depth cue turned off).  Thanks for 
your suggestion though.

Sean

 Subject: Re: [PyMOL] Principal Axes of Rotation
 To: magic...@hotmail.com
 CC: pymol-users@lists.sourceforge.net
 From: matthew.frank...@imclone.com
 Date: Wed, 3 Jun 2009 15:13:25 -0400
 
 
 
 Sean Law magic...@hotmail.com wrote on 06/03/2009 12:52:45 PM:
 
  Warren,
 
  After a deja vu moment, I realized that I had posed a similar
  question to you before about this (although, we didn't really have a
  resolution then).  I had already tried your suggestion before I had
  posted to the mailing list but perhaps an example would be more
  appropriate in terms of what I'm seeing.
 
 
 (snip - 180 degree rotation around x axis)
 
  7) You will now see that after 2 turns that the O3' atom is situated
  well past the vertical (imaginary) line drawn by the position of
  your cursor on your screen
 
 
 This is almost certainly due to the perspective view which is on by
 default.  As atoms move closer to your viewpoint, they appear bigger, and
 the inter-atomic distances also appear bigger, just as in real life.  So,
 an atom which is far away and at a particular (apparent) x position, will
 be farther away from the center of the screen once you've done your 180
 degree rotation.
 
 This drawing mode was created to make structures look more realistic.  If
 you don't like it, you can turn it off: under Display, choose
 Orthoscopic view.  That should eliminate your wobble effect.
 
 
 Hope that helps,
 
 Matt
 
 --
 Matthew Franklin , Ph.D.
 Senior Scientist, ImClone Systems,
 a wholly owned subsidiary of Eli Lilly  Company
 180 Varick Street, 6th floor
 New York, NY 10014
 phone:(917)606-4116   fax:(212)645-2054
 
 
 Confidentiality Note:  This e-mail, and any attachment to it, contains
 privileged and confidential information intended only for the use of the
 individual(s) or entity named on the e-mail.  If the reader of this e-mail
 is not the intended recipient, or the employee or agent responsible for
 delivering it to the intended recipient, you are hereby notified that
 reading it is strictly prohibited.  If you have received this e-mail in
 error, please immediately return it to the sender and delete it from your
 system.  Thank you.
 

_
Attention all humans. We are your photos. Free us.
http://go.microsoft.com/?linkid=9666046--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get___
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

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Matthew . Franklin


Sean Law magic...@hotmail.com wrote on 06/03/2009 12:52:45 PM:

 Warren,

 After a deja vu moment, I realized that I had posed a similar
 question to you before about this (although, we didn't really have a
 resolution then).  I had already tried your suggestion before I had
 posted to the mailing list but perhaps an example would be more
 appropriate in terms of what I'm seeing.


(snip - 180 degree rotation around x axis)

 7) You will now see that after 2 turns that the O3' atom is situated
 well past the vertical (imaginary) line drawn by the position of
 your cursor on your screen


This is almost certainly due to the perspective view which is on by
default.  As atoms move closer to your viewpoint, they appear bigger, and
the inter-atomic distances also appear bigger, just as in real life.  So,
an atom which is far away and at a particular (apparent) x position, will
be farther away from the center of the screen once you've done your 180
degree rotation.

This drawing mode was created to make structures look more realistic.  If
you don't like it, you can turn it off: under Display, choose
Orthoscopic view.  That should eliminate your wobble effect.


Hope that helps,

Matt

--
Matthew Franklin , Ph.D.
Senior Scientist, ImClone Systems,
a wholly owned subsidiary of Eli Lilly  Company
180 Varick Street, 6th floor
New York, NY 10014
phone:(917)606-4116   fax:(212)645-2054


Confidentiality Note:  This e-mail, and any attachment to it, contains
privileged and confidential information intended only for the use of the
individual(s) or entity named on the e-mail.  If the reader of this e-mail
is not the intended recipient, or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that
reading it is strictly prohibited.  If you have received this e-mail in
error, please immediately return it to the sender and delete it from your
system.  Thank you.


--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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


Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Warren DeLano
Sean,
 
Apologies for not understanding...
 
You definitely need orthoscopic, but there's more to it. 
 
set orthoscopic
 
fetch 1bna, async=0
 
orient 1bna
 
cmd.matrix_copy(None,1bna)
 
reset
 
from chempy.cpv import average
 
cmd.origin(position=average(*cmd.get_extent()))

 
center origin
 
# now, the maximum extent in the X Y planes should be invariant to 180 degree 
rotations about the Y or X axes respectively.
 
Cheers,
Warren
 
 
 



From: Sean Law [mailto:magic...@hotmail.com]
Sent: Wed 6/3/2009 12:28 PM
To: matthew.frank...@imclone.com
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Principal Axes of Rotation


Matt,

Unfortunately, as a somewhat experienced PyMOL user, I already have 
orthoscopic view turned off (along with depth cue turned off).  Thanks for 
your suggestion though.

Sean

 Subject: Re: [PyMOL] Principal Axes of Rotation
 To: magic...@hotmail.com
 CC: pymol-users@lists.sourceforge.net
 From: matthew.frank...@imclone.com
 Date: Wed, 3 Jun 2009 15:13:25 -0400
 
 
 
 Sean Law magic...@hotmail.com wrote on 06/03/2009 12:52:45 PM:
 
  Warren,
 
  After a deja vu moment, I realized that I had posed a similar
  question to you before about this (although, we didn't really have a
  resolution then). I had already tried your suggestion before I had
  posted to the mailing list but perhaps an example would be more
  appropriate in terms of what I'm seeing.
 
 
 (snip - 180 degree rotation around x axis)
 
  7) You will now see that after 2 turns that the O3' atom is situated
  well past the vertical (imaginary) line drawn by the position of
  your cursor on your screen
 
 
 This is almost certainly due to the perspective view which is on by
 default. As atoms move closer to your viewpoint, they appear bigger, and
 the inter-atomic distances also appear bigger, just as in real life. So,
 an atom which is far away and at a particular (apparent) x position, will
 be farther away from the center of the screen once you've done your 180
 degree rotation.
 
 This drawing mode was created to make structures look more realistic. If
 you don't like it, you can turn it off: under Display, choose
 Orthoscopic view. That should eliminate your wobble effect.
 
 
 Hope that helps,
 
 Matt
 
 --
 Matthew Franklin , Ph.D.
 Senior Scientist, ImClone Systems,
 a wholly owned subsidiary of Eli Lilly  Company
 180 Varick Street, 6th floor
 New York, NY 10014
 phone:(917)606-4116 fax:(212)645-2054
 
 
 Confidentiality Note: This e-mail, and any attachment to it, contains
 privileged and confidential information intended only for the use of the
 individual(s) or entity named on the e-mail. If the reader of this e-mail
 is not the intended recipient, or the employee or agent responsible for
 delivering it to the intended recipient, you are hereby notified that
 reading it is strictly prohibited. If you have received this e-mail in
 error, please immediately return it to the sender and delete it from your
 system. Thank you.
 




Attention all humans. We are your photos. Free us. 
http://go.microsoft.com/?linkid=9666044 
--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get___
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

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread Sean Law

Great!  I'll give that a try.

Sean

Subject: RE: [PyMOL] Principal Axes of Rotation
Date: Wed, 3 Jun 2009 12:55:51 -0700
From: war...@delsci.com
To: magic...@hotmail.com; matthew.frank...@imclone.com
CC: pymol-users@lists.sourceforge.net










Sean,
 
Apologies for not 
understanding...
 
You definitely need orthoscopic, but 
there's more to it. 
 

set orthoscopic
 
fetch 1bna, async=0
 
orient 1bna
 
cmd.matrix_copy(None,1bna)
 
reset
 
from chempy.cpv import average
 
cmd.origin(position=average(*cmd.get_extent()))

 
center origin
 
# now, the maximum extent in the X Y planes 
should be invariant to 180 degree rotations about the Y or X axes 
respectively.
 
Cheers,
Warren
 
 
 



From: Sean Law 
[mailto:magic...@hotmail.com]
Sent: Wed 6/3/2009 12:28 
PM
To: matthew.frank...@imclone.com
Cc: 
pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Principal Axes 
of Rotation


Matt,

Unfortunately, as a somewhat 
experienced PyMOL user, I already have orthoscopic view turned off (along 
with 
depth cue turned off).  Thanks for your suggestion 
though.

Sean

 Subject: Re: [PyMOL] Principal Axes of 
Rotation
 To: magic...@hotmail.com
 CC: 
pymol-users@lists.sourceforge.net
 From: 
matthew.frank...@imclone.com
 Date: Wed, 3 Jun 2009 15:13:25 
-0400
 
 
 
 Sean Law magic...@hotmail.com 
wrote on 06/03/2009 12:52:45 PM:
 
  Warren,
 

  After a deja vu moment, I realized that I had posed a 
similar
  question to you before about this (although, we didn't 
really have a
  resolution then). I had already tried your suggestion 
before I had
  posted to the mailing list but perhaps an example 
would be more
  appropriate in terms of what I'm seeing.
 

 
 (snip - 180 degree rotation around x axis)
 

  7) You will now see that after 2 turns that the O3' atom is 
situated
  well past the vertical (imaginary) line drawn by the 
position of
  your cursor on your screen
 
 

 This is almost certainly due to the perspective view which is on 
by
 default. As atoms move closer to your viewpoint, they appear bigger, 
and
 the inter-atomic distances also appear bigger, just as in real life. 
So,
 an atom which is far away and at a particular (apparent) x position, 
will
 be farther away from the center of the screen once you've done your 
180
 degree rotation.
 
 This drawing mode was created to 
make structures look more realistic. If
 you don't like it, you can turn 
it off: under Display, choose
 Orthoscopic view. That should 
eliminate your wobble effect.
 
 
 Hope that 
helps,
 
 Matt
 
 --
 Matthew Franklin , 
Ph.D.
 Senior Scientist, ImClone Systems,
 a wholly owned 
subsidiary of Eli Lilly  Company
 180 Varick Street, 6th 
floor
 New York, NY 10014
 phone:(917)606-4116 
fax:(212)645-2054
 
 
 Confidentiality Note: This e-mail, 
and any attachment to it, contains
 privileged and confidential 
information intended only for the use of the
 individual(s) or entity 
named on the e-mail. If the reader of this e-mail
 is not the intended 
recipient, or the employee or agent responsible for
 delivering it to the 
intended recipient, you are hereby notified that
 reading it is strictly 
prohibited. If you have received this e-mail in
 error, please 
immediately return it to the sender and delete it from your
 system. 
Thank you.
 



Attention all humans. We are your photos. Free us.
_
We are your photos. Share us now with Windows Live Photos.
http://go.microsoft.com/?linkid=9666047--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get___
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