moleculekit.vmdgraphics module#

class moleculekit.vmdgraphics.VMDBox(box, color: str = 'red')#

Bases: VMDGraphicObject

class moleculekit.vmdgraphics.VMDConvexHull(mol: Molecule, style: str = '', preamble: str = '', solid: bool = False)#

Bases: VMDGraphicObject

class moleculekit.vmdgraphics.VMDCylinder(start, end, color: str = 'red', radius: float = 1)#

Bases: VMDGraphicObject

class moleculekit.vmdgraphics.VMDGraphicObject(data)#

Bases: object

A superclass from which VMD graphic objects (e.g. the convex hull) inherit.

Subclasses build a tcl script that draws a graphic primitive (a box, sphere, cylinder, convex hull, isosurface, …) and send it to the current VMD viewer. Each object is assigned a unique id so that it can later be removed with the delete() method.

counter = 1#
delete()#

Undisplay and delete a graphic object.

static tq(v: ndarray) → str#

Quote a numpy 3-vector as a tcl list.

Parameters:

v (np.ndarray) – The vector to format.

Returns:

quoted – The vector formatted as a brace-quoted tcl list, e.g. "{ 1 2 3 }".

Return type:

str

class moleculekit.vmdgraphics.VMDIsosurface(arr: ndarray, vecMin: ndarray, vecRes: ndarray, color: int = 8, isovalue: float = 0.5, name: str | None = None, draw: str = 'solid')#

Bases: VMDGraphicObject

delete()#

Undisplay and delete the isosurface from the viewer.

class moleculekit.vmdgraphics.VMDLabels(mol: Molecule, selection: str | ndarray, molid: str = 'top', textsize: float = 0.5, textcolor: str = 'green')#

Bases: VMDGraphicObject

count = 0#
delete()#

Undisplay and delete the atom labels from the viewer.

class moleculekit.vmdgraphics.VMDSphere(xyz, color: str = 'red', radius: float = 1)#

Bases: VMDGraphicObject

class moleculekit.vmdgraphics.VMDText(text: str, xyz, color: str = 'red')#

Bases: VMDGraphicObject