Centroid: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
{{Infobox script-repo | |||
|type = Python Module | |||
|filename = com.py | |||
|author = [[User:Inchoate|Jason Vertrees]] | |||
|license = - | |||
}} | |||
== Overview == | == 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. | [[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. | ||
Line 16: | Line 23: | ||
# move some 'ligand' to the origin | # move some 'ligand' to the origin | ||
COM ligand, center=1 | COM ligand, center=1 | ||
</source> | </source> | ||
Revision as of 06:49, 9 December 2011
Type | Python Module |
---|---|
Download | com.py |
Author(s) | Jason Vertrees |
License | - |
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