This is a read-only mirror of pymolwiki.org

Difference between revisions of "Centerofmass"

From PyMOL Wiki
Jump to navigation Jump to search
(created)
 
m (1 revision)
 
(No difference)

Latest revision as of 00:06, 17 October 2016

The centerofmass command calculates the center of mass for an atom selection. It considers atom mass and occupancy.

New in PyMOL 1.7.2. See the center_of_mass script for older PyMOL versions.

Usage

centerofmass [ selection [, state ]]

Arguments

  • selection = str: atom selection {default: all}
  • state = int: object state, -1 for current state, 0 for all states {default: -1}

Example

PyMOL> fetch 1ubq, async=0
PyMOL> centerofmass
 Center of Mass: [  30.004,  28.522,  14.701]

Python API

cmd.centerofmass() returns a list of 3 floats.

See Also