chemprop.utils
#
Submodules#
Package Contents#
Classes#
dict() -> new empty dictionary |
|
Enum where members are also (and must be) strings |
Functions#
|
build an RDKit molecule from a SMILES string. |
|
Make a pretty string from an input shape |
- class chemprop.utils.ClassRegistry[source]#
Bases:
dict
[str
,Type
[T
]]dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- __call__#
- class chemprop.utils.EnumMapping[source]#
Bases:
enum.StrEnum
Enum where members are also (and must be) strings
- classmethod get(name)[source]#
- Parameters:
name (str | EnumMapping)
- Return type:
- chemprop.utils.make_mol(smi, keep_h, add_h)[source]#
build an RDKit molecule from a SMILES string.
- Parameters:
smi (str) – a SMILES string.
keep_h (bool) – whether to keep hydrogens in the input smiles. This does not add hydrogens, it only keeps them if they are specified
add_h (bool) – whether to add hydrogens to the molecule
- Returns:
the RDKit molecule.
- Return type:
Chem.Mol