This is a read-only mirror of pymolwiki.org

Difference between revisions of "Com"

From PyMOL Wiki
Jump to navigation Jump to search
m (moved COM to Com: small letters)
m (1 revision)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Infobox script-repo
+
#REDIRECT [[Centroid]]
|type      = Python Module
 
|filename  = com.py
 
|author    = [[User:Inchoate|Jason Vertrees]]
 
|license  = -
 
}}
 
 
 
== 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 ==
 
<source lang="python">
 
COM (selection=PyMOLSelection), [center=boolean]
 
</source>
 
 
 
== Examples ==
 
<source lang="python">
 
# get the COM of the polymer
 
import com
 
fetch 4ins, async=0
 
COM polymer
 
 
 
# move some 'ligand' to the origin
 
COM ligand, center=1
 
</source>
 
 
 
===See Also===
 
 
 
[[Center_Of_Mass]]
 
 
 
[[Category:Script_Library|CenterOfMass]]
 
[[Category:Structural_Biology_Scripts]]
 

Latest revision as of 01:04, 19 October 2015

Redirect to: