moleculekit.vmdgraphics module#

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

Bases: VMDGraphicObject

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

Bases: VMDGraphicObject

class moleculekit.vmdgraphics.VMDCylinder(start, end, color='red', radius=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)#

Quote a numpy 3-vector as a tcl list.

Parameters:

v (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, vecMin, vecRes, color=8, isovalue=0.5, name=None, draw='solid')#

Bases: VMDGraphicObject

delete()#

Undisplay and delete the isosurface from the viewer.

class moleculekit.vmdgraphics.VMDLabels(mol, selection, molid='top', textsize=0.5, textcolor='green')#

Bases: VMDGraphicObject

count = 0#
delete()#

Undisplay and delete the atom labels from the viewer.

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

Bases: VMDGraphicObject

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

Bases: VMDGraphicObject