This script adds pymol commands for calculating and viewing the principal moments of inertia of a structure.
The main command is principalellipsoid
, provided by the file principal_axes.py
. This draws the principal moments as three orthogonal axes.
The script is compatible with ellipsoid.py
, which adds the ability to draw ellipsoids to PyMOL. The ellipsoid script should be loaded before principal_axes, and adds the principalellipsoid
command to approximate the structure as an ellipsoid with radii given by the principal moments of inertia.
See help principalellipsoid
for details about the supported options.
with the cryo-EM structure of chicken gizzard smooth muscle alpha-actinin (1SJJ):
# ellipsoid is optional, but should be loaded first
run ellipsoid.py
run principal_axes.py
# load a structure
fetch 1SJJ
# display principal axes
principalaxes 1SJJ
# Display ellipsoid
principalellipsoid 1SJJ
set cgo_transparency, .3, ellipsoid
The first version of this script had been posted in the Biostar forum as an answer to Question: Protein 3D structure principal axes
This was adapted into a python script to generate .pml files by @pierrepo.
The code was then modified to allow use directly from pymol by @sbliven