schrodinger.graphics3d.hemisphere module

Maestro 3D hemispheres.

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

Control over the center, radius, color, resolution and opacity of a hemisphere are provided. See the Hemisphere class for more info.

To add any number of hemispheres, create the Hemisphere instance and add it to a Group instance. Hemispheres can be shown or hidden through the Group instance.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.graphics3d.hemisphere.MaestroHemisphere(center=None, color=None, direction=(0.0, 0.0, 1.0), radius=None, opacity=1.0, resolution=16, angle_dep_transparency=False)

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

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

Hemispheres 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.hemisphere as hemisphere

hemisphere_grp = common.Group()
st = maestro.workspace_get()
for at in st.atom:
    hemisph = hemisphere.MaestroHemisphere(
        center=(at.x, at.y, at.z)
    # Add the primative to the container.

# Unlike Hemisphere MaestroHemisphere simply needs to be shown to be
#  drawn.
# No special callback like there is for Hemispheres is needed.

# Hide the markers.

# Remove the markers
__init__(center=None, color=None, direction=(0.0, 0.0, 1.0), radius=None, opacity=1.0, resolution=16, angle_dep_transparency=False)

Constructor requires:


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

color: One of:

Color object Color name (string) Tuple of (R, G, B) (each 0.0-1.0)

radius: radius of the hemisphere in Angstroms

Optional arguments:

opacity: 0.0 (transparent) through 1.0 (opaque)

Defaults to 1.0

resolution: 4 to 50

Defaults to 16

angle_dep_transparency: if true, then we modify the color of the

hemisphere based on the angle from the center

property r
property g
property b
property opacity

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 persistent_name
property pick_category
property pick_id

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

setXYZCoords(x, y, z)
property x

Get X coordinate

property y

Get Y coordinate

property z

Get Z coordinate

property radius

Get hemisphere’s radius in angstroms