MoleculeNamer
- class emmet.core.featurization.robocrys.condense.molecule.MoleculeNamer(use_online_pubchem=True, name_preference=name_sources)
Bases:
object- Parameters:
use_online_pubchem (bool)
name_preference (tuple[str, ...])
- get_name_from_molecule_graph(molecule_graph)
Gets the name of a molecule from a molecule graph object.
- Return type:
str|None- Parameters:
molecule_graph (MoleculeGraph)
- Args:
molecule_graph: A molecule graph.
- Returns:
The molecule name if a match is found else
None.
- get_name_from_pubchem(smiles)
Tries to get the name of a molecule from the Pubchem website.
- Return type:
str|None- Parameters:
smiles (str)
- Args:
smiles: A SMILES string.
- Returns:
The molecule name if a match is found else
None.
- static molecule_graph_to_smiles(molecule_graph)
Converts a molecule graph to SMILES string.
- Return type:
str|None- Parameters:
molecule_graph (MoleculeGraph)
- Args:
molecule_graph: A molecule graph.
- Returns:
The SMILES representation of the molecule.