Difference between revisions of "Centroid"
(What this script is actually computing is the centroid not the center of mass. The center of mass is the mass-weighted average of the coordinates.)
(see also centerofmass)
|(One intermediate revision by one other user not shown)|
|Line 27:||Line 27:|
Latest revision as of 15:53, 12 October 2016
|This code has been put under version control in the project Pymol-script-repo|
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.
centroid (selection=PyMOLSelection), [center=boolean]
# get the centroid of the polymer import centroid fetch 4ins, async=0 centroid polymer # move some 'ligand' to the origin centroid ligand, center=1