This is a read-only mirror of pymolwiki.org

Difference between revisions of "Centroid"

From PyMOL Wiki
Jump to navigation Jump to search
m (moved Com to Centroid)
m (17 revisions)
 
(One intermediate revision by one other user not shown)
Line 27: Line 27:
 
===See Also===
 
===See Also===
  
[[Center_Of_Mass]]
+
* [[centerofmass]] (new command in PyMOL 1.7.2)
 +
* [[Center_Of_Mass]]
  
 
[[Category:Script_Library|CenterOfMass]]
 
[[Category:Script_Library|CenterOfMass]]
 
[[Category:Structural_Biology_Scripts]]
 
[[Category:Structural_Biology_Scripts]]
 
[[Category:Pymol-script-repo]]
 
[[Category:Pymol-script-repo]]

Latest revision as of 00:06, 17 October 2016

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

Overview

Centroid is a small script that returns the value of the geometric center (or centroid) of your selection. It also can translate the object of that selection to the origin.

Syntax

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

Examples

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

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

See Also