shnitsel.rd#
This module contains functions that accept an RDKit.Chem.Mol object; but not necessarily functions that return a Mol object.
Functions#
|
Set properties on atoms of an |
Generate a SMILES string containing mapping numbers |
|
|
Highlight specified pairs of atoms in an image of an |
Module Contents#
- set_atom_props(mol, inplace=False, **kws)#
Set properties on atoms of an
rdkit.Chem.Molobject- Parameters:
mol (rdkit.Chem.mol) – The
Molobjectinplace (bool, optional) – Whether to alter
mol; , by default False (returns a copy)**kws (Sequence[str | int] | Literal[True] | Mapping[int, int | str] | None) –
A mapping where parameter names represent the name of a property and the arguments are either
a dict mapping the atom indices to values that should be assigned. Missing atom indices are ignored
a sequence of str or int values the atoms should be set to;
True, in which case the atom indices as assigned by RDKit will be used as values;False, in which the property will be cleared on every atom.Nonevalues, which are simply ignored
- Return type:
A copy of the
Molobject, ifinplace=False, otherwise the provided mol- Raises:
ValueError – If the amount of values passed to the properties kwargs did not match the amount of atoms in the mol.
- mol_to_numbered_smiles(mol)#
Generate a SMILES string containing mapping numbers corresponding to the atom indices in the mol object
- Parameters:
mol (rdkit.Chem.Mol) – An
rdkit.Chem.Molobject- Return type:
A SMILES string
Notes
This is intended as a way to store the connectivity and order of a matrix of coordinates
- highlight_pairs(mol, feature_indices)#
Highlight specified pairs of atoms in an image of an
rdkit.Chem.Molobject- Parameters:
mol (rc.Mol) – The
Molobjectfeature_indices (Sequence[FeatureDescriptor]) – A list of tuples of indices for various features.
- Return type:
Raw PNG data