schrodinger.application.bioluminate.workspacelabeler module

A module containing a class for labeling atoms in the workspace.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.bioluminate.workspacelabeler.removeBadOptions()

Test each option in DEFAULT_OPTIONS and remove any bad or deprecated ones.

class schrodinger.application.bioluminate.workspacelabeler.WorkspaceLabeler

Bases: object

Class with methods for manipulating workspace atom labels.

__init__()

Initialize self. See help(type(self)) for accurate signature.

resetLabelOptions()

Resets Maestro’s internally persistent label options to ensure consistent behavior of the labeler regardless of intervening calls to the Maestro command ‘labelatom’ that might change label options. It is generally not necessary to use this command; however it could be useful when invoking custom ‘labelatom’ commands.

saveLabelOptions(options=None)

Saves the state of all of Maestro’s ‘labelatom’ options, generally for the purpose of changing the label options by the WorkspaceLabeler class or by other Python scripts and then changing them back to their original state.

Parameters:options (dict) –

dictionary containing a set of options and values

Default: saved_options

restoreLabelOptions(options=None)

Restores the state of all of Maestro’s ‘labelatom’ options from a dictionary, generally for the purpose of restoring them to their original state.

Parameters:options (dict) –

dictionary containing a set of options and values

Default: saved_options

labelAtoms(asl, options='atomname=TRUE')

Labels the specified atoms. By default labelAtoms will label with atomname, but the label content can be customized with the options parameter.

Parameters:
  • asl (str) – ASL string specifying atoms to label
  • options (str) –
    An options string that will be passed to the Maestro
    command ‘labelatom’ to specify the labeling behavior. See the Maestro Command Reference for full documentation.

    Default: ‘atomname=TRUE’

clearLabels(asl)

Deletes all labels from the specified atoms.

Parameters:asl (str) – ASL string specifying atoms to remove labels from
labelResidues(asl, options='resname=TRUE resnum=TRUE')

Labels the alpha carbon of every residue that has at least one atom in the specified ASL. This means that labels may be added to atoms that are outside the ASL.

By default labelAtoms will label each CA with the 3-letter residue code and residue number, but the label content can be customized with the options parameter.

Parameters:
  • asl (str) – ASL string specifying atoms that are in residues to label
  • options (str) –
    An options string that will be passed to the Maestro
    command ‘labelatom’ to specify the labeling behavior. See the Maestro Command Reference for full documentation.

    Default: ‘resname=TRUE resnum=TRUE’

labelChains(asl, options='chain=TRUE')

Labels the first and last alpha carbon within the specified ASL of each chain that has at least one atom specified by the ASL. First and last CA are determined by residue numbering.

By default, labelChains will label each of the two CA’s with the chain name, but the label content can be customized with the options paramter.

Parameters:
  • asl (str) – ASL string specifying atoms that are in residues to label
  • options (str) –
    An options string that will be passed to the Maestro
    command ‘labelatom’ to specify the labeling behavior. See the Maestro Command Reference for full documentation.

    Default: ‘chain=TRUE’

hideLabels(asl)

Hides the labels on the specified atoms. The difference between hideLabels() and clearLabels() is that labels that have been hidden can be unhidden. Any time a hidden label is replaced or updated, the new label is visible, as in PyMol. Hidden labels can also be cleared; they do not then reappear on showLabels().

Parameters:asl (str) – ASL string specifying atoms to hide labels on
showLabels(asl)

Unhides previously hidden labels on the specified atoms.

Parameters:asl (str) – ASL string specifying atoms to unhide labels on
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.workspacelabeler', '__doc__': '\n Class with methods for manipulating workspace atom labels.\n\n ', '__init__': <function WorkspaceLabeler.__init__>, 'resetLabelOptions': <function WorkspaceLabeler.resetLabelOptions>, 'saveLabelOptions': <function WorkspaceLabeler.saveLabelOptions>, 'restoreLabelOptions': <function WorkspaceLabeler.restoreLabelOptions>, 'labelAtoms': <function WorkspaceLabeler.labelAtoms>, 'clearLabels': <function WorkspaceLabeler.clearLabels>, 'labelResidues': <function WorkspaceLabeler.labelResidues>, 'labelChains': <function WorkspaceLabeler.labelChains>, 'hideLabels': <function WorkspaceLabeler.hideLabels>, 'showLabels': <function WorkspaceLabeler.showLabels>, '__dict__': <attribute '__dict__' of 'WorkspaceLabeler' objects>, '__weakref__': <attribute '__weakref__' of 'WorkspaceLabeler' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.bioluminate.workspacelabeler'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)