This is a read-only mirror of pymolwiki.org

Difference between revisions of "Centroid"

From PyMOL Wiki
Jump to navigation Jump to search
 
Line 31: Line 31:
 
[[Category:Script_Library|CenterOfMass]]
 
[[Category:Script_Library|CenterOfMass]]
 
[[Category:Structural_Biology_Scripts]]
 
[[Category:Structural_Biology_Scripts]]
 +
[[Category:Pymol-script-repo]]

Revision as of 15:02, 15 January 2012

Type Python Module
Download com.py
Author(s) Jason Vertrees
License BSD
This code has been put under version control in the project Pymol-script-repo

Overview

COM is a small script that returns the value of the center of mass of your selection. It also can translate the object of that selection to the origin.

Syntax

COM (selection=PyMOLSelection), [center=boolean]

Examples

# get the COM of the polymer
import com
fetch 4ins, async=0
COM polymer

# move some 'ligand' to the origin
COM ligand, center=1

See Also

Center_Of_Mass