moleculekit.pymolgraphics module#

moleculekit.pymolgraphics.draw_cylinder(objname, xyz1, xyz2, rgb1, rgb2=None, alpha=1, radius=2)#

Draw a cylinder as a CGO object in PyMOL.

Parameters:
  • objname (str) – The name to give to the created PyMOL object.

  • xyz1 (list) – The starting coordinates of the cylinder as [x, y, z].

  • xyz2 (list) – The ending coordinates of the cylinder as [x, y, z].

  • rgb1 (list) – The color of the starting cap as [red, green, blue].

  • rgb2 (list) – The color of the ending cap as [red, green, blue]. If None the same color as rgb1 is used.

  • alpha (float) – The opacity of the cylinder.

  • radius (float) – The radius of the cylinder.

Returns:

objname – The name of the created PyMOL object.

Return type:

str

moleculekit.pymolgraphics.group_objects(groupname, objects)#

Group several PyMOL objects together under a single name.

Parameters:
  • groupname (str) – The name of the group to create or add to.

  • objects (list) – A list of names of the PyMOL objects to add to the group.