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

  1. 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
  2. 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).

__init__(data_name=None, family_name=None, user_name=None)

Instances representing structure properties should be initialized with the property data name (e.g. data_name="s_m_title").

If there is no data name, e.g. for image and attachment data, instances should be initialized with both the family name and the user name (e.g. “Atom Properties”, “Hot Atoms”).

If the family or user name is supplied along with the data name, these will be used for display purposes within the panel rather than the values derived from the data name.

Raise:Exception
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 or None
__str__()

Return str(self).

__eq__(other)

Return self==value.

__ne__(other)

Return self!=value.

__hash__()

Return hash(self).

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.livedesign.data_classes', '__doc__': '\n Class for storing information about Maestro-level data that may be exported\n to LiveDesign. (Objects from this class should only store Maestro-level data, not LiveDesign data.)\n\n Specifically, this class is not meant to store the values of the data to be\n exported, but rather to serve as a "view" to that data. It should\n 1. provide identifying information to the user about the data that is\n available for export (e.g. by providing user-friendly property names\n to tables and other view widgets), and\n 2. provide an internal "pointer" to data to be exported (by uniquely\n identifying exactly what data should be exported, as selected by the\n user)\n\n This class is meant to be general enough to store information about both\n structure property data and attachment data (e.g. 3D, images, files).\n ', '__init__': <function LDData.__init__>, 'family_name': <property object>, 'user_name': <property object>, 'data_name': <property object>, '__str__': <function LDData.__str__>, '__eq__': <function LDData.__eq__>, '__ne__': <function LDData.__ne__>, '__hash__': <function LDData.__hash__>, '__dict__': <attribute '__dict__' of 'LDData' objects>, '__weakref__': <attribute '__weakref__' of 'LDData' objects>})
__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.livedesign.data_classes'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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.).

__init__(units, name, endpoint, model, ld_data)

Initialize self. See help(type(self)) for accurate signature.

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
__eq__(other)

Return self==value.

__ne__(other)

Return self!=value.

__hash__()

Return hash(self).

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.livedesign.data_classes', '__doc__': '\n Class for storing information about data ready for export to LiveDesign.\n Objects from this class should contain all information necessary to be\n exported to LiveDesign (e.g. endpoint, model, etc.).\n ', '__init__': <function ExportData.__init__>, 'getPropDict': <function ExportData.getPropDict>, '__eq__': <function ExportData.__eq__>, '__ne__': <function ExportData.__ne__>, '__hash__': <function ExportData.__hash__>, '__dict__': <attribute '__dict__' of 'ExportData' objects>, '__weakref__': <attribute '__weakref__' of 'ExportData' objects>})
__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.livedesign.data_classes'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.livedesign.data_classes.ReceptorLigandPair(receptor=None, ligand=None, alt_ligand=None)

Bases: object

Data class for unambiguously storing a receptor structure, a receptor, and an alternate ligand structure. This alternate ligand structure may be a distinct ligand pose, or it may have a different structure; for example, it may be the ligand molecule prior to covalent bonding with the receptor.

Each of these structures is optional; a ReceptorLigandPair instance will not always need to contain a receptor and a ligand.

__init__(receptor=None, ligand=None, alt_ligand=None)
Parameters:
  • receptor (structure.Structure or None) – a receptor structure or None
  • ligand (structure.Structure or None) – a ligand structure or None
  • alt_ligand (structure.Structure or None) – extra structure data associated with the ligand, e.g. to be used as 3D data for certain LiveDesign uploads
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.livedesign.data_classes', '__doc__': '\n Data class for unambiguously storing a receptor structure, a receptor, and\n an alternate ligand structure. This alternate ligand structure may be a\n distinct ligand pose, or it may have a different structure; for example, it\n may be the ligand molecule prior to covalent bonding with the receptor.\n\n Each of these structures is optional; a `ReceptorLigandPair` instance\n will not always need to contain a receptor and a ligand.\n ', '__init__': <function ReceptorLigandPair.__init__>, '__dict__': <attribute '__dict__' of 'ReceptorLigandPair' objects>, '__weakref__': <attribute '__weakref__' of 'ReceptorLigandPair' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.livedesign.data_classes'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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.

__init__()

Initialize as a list-based collections.defaultDict.

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)
alt_ligand_items
Returns:an iterator for (key, alternative ligand) pairs stored in this map
Return type:iterator((str, structure.Structure))
alt_ligands
Returns:an iterator for alternative 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)

__class__

alias of builtins.type

__contains__()

True if D has a key k, else False.

__copy__()

D.copy() -> a shallow copy of D.

__delattr__

Implement delattr(self, name).

__delitem__

Delete self[key].

__dict__ = mappingproxy({'__module__': 'schrodinger.application.livedesign.data_classes', '__doc__': '\n A specialized dictionary for organizing receptor and ligand structures. Each\n key points to a list of receptor-ligand pairs associated with that key. For\n convenience, this class also features several generators.\n ', '__init__': <function ReceptorLigandMap.__init__>, 'num_rl_pairs': <property object>, 'rl_pair_items': <property object>, 'rl_pairs': <property object>, 'ligand_items': <property object>, 'ligands': <property object>, 'alt_ligand_items': <property object>, 'alt_ligands': <property object>, 'receptor_items': <property object>, 'receptors': <property object>, 'structures': <property object>, 'getBatches': <function ReceptorLigandMap.getBatches>, 'getAlternateBatches': <function ReceptorLigandMap.getAlternateBatches>, '__dict__': <attribute '__dict__' of 'ReceptorLigandMap' objects>, '__weakref__': <attribute '__weakref__' of 'ReceptorLigandMap' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__()

x.__getitem__(y) <==> x[y]

__gt__

Return self>value.

__hash__ = None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__missing__()

__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value

__module__ = 'schrodinger.application.livedesign.data_classes'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

Return state information for pickling.

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__setitem__

Set self[key] to value.

__sizeof__() → size of D in memory, in bytes
__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

clear() → None. Remove all items from D.
copy() → a shallow copy of D.
default_factory

Factory for default value called by __missing__().

fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
getAlternateBatches(num_per_batch)

Return an iterator that divides some of the structures stored on this map into multiple smaller receptor-alternate ligand maps that each contain at most num_per_batch receptor-alternate ligand pairs. In the sub-maps, the alternate ligands take the place of the standard ligand structures (i.e. structures stored as “alt_ligands” on this map will be stored as “ligands” on the maps that this method returns).

Parameters:num_per_batch (int) – the maximum number of receptor-alternate ligand pairs in each submap returned by this generator
Returns:an iterator of sub-maps
Return type:iterator(ReceptorLigandMap)
items() → a set-like object providing a view on D's items
keys() → a set-like object providing a view on D's keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values
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 of LDClient.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