schrodinger.ui.sequencealignment.maestro module

This module implements interactions between Maestro and multiple sequence viewer.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.ui.sequencealignment.maestro.hasMaestro()[source]

Checks if the program runs from Maestro environment. Additionally, this method sets Maestro callbacks.

Return type

bool

Returns

True if run from Maestro, False otherwise.

schrodinger.ui.sequencealignment.maestro.maestroSuperposition(viewer, show_panel=True)[source]
schrodinger.ui.sequencealignment.maestro.renumberMaestroEntry(viewer, sequence, update_sequence=False)[source]

This method assigns residue numbers to corresponding structure in Maestro workspace.

It can also do reverse operation, i.e. assign atom and residue numbers to MSV sequence if “update_sequence” argument is True.

Parameters

update_sequence (boolean) – Changes seqeunce renumbering direction: when False, assigns MSV numbers to Maestro entry. When True, assigns Maestro numbers to MSV sequence.

Param

sequence: Sequence to be used for propagating colors to Maestro.

schrodinger.ui.sequencealignment.maestro.propagateColorsToMaestro(viewer, sequence, template_colors=False)[source]

This method propagates colors from the given sequence to corresponding structure in Maestro workspace.

Param

sequence: Sequence to be used for propagating colors to Maestro.

schrodinger.ui.sequencealignment.maestro.maestroCenterOnResidue(viewer, sequence_area, res)[source]

This function centers workspace on a specified residue. If the residue doesn’t belong to the Maestro entry, or something else goes wrong, the function returns False. Otherwise, if the operation was successful, it will return True.

Parameters
  • sequence_area (SequenceArea) – Sequence area that is calling this function.

  • res (Residue) – residue to be centered on

Return type

bool

Returns

True if operation successfull, otherwise False

schrodinger.ui.sequencealignment.maestro.maestroMutateResidue(viewer, res, new_code, mutate_in_workspace=True)[source]

Mutates a single residue. Optionally modifies a corresponding Maestro entry.

Note

This method doesn’t update anntotations. The caller should update the annotations according to the introduced mutation.

Parameters
  • res (Residue) – residue to be mutated

  • new_code (str) – code of the new residue.

Return type

bool

Returns

True if successfully synchronized with Maestro, False if not.

schrodinger.ui.sequencealignment.maestro.maestroGetSelectedResiduesASL(sequence_group, sequence=None)[source]

Returns an ASL string corresponding to selection in MSV. This function attempts to produce a compact ASL expression, e.g. consecutive selected residues are expressed as a range.

schrodinger.ui.sequencealignment.maestro.maestroSelectResiduesInWorkspace(viewer)[source]

This method selects residues in Maestro workspace based on current selection.

Parameters

sequence_group (SequenceGroup) – source sequence group

Return type

bool

Returns

True if successfully synchronized with Maestro, False if not.

schrodinger.ui.sequencealignment.maestro.maestroSynchronize(sequence_group)[source]
schrodinger.ui.sequencealignment.maestro.maestroIncorporateEntries(sequence_group, what='included', entry_ids=None, ignore=[], include=False, incorporate_scratch_entry=False, align_func=None, ct=None, use_title=False, viewer=None)[source]

Incorporates Maestro entries into the sequence viewer.

schrodinger.ui.sequencealignment.maestro.maestroCalculateMinimumDistance(sequence)[source]

Calculates minimum distance in agnstroms between selected residues in the specified sequence and remaining residues in the sequence.

schrodinger.ui.sequencealignment.maestro.maestroExtractStructureData(sequence)[source]

Before building a homology model, we need to pass the structural data from Maestro to MSV. This function extracts the structural data from the Maestro entry coupled with the given sequence. The data is preformatted in PDB format, so it can be directly saved as Prime template file.

schrodinger.ui.sequencealignment.maestro.synchronizePropertiesWithMaestro(viewer, colors=False, selection=False)[source]

Synchronizes Maestro workspace colors or selection state with corresponding sequences in the sequence viewer.

