examol.utils¶
Utilities that can be used across many types of operations
examol.utils.chemistry¶
Utility operations to perform common chemistry tasks
- examol.utils.chemistry.get_baseline_charge(mol_string: str) int [source]¶
Determine the charge on a molecule from its SMILES string
Examples
H<sub>2</sub>O has a baseline charge of 0 NH<sub>4</sub>+ has a baseline charge of +1
- Parameters:
mol_string – SMILES string of the molecule
- Returns:
Charge on the molecule
examol.utils.conversions¶
Converting between different descriptions of molecules
- examol.utils.conversions.convert_nx_to_rdkit(graph: Graph) Mol [source]¶
Convert a networkx graph to a RDKit Molecule
- Parameters:
graph (nx.Graph)
- Returns:
Molecule to be converted
- Return type:
(Chem.RWMol)
- examol.utils.conversions.convert_nx_to_smiles(graph: Graph) str [source]¶
Compute a SMILES string from a networkx graph
- examol.utils.conversions.convert_rdkit_to_nx(mol: Mol) Graph [source]¶
Convert a networkx graph to a RDKit Molecule
- Parameters:
mol (Chem.RWMol) – Molecule to be converted
- Returns:
(nx.Graph) Graph format of the molecule
- examol.utils.conversions.convert_string_to_nx(mol_string: str) Graph [source]¶
Compute a networkx graph from a SMILES string
- Parameters:
mol_string – InChI or SMILES string to be parsed
- Returns:
(nx.Graph) NetworkX representation of the molecule