-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path__init__.py
More file actions
36 lines (32 loc) · 979 Bytes
/
Copy path__init__.py
File metadata and controls
36 lines (32 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""MoleCode — small-molecule representation.
Deterministic, RDKit-backed, lossless conversion between RDKit molecules /
SMILES and the MoleCode Mermaid graph language for small molecules.
>>> from molecode.molecule import mol_to_mermaid, mermaid_to_mol, mol_to_smiles
>>> from rdkit import Chem
>>> mermaid = mol_to_mermaid(Chem.MolFromSmiles("CCO"), name="Ethanol")
>>> mol_to_smiles(mermaid_to_mol(mermaid))
'CCO'
"""
from .rdkit_to_mermaid import MolToMermaidConverter, mol_to_mermaid
from .mermaid_to_rdkit import (
MermaidMolParser,
mermaid_to_mol,
mol_to_smiles,
mol_to_inchi,
has_invalid_atoms,
get_invalid_atom_labels,
visualize_mol,
visualize_mols_grid,
)
__all__ = [
"MolToMermaidConverter",
"mol_to_mermaid",
"MermaidMolParser",
"mermaid_to_mol",
"mol_to_smiles",
"mol_to_inchi",
"has_invalid_atoms",
"get_invalid_atom_labels",
"visualize_mol",
"visualize_mols_grid",
]