schrodinger.graphics3d.ellipsoid module

Maestro 3D ellipsoid.

The ellipsoid module allows creation of ellipsoids. Clients add ellipsoids to Group instances, and Maesto draws them.

Control over the center, principal axes, and color of the ellipsoid are provided.

To add any number of ellipsoids, create the Ellipsoid instance and add it to a Group instance. Ellipsoids can be shown or hidden through the Group instance.

Note that this mechanism works for small numbers of ellipsoids (on the order of 10 or so). If we need significantly more ellipsoids than that, we will need to provide an array interface.

class schrodinger.graphics3d.ellipsoid.MaestroEllipsoid(center, r1_axis, r2_axis, r3_axis, color)

Bases: schrodinger.graphics3d.common._MaestroPrimitiveMixin, schrodinger.graphics3d.common.Primitive

Class to create a 3D ellipsoid in Maestro. This ellipsoid will be drawn at the appropriate time in Maestro to interact properly with transparent objects.

Ellipsoids should be added to a Group and drawing done via the Group. See Group documentation.

API Example:

import schrodinger.maestro.maestro as maestro
import schrodinger.graphics3d.common as common
import schrodinger.graphics3d.ellipsoid as ellipsoid

ellipsoid_grp = common.Group()
st = maestro.workspace_get()
for at in st.atom:
    ellips = ellipsoid.MaestroEllipsoid(
        center=(at.x, at.y, at.z)
        r1_axis=(1.0, 0.0, 0.0),
        r2_axis=(0.0, 0.5, 0.0),
        r3_axis=(0.0, 0.0, 1.0),
        color=(1.0, 0.0, 0.0, 1.0)
    # Add the primitive to the container.

# Unlike Ellipsoid, MaestroEllipsoid simply needs to be shown to be
#  drawn.
# No special callback like there is for Ellipsoids is needed.

# Hide the markers.

# Remove the markers
__init__(center, r1_axis, r2_axis, r3_axis, color)

Constructor requires:

  • center (list(float, float, float)) – List of 3 Angstrom values indicating the center coordinate of the ellipsoid.

  • r1_axis – List of 3 Angstrom values indicating one of the principal axes of the ellipsoid. None of the axes can be all zeros.

  • r2_axis – List of 3 Angstrom values indicating one of the principal axes of the ellipsoid. None of the axes can be all zeros.

  • r3_axis – List of 3 Angstrom values indicating one of the principal axes of the ellipsoid. None of the axes can be all zeros.

  • color (list(float, float, float, float)) – The RGBA color of the ellipsoid. All components must be in the range 0.0 to 1.0.

setXYZCoords(x, y, z)
property x

Get X coordinate

property b
property g

Called when the group of this object is hidden. Hide the Maestro object(s).


Called when the group of this object is shown. Show the Maestro object, if we are being shown.


Hide the object. It will not be drawn when the group is drawn.


Returns True if this object’s group is shown. False otherwise.


Returns True if this object shown. False otherwise.

property material
property opacity
property persistent_name
property pick_category
property pick_id
property r

Sets entry ID for Maestro object (necessary to render in tile-by-entry mode.


entry_id (str) – Object’s entry ID.

setGlowColor(r, g, b)

Sets glow color for the object.

  • r (float) – Red component of glow color [0.0 .. 1.0]

  • g (float) – Green component of glow color [0.0 .. 1.0]

  • b (float) – Blue component of glow color [0.0 .. 1.0]


Enables or disables glow effect for the object.


is_glowing (bool) – Whether the object is glowing.

setRGBColors(r, g, b, a=None)
setRightClickOnGObject(pymodule, pyfunc)

Sets the python callback which should be called whenever given graphics object is right clicked.

  • pymodule (str) – Python module

  • pyfunc (str) – Python function


Display this object, if it was hidden

property y

Get Y coordinate

property z

Get Z coordinate