schrodinger.graphics3d.tube module

Module for drawing a tube in the Workspace.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.graphics3d.tube.MaestroTube(point1, point2, color, radius, opacity=1.0)

Bases: Primitive

A graphical tube (bond) drawn in the Workspace

__init__(point1, point2, color, radius, opacity=1.0)

Create a Tube instance

Parameters:
  • point1 (list) – The [X, Y, Z] points of the first tube end

  • point2 (list) – The [X, Y, Z] points of the other tube end

  • color (tuple) – A tuple of (R, G, B) values between 0 and 1

  • radius (float) – The radius of the tube in ?Angstroms?

calculateXYZBox()

Pre-calculate some data used in the bounding box function

createObject()

Create a graphics object

setColor(color)

Set the color of the object

Parameters:

color (tuple) – The (R, G, B) values in the range of 0-1

setRadius(radius)

Set the radius of the object

Parameters:

radius (float) – The radius of the object

setPoints(point1, point2)

Set the coordinates of the tube ends

Parameters:
  • point1 (list) – The [X, Y, Z] points of the first tube end

  • point2 (list) – The [X, Y, Z] points of the other tube end

setEntryID(eid)

Set the entry id of the object. This is used for placing the workspace graphics when the workspace is tiled.

Parameters:

eid (str) – The entry ID to associate the graphics with