moleculekit.representations module#
- class moleculekit.representations.Representations(mol)#
Bases:
objectClass that stores representations for Molecule.
Examples
>>> from moleculekit.molecule import Molecule >>> mol = tryp.copy() >>> mol.reps.add('protein', 'NewCartoon') >>> print(mol.reps) rep 0: sel='protein', style='NewCartoon', color='Name' >>> mol.view() >>> mol.reps.remove()
- add(sel=None, style=None, color=None, frames=None, opacity=None)#
Adds a new representation for Molecule.
- Parameters:
sel (str) – Atom selection string for the representation. See more here
color (str or int) – Coloring mode (str) or ColorID (int). See more here.
frames (list) – List of frames to visualize with this representation. If None it will visualize the current frame only.
opacity (float) – Opacity of the representation. 0 is fully transparent and 1 is fully opaque.
- append(reps)#
- list()#
Lists all representations. Equivalent to using print.