draw_molecule
- cleanup_via_smiles(mol: Mol) Mol[source]
Convert a molecule to a smiles string and back to a molecule to clean it up for drawing.
- Parameters:
mol (
Chem.Mol) – RDKit molecule object- Returns:
Cleaned up RDKit molecule object
- Return type:
Chem.Mol
- cleanup_xyz(path: Path) str[source]
Read an xyz file and return a cleaned up version of it which rdkit can handle.
- Parameters:
path (
Path) – Path to the xyz file- Returns:
Cleaned up xyz block
- Return type:
str
- draw_molecule(mol: Mol, width: int, height: int) str[source]
Draw a molecule to an SVG image.
- Parameters:
mol (
Chem.Mol) – RDKit molecule objectwidth (
int) – Width of the imageheight (
int) – Height of the image
- Returns:
SVG image
- Return type:
str
- load_molecule(path: Path) Mol[source]
Load a molecule from a .xyz or .sdf file.
In case of xyz files the bond orders are tried to be determined automatically.
- Parameters:
path (
Path) – Path to the file- Returns:
RDKit molecule object
- Return type:
Chem.Mol