mordred package¶
modred descriptor calculator.
-
class
mordred.
Result
(r, d)[source]¶ Result type.
-
class
mordred.
Descriptor
[source]¶ Abstract base class of descriptors.
-
mol
¶ rdkit.Mol – target molecule
-
classmethod
preset
()[source]¶ Generate preset descriptor instances.
Returns: preset descriptors Return type: Iterable[Descriptor]
-
parameters
()[source]¶ [abstractmethod] get __init__ arguments of this descriptor instance.
this method used in pickling and identifying descriptor instance.
Returns: tuple of __init__ arguments Return type: tuple
-
to_json
()[source]¶ Convert to json serializable dictionary.
Returns: dictionary of descriptor Return type: dict
-
as_argument
¶ Argument representation of descriptor.
Returns: any
-
mol
Get molecule.
Returns: rdkit.Mol
-
coord
¶ Get 3D coordinate.
Returns: coordinate matrix Return type: numpy.array[3, N]
-
fail
(exception)[source]¶ Raise known exception and return missing value.
Raises: MissingValueException
-
classmethod
from_json
(obj)¶ Create Descriptor instance from json dict.
Parameters: obj (dict) – descriptor dict Returns: descriptor Return type: Descriptor
-
-
class
mordred.
Calculator
(descs=None, ignore_3D=False)[source]¶ descriptor calculator.
Parameters: - descs – see Calculator.register() method
- ignore_3D – see Calculator.register() method
-
classmethod
from_json
(obj)[source]¶ Create Calculator from json descriptor objects.
Parameters: obj (list or dict) – descriptors to register Returns: calculator Return type: Calculator
-
register_json
(obj)[source]¶ Register Descriptors from json descriptor objects.
Parameters: obj (list or dict) – descriptors to register
-
to_json
()[source]¶ Convert descriptors to json serializable data.
Returns: descriptors Return type: list
-
descriptors
¶ All descriptors.
you can get/set/delete descriptor.
Returns: registered descriptors Return type: tuple[Descriptor]
-
register
(desc, ignore_3D=False)[source]¶ Register descriptors.
- Descriptor-like:
- Descriptor instance: self
- Descriptor class: use Descriptor.preset() method
- module: use Descriptor-likes in module
- Iterable: use Descriptor-likes in Iterable
Parameters: - desc (Descriptor-like) – descriptors to register
- ignore_3D (bool) – ignore 3D descriptors
-
echo
(s, file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, end='\n')[source]¶ Output message.
Parameters: Returns: None
-
map
(mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1)[source]¶ Calculate descriptors over mols.
Parameters: - mols (Iterable[rdkit.Mol]) – moleculars
- nproc (int) – number of process to use. default: multiprocessing.cpu_count()
- nmols (int) – number of all mols to use in progress-bar. default: mols.__len__()
- quiet (bool) – don’t show progress bar. default: False
- ipynb (bool) – use ipython notebook progress bar. default: False
- id (int) – conformer id to use. default: -1.
Returns: Iterator[Result[scalar]]
-
mordred.
all_descriptors
()[source]¶ [deprecated] use mordred.descriptors module instead.
yield all descriptor modules.
Returns: all modules Return type: Iterator
(Descriptor
)
-
mordred.
get_descriptors_from_module
(mdl, submodule=False)[source]¶ Get descriptors from module.
Parameters: mdl (module) – module to search Returns: [Descriptor]
- Subpackages
- Submodules
- mordred.ABCIndex module
- mordred.AcidBase module
- mordred.AdjacencyMatrix module
- mordred.Aromatic module
- mordred.AtomCount module
- mordred.Autocorrelation module
- mordred.BCUT module
- mordred.BalabanJ module
- mordred.BaryszMatrix module
- mordred.BertzCT module
- mordred.BondCount module
- mordred.CPSA module
- mordred.CarbonTypes module
- mordred.Chi module
- mordred.Constitutional module
- mordred.DetourMatrix module
- mordred.DistanceMatrix module
- mordred.EState module
- mordred.EccentricConnectivityIndex module
- mordred.ExtendedTopochemicalAtom module
- mordred.FragmentComplexity module
- mordred.Framework module
- mordred.GeometricalIndex module
- mordred.GravitationalIndex module
- mordred.HydrogenBond module
- mordred.InformationContent module
- mordred.KappaShapeIndex module
- mordred.Lipinski module
- mordred.McGowanVolume module
- mordred.MoRSE module
- mordred.MoeType module
- mordred.MolecularDistanceEdge module
- mordred.MolecularId module
- mordred.MomentOfInertia module
- mordred.PathCount module
- mordred.Polarizability module
- mordred.RingCount module
- mordred.RotatableBond module
- mordred.SLogP module
- mordred.TopoPSA module
- mordred.TopologicalCharge module
- mordred.TopologicalIndex module
- mordred.VdwVolumeABC module
- mordred.VertexAdjacencyInformation module
- mordred.WalkCount module
- mordred.Weight module
- mordred.WienerIndex module
- mordred.ZagrebIndex module