gufe.components.explicitmoleculecomponent¶
Classes
|
Base class for explicit molecules. |
- class gufe.components.explicitmoleculecomponent.ExplicitMoleculeComponent(rdkit: rdkit.Chem.rdchem.Mol, name: str = '')¶
Base class for explicit molecules. Assumes that the molecule can be represented as an rdkit.Chem.Mol object.
Provides basic serialization and conversion to different representations. Specific file formats, such as SDF for small molecules or PDB for proteins, should be implemented in subclasses.
- property name: str¶
- property smiles: str¶
- property total_charge¶
Net formal charge for the
Component, if defined.
- to_rdkit() rdkit.Chem.rdchem.Mol¶
Return an RDKit copied representation of this molecule
- classmethod from_rdkit(rdkit: rdkit.Chem.rdchem.Mol, name: str = '')¶
Create a Component, copying from an RDKit Mol
- validate()¶
Validate this Component.
This method may be overridden by subclasses to implement component-specific consistency or sanity checks.
Implementations should raise an exception if validation fails. The base implementation performs no checks.