Conformer#
- class maize.utilities.chem.chem.Conformer(rd_conf: Conformer, parent: Isomer, _rd_parent: Mol | None = None)[source]#
Bases:
object
Thin shim layer for rdkit conformers. Each conformer will have an Isomer as its parent.
- Parameters:
rd_conf – RDKit conformer object
parent – Isomer parent instance
_rd_parent – The actual rdkit molecule parent of the conformer
Methods
__init__
(rd_conf, parent[, _rd_parent])from_rdmol
(rd_mol, parent[, renumber])Create a conformer from an RDKit molecule.
get_tag
(tag[, default])Returns the value for the specified tag.
has_tag
(tag)Returns whether the specified tag is set.
Recreate the internal RDKit conformer object to avoid deallocation
set_tag
(tag, value)Sets a tag / property for the whole isomer.
Attributes
Coordinates of the conformer
n_atoms
Return all tags
- classmethod from_rdmol(rd_mol: Mol, parent: Isomer, renumber: bool = True) Self [source]#
Create a conformer from an RDKit molecule.
- Parameters:
rd_mol – RDKit molecule instance
parent – Parent Isomer instance
renumber – Ensure atom numbers of the molecule match the parent
- set_tag(tag: str, value: bool | int | float | str | list[float | int] | ndarray[Any, dtype[float64 | int64]]) None [source]#
Sets a tag / property for the whole isomer.
- Parameters:
tag – Tag to set
value – Corresponding value for all conformers
- get_tag(tag: str, default: bool | int | float | str | list[float | int] | ndarray[Any, dtype[float64 | int64]] | None = None) bool | int | float | str | list[float | int] | ndarray[Any, dtype[float64 | int64]] [source]#
Returns the value for the specified tag.
- Parameters:
tag – The tag to lookup
default – A default value to return if the key is not found
- Returns:
The value of the tag
- Return type:
Any
- Raises:
KeyError – If the specified tag couldn’t be found