Parameters
  • colors (bool) – Synchronize colors.

  • selection (bool) – Synchronize selection state.

Return type

bool

Returns

True on successful synchronization, False otherwise

schrodinger.ui.sequencealignment.maestro.getMaestroStructureName(st, entry_id, use_title=False)[source]

Generates a name for Maestro entry.

schrodinger.ui.sequencealignment.maestro.getMaestroLigandList(template_list=None, entry_list=None, chain_distance=5.0, list_all=False)[source]

Returns list of ligands extracted from Maestro.

Parameters
  • template_list (list of Sequences) – Optional list of MSV sequences to extract ligands from. If the list is not specified, all PT chains will be analyzed.

  • entry_list – Optional list of entry IDs to extract ligands from. If the list is not specified, all PT chains will be analyzed.

  • chain_distance (float) – Distance from protein chain required to classify a molecule as a ligand. All molecules outside of this threshold will be ignored.

  • list_all (boolean) – Disregards ligand selection and chain distance criteria and returns a list of all non-protein molecules.

Note

This function ignores workspace scratch entry.

Note

If both template_list and entry_list are specified, entry_list takes precedence and template_list is not being used.

Return type

tuple of lists

Returns

A tuple of lists of ligand names and list of ligands. The list of ligands consists of 4-tuples: (entry_id, ligand_pdbres, ligand_asl, ligand_st).

schrodinger.ui.sequencealignment.maestro.getEntryByName(name)[source]

Returns Maestro entry ID of specified name.

schrodinger.ui.sequencealignment.maestro.getEntryByJobName(name)[source]

Returns Maestro entry ID of specified job name.

schrodinger.ui.sequencealignment.maestro.maestroGetListOfEntryIDs()[source]

Returns a list of entry IDs in Maestro PT.

schrodinger.ui.sequencealignment.maestro.maestroColorEntrySurface(viewer, sequence)[source]

Colors a surface in Maestro according to sequence colors.

schrodinger.ui.sequencealignment.maestro.maestroIncludeAllEntrySequences(sequence_group, entry_id)[source]

Includes all sequences belonging to the given entry.

schrodinger.ui.sequencealignment.maestro.maestroExcludeAllEntrySequences(sequence_group, entry_id)[source]

Excludes all sequences belonging to the given entry.

schrodinger.ui.sequencealignment.maestro.maestroGetProjectPath(old=False)[source]

Returns a path to a current project.

schrodinger.ui.sequencealignment.maestro.maestroCalculateSASA(sequence_group, sequences=[], selected_only=False, normalize=True, percentage=False)[source]

Calculates solvent accessible surface per residue.

Param

Target sequence group.

Param

Optional list of sequences. If the list is provided it will be used instead of the sequence group.

Parameters
  • selected_only (bool) – Calculate SASA only for selected sequences.

  • normalize (bool) – Should we normalize the SASA area by area of amino acid in default conformation.

  • percentage (bool) – If True return percentage SASA instead of absolute values.

schrodinger.ui.sequencealignment.maestro.maestroFindInteractions(sequence, ligand_list, selected_only=False)[source]

Generates a list of interactions between a specified sequence and a list of ligands.

Parameters
  • sequence (Sequence) – Sequence the interactions are calculated for.

  • ligand_list (list of tuples) – List of (ligand_st, ligand_entry_id) of the ligands.

Return type

list of interactions per residue

Returns

List of interactions calculated per residue. Each position includes list of interaction strings in the format of StructuralInteractionFingerprintGenerator.getFingerprintString Returns None if the calculations were not completed successfully.

schrodinger.ui.sequencealignment.maestro.maestroGetStructureAlignment(viewer, sequence_group)[source]

Creates a sequence alignment based on structure superposition of the included entries. Consecutively merges the alignments.

schrodinger.ui.sequencealignment.maestro.maestroGetLigandAnnotations(sequence)[source]

Creates ligand annotations for a given sequence.