schrodinger.analysis.transformations module¶
Module to support chemical transformations defined via reaction SMARTS (RDKit dialect).
Transformations can be applied either individually using apply_transform(), or “en-masse” via apply_transforms() (see below).
TransformsRepository class supports loading of the transformations from files (or text) in JSON format.
-
class
schrodinger.analysis.transformations.
TransformsRepository
¶ Bases:
object
-
system_file
= '/scr/buildbot/savedbuilds/2018-4/NB/build-145/mmshare-v4.4/data/transformations.json'¶
-
validate
= <voluptuous.Schema object>¶
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-
load
(fp)¶
-
loads
(text)¶
-
loadFile
(filename)¶
Tags shared by two or more entries.
-
getEntries
(tags=None)¶
-
getSmarts
(tags=None)¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.analysis.transformations', 'system_file': '/scr/buildbot/savedbuilds/2018-4/NB/build-145/mmshare-v4.4/data/transformations.json', 'validate': <voluptuous.Schema object>, '__init__': <function TransformsRepository.__init__>, '_appendEntries': <function TransformsRepository._appendEntries>, 'load': <function TransformsRepository.load>, 'loads': <function TransformsRepository.loads>, 'loadFile': <function TransformsRepository.loadFile>, 'tags': <property object>, 'shared_tags': <property object>, 'getEntries': <function TransformsRepository.getEntries>, 'getSmarts': <function TransformsRepository.getSmarts>, '__dict__': <attribute '__dict__' of 'TransformsRepository' objects>, '__weakref__': <attribute '__weakref__' of 'TransformsRepository' objects>, '__doc__': None})¶
-
__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.analysis.transformations'¶
-
__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)
-
-
schrodinger.analysis.transformations.
apply_transform
(st, rxn, core=None, f3d_engine=None, logger=None)¶ Applies single transformation and generates (smiles, st, core) tuples for the outcomes.
Parameters: - st (
Structure
) – Input structure. - rxn (
ChemicalReaction
instance.) – Reaction to be performed. - core (iterable) – Indices of the atoms that must be kept unchanged.
- f3d_engine (
fast3d.SingleConformerEngine
instance.) – fast3d handle to be used for 3d coordinates generation (omitted if None).
- st (
-
schrodinger.analysis.transformations.
apply_transforms
(st, transforms, core=None, f3d_engine=None, logger=None)¶ Applies transformations to structure.
Generator of the (
Structure
, smiles, core, route) tuples.Parameters: - st (
Structure
) – Input structure. - transforms (list of lists of
ChemicalReaction
instances.) – List of lists of reactions to be performed. - core (iterable) – Indices of the atoms that must be kept unchanged.
- f3d_engine (
fast3d.SingleConformerEngine
instance.) – fast3d handle to be used for 3d coordinates generation (omitted if None).
- st (
-
schrodinger.analysis.transformations.
structure_to_rdkit_smiles
(st)¶
-
schrodinger.analysis.transformations.
rdkit_reaction_from_smarts
(smarts)¶