schrodinger.application.watermap.shapes module

Module containing all table functionality for the WaterMap results GUI.

class schrodinger.application.watermap.shapes.ShapeFactory(entry_id, shape_index, center, radius=0.2, color='red', resolution=20, opacity=0.8, style=1, by_entry=False)

Bases: object

Class to create a 3D object from one of the available 3D objects in schrodinger.graphics3d. This class unifies the needed arguments regardless of object type. For example a schrodinger.graphics3d.box.Box uses the keyword extents but this class will convert radius to extents.

__init__(entry_id, shape_index, center, radius=0.2, color='red', resolution=20, opacity=0.8, style=1, by_entry=False)
Parameters
  • center (list of 3 floats) – The x, y, z coordinates of the HS the shape will be added to.

  • radius (float) – The radius of the hydration site. Default: 0.2 (“off”)

  • by_entry (bool) – Whether the shapes will be singular or different based on entry id.

property obj

Property that returns the shape object. This needs to be set as a property and not in the init or there will be references left to the object and their clear method will not clear them from the workspace.

sphere()

Return a sphere.MaestroSphere object

box()

Return a polyhedron.Cube object

tetrahedron()

Return a polyhedron.Tetrahedron object

octahedron()

Return a polyhedron.Octahedron object

dodecahedron()

Return a polyhedron.Dodecahedron object

icosahedron()

Return a polyhedron.Icosahedron object

schrodinger.application.watermap.shapes.get_absolute_free_ratio(delta_dG)

Normalize the difference in free energy to 0-1 (absolute)

Returns

Normalized delta_dG in range [0.0-1.0]

Return type

float

schrodinger.application.watermap.shapes.get_RGB_free(free_ratio, red_blue=False)

Get the RGB corresponding to the normalized free energy difference

Parameters
  • free_ratio (float) – free energy [0.0, 1.0]

  • red_blue (bool) – Whether to use blue for more negative free ratio (instead of the default green)

schrodinger.application.watermap.shapes.get_absolute_enthalpy_entropy_ratio(delta_enthalpy, delta_entropy)

Normalize the delta enthalpy and delta entropy values to 0-1 (absolute)

Returns

Normalized delta enthalpy and delta entropy in range [0.0-1.0]

Return type

tuple(float, float)

schrodinger.application.watermap.shapes.get_RGB_enthalpy_entropy(enthalpyr, entropyr)

Returns r, g, b based on enthalpyr and entropyr.

Parameters
  • enthalpyr (float (>= 0.0)) – relative enthalpy within range of (0, 1.0)

  • entropyr (float (>=0.0)) – relative entropy within range of (0, 1.0)

schrodinger.application.watermap.shapes.get_color_by_entry(entry_id, all_entry_ids, *, colors=[user8, user22, hot pink, userW, red16, userG, userH, userY, blue18, dim gray, userY, blue13])

Get a color from the entry color scheme relative to entry_id’s sorted position in all_entry_ids

Parameters
  • entry_id (str or int) – The entry ID to get the color for

  • all_entry_ids (typing.Iterable[str | int]) – Iterable of all entry IDs

  • colors (typing.Sequence) – Colors to use (defaults to ENTRY_SCHEME_COLORS)

Returns

Color item from colors

Return type

schrodinger.structutils.color.Color