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.

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