schrodinger.application.livedesign.maestro_data_types module¶
-
schrodinger.application.livedesign.maestro_data_types.
get_unique_ligands
(ct_list)¶ Return the set of ligands in a list of cts that is unique by SMILES.
Parameters: ct_list (structure.Structure) – the structures to analyze Returns: the set of unique ligands Return type: set of analyze.Ligand
-
schrodinger.application.livedesign.maestro_data_types.
format_numbered_message
(base_msg, n, singular_string, plural_string)¶ Given a specially-formatted message containing a numbered word, return the proper human-readable translation using the correct form of that word.
- Example input:
- base_msg = ‘I have {n} {variable_string}.’ n = 2 singular_string = egg plural_string = eggs
- Example output:
- ‘I have 2 eggs.’
Parameters: - base_msg (str) – the message to be formatted. Should contain two new-style
formatting replacement points,
{n}
and{variable_string}
, for the number and numbered word that should be added to the message - n (int) – the number to be added to the message
- singular_string (str) – if
n = 1
, use this string as the numbered word in the message - plural_string (str) – if
n != 1
, use this string as the numbered word in the message
-
class
schrodinger.application.livedesign.maestro_data_types.
BaseMaestroData
(rl_map, export_mae=False)¶ Bases:
schrodinger.ui.qt.appframework2.validation.ValidationMixin
Abstract class for storing and validating data for various formats of ligand-based systems in anticipation of export to LiveDesign.
Variables: - _selected_entry_ids – set of entry IDs that were selected in the project prior to the start of a batch iteration. These are held until the end of batch iteration, when the selection state of the project is restored and this value becomes an empty set.
- BATCHES_INCLUDE_TARGETS (bool) – whether the
getBatches()
method should return maps that contain receptor structures in addition to ligand structures by default
Vartype: _selected_entry_ids: set(str)
-
name
= ''¶
-
description
= ''¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
BATCHES_INCLUDE_TARGETS
= False¶
-
NODE_SINGULAR_STRING
= ''¶
-
NODE_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= ''¶
-
TARGET_PLURAL_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
checkNumEntries
(**kwargs)¶
-
analyzeStructures
()¶ Compile and cache important ligand and receptor information from the receptor-ligand map. Meant to be called once on initialization.
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
getTargetEntryID
(target=None)¶ Return the entry ID of the target associated with this data class.
Parameters: target (structure.Structure) – a target structure, if applicable Returns: the target entry ID (if possible), or None
Return type: str
orNone
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
exportAlternateRLMap
(rl_map)¶
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
getNextEntryId
()¶
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
class
schrodinger.application.livedesign.maestro_data_types.
IndividualStructureBase
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.BaseMaestroData
Class representing data types for which each structure in the input receptor-ligand map is either a single target or a single node structure.
-
checkNumNodes
(**kwargs)¶
-
BATCHES_INCLUDE_TARGETS
= False¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
NODE_PLURAL_STRING
= ''¶
-
NODE_SINGULAR_STRING
= ''¶
-
TARGET_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
analyzeStructures
()¶ Compile and cache important ligand and receptor information from the receptor-ligand map. Meant to be called once on initialization.
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumEntries
(**kwargs)¶
-
description
= ''¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
getTargetEntryID
(target=None)¶ Return the entry ID of the target associated with this data class.
Parameters: target (structure.Structure) – a target structure, if applicable Returns: the target entry ID (if possible), or None
Return type: str
orNone
-
name
= ''¶
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
TargetlessBase
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.IndividualStructureBase
Base class for data types that do not have a target structure. Subclasses must redefine
MAX_NUM_ATOMS
.Variables: MAX_NUM_ATOMS (int) – the maximum number of atoms per structure -
dummy_entry_id
= None¶
-
MAX_NUM_ATOMS
= 0¶
-
checkNumAtoms
(**kwargs)¶
-
getTargetEntryID
(target=None)¶ Return the entry ID of the dummy target created during batch export.
See parent class for complete method documentation.
-
BATCHES_INCLUDE_TARGETS
= False¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
NODE_PLURAL_STRING
= ''¶
-
NODE_SINGULAR_STRING
= ''¶
-
TARGET_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
analyzeStructures
()¶ Compile and cache important ligand and receptor information from the receptor-ligand map. Meant to be called once on initialization.
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumEntries
(**kwargs)¶
-
checkNumNodes
(**kwargs)¶
-
description
= ''¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
name
= ''¶
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
OrganometallicCompounds
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.TargetlessBase
-
name
= 'Organometallic Compounds'¶
-
description
= 'Upload organometallic compounds. Each compound must be its own entry.'¶
-
MAX_NUM_ATOMS
= 700¶
-
NODE_SINGULAR_STRING
= 'organometallic compound'¶
-
NODE_PLURAL_STRING
= 'organometallic compounds'¶
-
analyzeStructures
()¶ Record the total number of compounds.
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
BATCHES_INCLUDE_TARGETS
= False¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
TARGET_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumAtoms
(**kwargs)¶
-
checkNumEntries
(**kwargs)¶
-
checkNumNodes
(**kwargs)¶
-
dummy_entry_id
= None¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
getTargetEntryID
(target=None)¶ Return the entry ID of the dummy target created during batch export.
See parent class for complete method documentation.
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
Ligands
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.TargetlessBase
-
name
= 'Ligands'¶
-
description
= 'Upload ligands. Each ligand must be in its own entry. Non-ligand structures will be ignored.'¶
-
MAX_NUM_ATOMS
= 130¶
-
NODE_SINGULAR_STRING
= 'ligand'¶
-
NODE_PLURAL_STRING
= 'ligands'¶
-
analyzeStructures
()¶ Only record the number of unique ligands.
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
BATCHES_INCLUDE_TARGETS
= False¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
TARGET_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumAtoms
(**kwargs)¶
-
checkNumEntries
(**kwargs)¶
-
checkNumNodes
(**kwargs)¶
-
dummy_entry_id
= None¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
getTargetEntryID
(target=None)¶ Return the entry ID of the dummy target created during batch export.
See parent class for complete method documentation.
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
DockedPoses
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.IndividualStructureBase
-
name
= 'Docked Poses'¶
-
description
= 'Upload docked poses based on the PV format. Selection should include one receptor, in its own entry, and docked ligands, each in a separate entry.'¶
-
BATCHES_INCLUDE_TARGETS
= True¶
-
NODE_SINGULAR_STRING
= 'ligand'¶
-
NODE_PLURAL_STRING
= 'ligands'¶
-
TARGET_SINGULAR_STRING
= 'receptor'¶
-
TARGET_PLURAL_STRING
= 'receptors'¶
-
getTargetEntryID
(target=None)¶ Because all receptor-ligand pairs in the receptor-ligand map should have the same receptor, return the entry ID associated with any of them.
See parent class for complete method documentation.
-
checkNumNodes
(**kwargs)¶
-
checkTargets
(**kwargs)¶
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
analyzeStructures
()¶ Calculate and store receptor data in addition to the ligand data calculated by the superclass method.
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumEntries
(**kwargs)¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
Complexes
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.BaseMaestroData
-
BATCHES_INCLUDE_TARGETS
= True¶
-
name
= 'Receptor-Ligand Complexes'¶
-
description
= 'Upload receptor-ligand complexes. Selection should include n entries, where each entry includes a receptor and at least one ligand.'¶
-
NODE_SINGULAR_STRING
= 'ligand'¶
-
NODE_PLURAL_STRING
= 'ligands'¶
-
TARGET_SINGULAR_STRING
= 'receptors'¶
-
checkTargets
(**kwargs)¶
-
checkLigands
(**kwargs)¶
-
getTargetEntryID
(target=None)¶ Return the entry ID of the provided receptor structure.
See parent class for complete method documentation.
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
TARGET_PLURAL_STRING
= ''¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
analyzeStructures
()¶ Compile and cache important ligand and receptor information from the receptor-ligand map. Meant to be called once on initialization.
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkNumEntries
(**kwargs)¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
class
schrodinger.application.livedesign.maestro_data_types.
CovalentDockingComplexes
(rl_map, export_mae=False)¶ Bases:
schrodinger.application.livedesign.maestro_data_types.Complexes
-
name
= 'Covalent Docking Complexes'¶
-
description
= 'Upload covalent docking structures. Selection should include outputs from the covalent docking panel. Uploaded ligands will be the original (input) structures prior to covalent docking processing.'¶
-
BATCHES_INCLUDE_TARGETS
= True¶
-
MIN_NODES
= 1¶
-
MIN_STRUCTURES
= 1¶
-
NODE_PLURAL_STRING
= 'ligands'¶
-
NODE_SINGULAR_STRING
= 'ligand'¶
-
TARGET_PLURAL_STRING
= ''¶
-
TARGET_SINGULAR_STRING
= 'receptors'¶
-
__init__
(rl_map, export_mae=False)¶ Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- export_mae (bool) – whether the 3D structure export to LiveDesign will use .mae files (rather than .prjzip files) as 3D data
-
analyzeStructures
()¶ Compile and cache important ligand and receptor information from the receptor-ligand map. Meant to be called once on initialization.
-
batchIteration
()¶ Manage the environment for exporting receptor-ligand maps to LiveDesign, e.g. by changing the project selection state after iterating over all receptor-ligand batches.
-
checkLigands
(**kwargs)¶
-
checkNumEntries
(**kwargs)¶
-
checkTargets
(**kwargs)¶
-
exportAlternateRLMap
(rl_map)¶
-
exportRLMap
(rl_map, export_3d)¶ Manage the environment for exporting a single receptor-ligand map to LiveDesign by selecting relevant project rows when entering the context environment.
Parameters: - rl_map (data_classes.ReceptorLigandMap) – the receptor-ligand map for export
- export_3d (bool) – whether to export 3D data
Returns: the supplied receptor-ligand map
Return type:
-
getAlternateBatches
(batch_size)¶ A generator for receptor-alternate ligand maps containing a subset of the receptor-alternate ligand pairs contained in the
rl_map
instance variable. Alternate ligands are uploaded to LiveDesign as 3D data when the 3D structure does not have the same SMARTS representation as the rest of the structure row.This method may modify the current Maestro project temporarily in order to export 3D data as a .prjzip file.
Note that this method takes alternate ligands from the
rl_map
instance variable, but returnsReceptorLigandMap
instances in which those alternate ligands are stored as regular ligands. This is so that the LD export infrastructure will function the same when exporting these structures.Parameters: batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method Returns: an iterator of receptor-ligand maps Return type: iterator(data_classes.ReceptorLigandMap)
-
getAvailableProperties
()¶ Compile all properties of all structures scheduled for export.
Returns: a list of identifying information for the union of all structure properties for each structure scheduled for export Return type: list(data_classes.LDData)
-
getBatches
(batch_size, export_3d, include_targets=None)¶ An generator for receptor-ligand maps containing a subset of the receptor-ligand pairs contained in the
rl_map
instance variable. If possible, may also modify the open Maestro project to assist with export to LiveDesign.Parameters: - batch_size (int) – the largest number of receptor-ligand pairs that will be in the receptor-ligand maps yielded by this method
- export_3d (bool) – whether to export 3D data
- include_targets (bool or None) – whether the batches should include targets (e.g.
receptors). A value of
None
(the default) will revert to the class default behavior, which is the correct choice when exporting withLDClient.start_export_assay_and_pose_data()
.
Returns: an iterator of receptor-ligand maps
Return type: iterator(data_classes.ReceptorLigandMap)
-
getNextEntryId
()¶
-
getSummary
()¶ Return a summary of the receptor and ligand data stored in this object. Meant to be overridden by a subclass.
Returns: a summary of the data stored on this object Return type: str
-
getTargetEntryID
(target=None)¶ Return the entry ID of the provided receptor structure.
See parent class for complete method documentation.
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the
ValidationMixin
interface and does not need to be called directly.This method assumes that
error
andquestion
methods have been defined in the subclass, as in e.g.widget_mixins.MessageBoxMixin
.Parameters: results ( validation.ValidationResults
) – Set of validation results generated byvalidate
Returns: if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
-
schrodinger.application.livedesign.maestro_data_types.
import_and_copy_rl_map
(rl_map)¶ Import the receptor and ligand structures in
rl_map
into the current Maestro project, then create and return a newReceptorLigandMap
instance using the structures just imported into the project.Parameters: rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map Returns: a receptor-ligand map similar to rl_map
, but which exclusively contains structures copied from the Maestro projectReturn type: data_classes.ReceptorLigandMap
-
schrodinger.application.livedesign.maestro_data_types.
remove_rl_map_from_pt
(rl_map)¶ Remove all rows in the Maestro project that have entry IDs corresponding to the entry IDs in the structures contained in a receptor-ligand map.
Parameters: rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
-
schrodinger.application.livedesign.maestro_data_types.
get_ld_data_from_data_names
(data_names)¶ Given a list of structure data names (e.g. “s_m_title”), return a list of corresponding LD Data instances.
Parameters: data_names (list(str)) – a list of structure data names Returns: a list of LD Data objects corresponding to each structure data name Return type: list(data_classes.LDData)
-
schrodinger.application.livedesign.maestro_data_types.
get_structure_data_names
(structures)¶ Parameters: structures (list(structure.Structure)) – a list of structures Returns: set of data names for every property on each structure Return type: set(str)
-
schrodinger.application.livedesign.maestro_data_types.
get_structure_entry_IDs
(structures)¶ Parameters: structures (list(structure.Structure)) – a list of structures Returns: a set of the entry IDs stored in each structure Return type: set(str)
-
schrodinger.application.livedesign.maestro_data_types.
maestro_select_rl_map
(rl_map)¶ Context manager that selects project rows associated with a receptor-ligand map on entrance, and restores the original project selection on exit.
Parameters: rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
-
schrodinger.application.livedesign.maestro_data_types.
maestro_select_only
(entry_ids)¶ Select the specified entry IDs in the project and deselect all others.
Parameters: entry_ids (list(str)) – the entry IDs corresponding to entries currently in the project
-
schrodinger.application.livedesign.maestro_data_types.
import_and_get_structure
(st)¶ Import the supplied structure into the project table, then retrieve the structure from the newly-created project entry. If
None
is supplied rather than a structure, returnNone
.Parameters: st (structure.Structure or NoneType) – a structure (or None
)Returns: the structure retrieved from the entry row created by importing st
into the project table, orNone
if no structure is providedReturn type: structure.Structure or None