schrodinger.application.canvas.topo_descriptors module¶
Module which computes constitutional and topological descriptors, walk and path counts, and connectivity indices.
Details of the descriptors implemented here are taken from: “Handbook of Molecular Descriptors” by Mannhols, Kubinyi and Timmerman “Molecular Descriptors for Chemoinformatics, Vol. I”, by Todeschini and Consonni
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.canvas.topo_descriptors.
Descriptor
(func, cast_type, label, key)¶ Bases:
tuple
-
__contains__
(key, /)¶ Return key in self.
-
__len__
()¶ Return len(self).
-
cast_type
¶ Alias for field number 1
-
count
(value, /)¶ Return number of occurrences of value.
-
func
¶ Alias for field number 0
-
index
(value, start=0, stop=9223372036854775807, /)¶ Return first index of value.
Raises ValueError if the value is not present.
-
key
¶ Alias for field number 3
-
label
¶ Alias for field number 2
-
-
exception
schrodinger.application.canvas.topo_descriptors.
TopoError
[source]¶ Bases:
Exception
Error raised when unable to calculate topological descriptor
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
schrodinger.application.canvas.topo_descriptors.
cached_topo_descriptor
(func, self, *args, **kwargs)[source]¶ Decorator to extract previously calculated descriptor value from cached descriptors dictionary. If not available, the descriptor is calculated and stored for future reference.
-
class
schrodinger.application.canvas.topo_descriptors.
TopologicalDescriptors
(default_descriptor_value=None)[source]¶ Bases:
object
-
__init__
(default_descriptor_value=None)[source]¶ Initializes valid topological descriptors, and creates an empty cached property dictionary.
-
allDescriptorFullLabels
()[source]¶ Returns all topological descriptor labels as label-key string
- Returns
list of all descriptors as “Label (Key)” strings
- Return type
list of str
-
calculateTopologicalDescriptors
(st, descriptor_strings)[source]¶ Calculates a set of topological descriptors for a given structure.
- Parameters
st (
structure.Structure
) – structure to considerdescriptor_strings (list of str) – list of descriptors to calculate
- Returns
Structure copy appended with successful descriptor properties
- Return type
structure.Structure
-
m2ioPropertyName
(descriptor)[source]¶ Create descriptor m2io property name for a Descriptor.
- Parameters
descriptor (
Descriptor
) – descriptor entry- Returns
m2io formatted descriptor property name
- Return type
str
-