schrodinger.application.livedesign.data_classes module¶
-
class
schrodinger.application.livedesign.data_classes.
LDData
(data_name=None, family_name=None, user_name=None)¶ Bases:
object
Class for storing information about Maestro-level data that may be exported to LiveDesign. (Objects from this class should only store Maestro-level data, not LiveDesign data.)
Specifically, this class is not meant to store the values of the data to be exported, but rather to serve as a “view” to that data. It should
- provide identifying information to the user about the data that is
- available for export (e.g. by providing user-friendly property names to tables and other view widgets), and
- provide an internal “pointer” to data to be exported (by uniquely
- identifying exactly what data should be exported, as selected by the user)
This class is meant to be general enough to store information about both structure property data and attachment data (e.g. 3D, images, files).
-
family_name
¶ Return the family name if provided on initialization. Otherwise, determine family name from the data name.
Returns: family name for display Return type: str
-
user_name
¶ Return the user name if provided on initialization. Otherwise, determine user name from the data name.
Returns: user name for display Return type: str
-
data_name
¶ Return data name if provided on initialization.
Returns: data name or None
Return type: str
orNone
-
class
schrodinger.application.livedesign.data_classes.
ExportData
(units, name, endpoint, model, ld_data)¶ Bases:
object
Class for storing information about data ready for export to LiveDesign. Objects from this class should contain all information necessary to be exported to LiveDesign (e.g. endpoint, model, etc.).
-
getPropDict
()¶ Translate information in this class to a dictionary formatted to represent a structure property ready for export to LiveDesign. If the data stored in this class is not property data, return
None
instead.Returns: a property dictionary or None
Return type: dict(str, str) or None
-
-
class
schrodinger.application.livedesign.data_classes.
ReceptorLigandPair
(receptor=None, ligand=None)¶ Bases:
object
Data class for unambiguously storing a single ligand structure and a single receptor structure.
-
class
schrodinger.application.livedesign.data_classes.
ReceptorLigandMap
¶ Bases:
collections.defaultdict
A specialized dictionary for organizing receptor and ligand structures. Each key points to a list of receptor-ligand pairs associated with that key. For convenience, this class also features several generators.
-
num_rl_pairs
¶ Returns: the number of receptor-ligand pairs stored in this object. Return type: int
-
rl_pair_items
¶ Returns: an iterator for (key, receptor-ligand pair) pairs stored in this map. Note that each key can correspond to multiple receptor- ligand pairs. Return type: iterator((str, ReceptorLigandPair))
-
rl_pairs
¶ Returns: an iterator for receptor-ligand pair objects stored in this map. Return type: iterator(ReceptorLigandPair)
-
ligand_items
¶ Returns: an iterator for (key, ligand) pairs stored in this map Return type: iterator((str, structure.Structure))
-
ligands
¶ Returns: an iterator for ligand structures stored in this map Return type: iterator(structure.Structure)
-
receptor_items
¶ Returns: an iterator for (key, receptor) pairs stored in this map Return type: iterator((str, structure.Structure))
-
receptors
¶ Returns: an iterator for receptor structures stored in this map Return type: iterator(structure.Structure)
-
structures
¶ Returns: an iterator for all structures stored in this map Return type: iterator(structure.Structure)
-
getBatches
(num_per_batch, include_receptors)¶ Return an iterator that divides all of the structures stored on this map into multiple smaller receptor-ligand maps that each contain at most
num_per_batch
receptor-ligand pairs.Parameters: - num_per_batch (int) – the maximum number of receptor-ligand pairs in each submap returned by this generator
- include_receptors (bool) – if
True
, include receptors in the submaps returned by this generator
Returns: an iterator of sub-maps
Return type: iterator(ReceptorLigandMap)
-
-
schrodinger.application.livedesign.data_classes.
get_long_family_name
(short_family_name)¶ Given the short family name of a structure property (e.g. “m”), return the corresponding long family name (e.g. “Maestro”). If no long family name is defined, return the short family name argument.
Parameters: - short_family_name – the short family name of a structure property
- short_family_name – str
Returns: the corresponding long family name if one exists, otherwise the short family name
Return type: str
-
schrodinger.application.livedesign.data_classes.
make_prop_dict
(units='', name='', endpoint='', model='')¶ Return a dictionary formatted to represent a structure property. Formatting should match the dictionary formatting required by the
properties
argument ofLDClient.start_export_assay_and_pose_data()
.Parameters: - units (str) – unit system used by this property
- name (str) – name for this property; either the data name or user name
- endpoint (str) – the LiveDesign endpoint
- model (str) – the user-specified portion of the name for the column under which this property will be stored after export to LiveDesign