gufe.components.solventcomponent¶
Classes
|
Base class for solvated components. |
|
|
- class gufe.components.solventcomponent.BaseSolventComponent(*args, **kwargs)¶
Base class for solvated components.
This base class is used both for explicitly solvated components and “abstractly” solvated components (i.e.
SolventComponent).- abstract property name: str¶
- abstract property total_charge: int | None¶
Net formal charge for the
Component, if defined.
- 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.
- class gufe.components.solventcomponent.SolventComponent(*, smiles: str = 'O', positive_ion: str = 'Na+', negative_ion: str = 'Cl-', neutralize: bool = True, ion_concentration: Quantity = <Quantity(0.15, 'molar')>)¶
Componentrepresenting solvation in a chemical system.This component represents the abstract idea of the solvent and ions present around the other components, rather than a list of specific water molecules and their coordinates. This abstract representation is later made concrete by specific MD engine methods.
- Parameters:
smiles (str, optional) – smiles of the solvent, default ‘O’ (water)
positive_ion (str) – the pair of ions which is used to neutralize (if neutralize=True) and bring the solvent to the required ionic concentration. Must be a positive and negative monoatomic ions, defaults “Na+”, “Cl-”
negative_ion (str) – the pair of ions which is used to neutralize (if neutralize=True) and bring the solvent to the required ionic concentration. Must be a positive and negative monoatomic ions, defaults “Na+”, “Cl-”
neutralize (bool, optional) – if the net charge on the chemical state is neutralized by the ions in this solvent component. Default True
ion_concentration (openff.units.unit.Quantity, optional) – ionic concentration required, default 0.15 * unit.molar this must be supplied with units, e.g. “1.5 * unit.molar”
Examples
To create a sodium chloride solution at 0.2 molar concentration:
>>> s = SolventComponent(position_ion='Na', negative_ion='Cl', ... ion_concentration=0.2 * unit.molar)
- property name: str¶
- property smiles: str¶
SMILES representation of the solvent molecules
- property positive_ion: str | None¶
The cation in the solvent state
- property negative_ion: str | None¶
The anion in the solvent state
- property neutralize: bool¶
If the solvent neutralizes the system overall
- property ion_concentration: Quantity¶
Concentration of ions in the solvent state
- 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.
- property total_charge¶
Solvents don’t have a formal charge defined so this returns None