This is a read-only mirror of pymolwiki.org

Difference between revisions of "Com"

From PyMOL Wiki
Jump to navigation Jump to search
m (1 revision)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox script-repo
+
#REDIRECT [[Centroid]]
|type      = module
 
|filename  = com.py
 
|author    = [[User:Inchoate|Jason Vertrees]]
 
|license  = BSD
 
}}
 
 
 
== 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]]
 
[[Category:Pymol-script-repo]]
 

Latest revision as of 01:04, 19 October 2015

Redirect to: