schrodinger.application.livedesign.entry_types module

class schrodinger.application.livedesign.entry_types.BaseEntryData(structure_map)

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.

name = ''
description = ''
min_nodes = 1
min_structures = 1
node_str = ''
target_str = ''
__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

checkNumEntries(**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

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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

class schrodinger.application.livedesign.entry_types.IndividualStructureBase(structure_map)

Bases: schrodinger.application.livedesign.entry_types.BaseEntryData

Class representing data types for which each structure in the input receptor-ligand map is either a single target or a single node structure.

getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

checkNumNodes(**kwargs)
__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumEntries(**kwargs)
description = ''
getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

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
name = ''
node_str = ''
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

target_str = ''
class schrodinger.application.livedesign.entry_types.TargetlessBase(structure_map)

Bases: schrodinger.application.livedesign.entry_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

max_num_atoms = 0
checkNumAtoms(**kwargs)
__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumEntries(**kwargs)
checkNumNodes(**kwargs)
description = ''
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

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
name = ''
node_str = ''
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

target_str = ''
class schrodinger.application.livedesign.entry_types.OrganometallicCompounds(structure_map)

Bases: schrodinger.application.livedesign.entry_types.TargetlessBase

name = 'Organometallic Compounds'
description = 'Upload organometallic compounds. Each compound must be its own entry.'
max_num_atoms = 700
node_str = 'organometallic compound'
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

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

__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumAtoms(**kwargs)
checkNumEntries(**kwargs)
checkNumNodes(**kwargs)
getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

min_nodes = 1
min_structures = 1
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

target_str = ''
class schrodinger.application.livedesign.entry_types.Ligands(structure_map)

Bases: schrodinger.application.livedesign.entry_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_str = 'ligand'
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

__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumAtoms(**kwargs)
checkNumEntries(**kwargs)
checkNumNodes(**kwargs)
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

min_nodes = 1
min_structures = 1
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

target_str = ''
class schrodinger.application.livedesign.entry_types.DockedPoses(structure_map)

Bases: schrodinger.application.livedesign.entry_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.'
node_str = 'ligand'
target_str = 'receptor'
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

__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumEntries(**kwargs)
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

min_nodes = 1
min_structures = 1
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

class schrodinger.application.livedesign.entry_types.Complexes(structure_map)

Bases: schrodinger.application.livedesign.entry_types.BaseEntryData

name = 'Receptor-Ligand Complexes'
description = 'Upload receptor-ligand complexes. Selection should include at least one entry, where each entry includes a receptor and at least one ligand.'
node_str = 'ligand'
target_str = 'receptor'
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

checkTargets(**kwargs)
checkLigands(**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

__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkNumEntries(**kwargs)
getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

min_nodes = 1
min_structures = 1
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

class schrodinger.application.livedesign.entry_types.CovalentDockingComplexes(structure_map)

Bases: schrodinger.application.livedesign.entry_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.'
__init__(structure_map)
Parameters

structure_map (dict[str, structure.Structure]) – a dictionary mapping unique strings to structures from some system

checkLigands(**kwargs)
checkNumEntries(**kwargs)
checkTargets(**kwargs)
getNumNodes()
Returns

the number of unique nodes in this system

Return type

int

getNumTargets()
Returns

the number of unique targets in the system

Return type

int

getRLMap()
Returns

a copy of the stored receptor ligand map

Return type

data_classes2.ReceptorLigandMap

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
node_str = 'ligand'
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 and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

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

target_str = 'receptor'
schrodinger.application.livedesign.entry_types.separate_complex(complex_st)

Given a receptor-ligand complex structure, separate the ligands from the receptors. Return a list of ‘receptor’ structures and a corresponding list of ligand structures. The receptors are the rest of the complex once the ligand has been removed.

Parameters

complex_st (structure.Structure) – a ligand-receptor complex

Returns

a receptor list and corresponding ligand list

Return type

tuple(list(structure.Structure), list(structure.Structure))

schrodinger.application.livedesign.entry_types.get_unique_ligands(sts)

Return the set of ligands in a list of cts that is unique by SMILES.

Parameters

sts (structure.Structure) – the structures to analyze

Returns

the set of unique ligands

Return type

set of analyze.Ligand

schrodinger.application.livedesign.entry_types.format_numbered_message(base_msg, number, singular_str, plural_str=None)

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 {number} {variable_str}.’ n = 2 singular_str = egg

Example output:

‘I have 2 eggs.’

Parameters
  • base_msg (str) – the message to be formatted. Should contain two new-style formatting replacement points, {number} and {variable_str}, for the number and numbered word that should be added to the message

  • number (int) – the number to be added to the message

  • singular_str (str) – the singular word for the object being described

  • plural_str (str or NoneType) – optionally, the plural word for the object being described; by default, “s” will be appended to singular_str