Transform selection

From PyMOLWiki
Revision as of 18:14, 10 March 2008 by Inchoate (talk | contribs)
Jump to navigation Jump to search

Overview

transform_selection applies a transformation matrix to a selection. The matrix should actually be passed in as a single list -- not a list of lists.

Details

When homogenous == 0: the matrix needed is a 4x4 matrix, where the upper-left 3x3 quadrant is a typical rotation matrix. The 4th row and 4th column specify the pre- and post-translation vectors. So, you can translate+rotate+translate with this one matrix.

Example

cmd.transform_selection("a", [[x,x,x,x],[x,x,x,x],[x,x,x,x],[x,x,x,x]],
homogenous=1)

See Also

transform_odb