boltz_data.rdkit#
RDKit utilities for data preparation.
Functions
Create an RDKit Mol object from a ChemicalComponent. |
|
|
Create an RDKit Mol object from an EntityDefinition. |
|
Parse a SMILES string into an RDKit molecule. |
- boltz_data.rdkit.rdmol_from_chemical_component(chemical_component, /)[source]#
Create an RDKit Mol object from a ChemicalComponent.
- Return type:
- Parameters:
chemical_component (ChemicalComponent)
- boltz_data.rdkit.rdmol_from_definition(definition, /, *, chemical_component_dictionary)[source]#
Create an RDKit Mol object from an EntityDefinition.
- Return type:
- Parameters:
definition (ProteinDefinition | RNADefinition | DNADefinition | LigandCCDDefinition | LigandSMILESDefinition | BranchedPolymerDefinition)
chemical_component_dictionary (Mapping[str, ChemicalComponent])
- boltz_data.rdkit.rdmol_from_smiles(smiles, /)[source]#
Parse a SMILES string into an RDKit molecule.
- Parameters:
smiles (
str) – A valid SMILES string representing the molecule.- Return type:
- Returns:
An RDKit Mol object.
- Raises:
ValueError – If the SMILES string is invalid or cannot be parsed.
Example
>>> mol = rdmol_from_smiles("CCO") # Ethanol >>> mol.GetNumAtoms() 3 # Without hydrogens