gbsa
GB-OBC implicit solvent with ACE surface-area approximation.
import mlx_atomistic.gbsa
Classes
Section titled “Classes”GBSAForcePotential
Section titled “GBSAForcePotential”class GBSAForcePotential def __init__(charges: object, radius: object, scale: object, solvent_dielectric: float = DEFAULT_SOLVENT_DIELECTRIC, solute_dielectric: float = DEFAULT_SOLUTE_DIELECTRIC, surface_area_energy: float = DEFAULT_SURFACE_AREA_ENERGY_KJ_MOL_A2, probe_radius: float = DEFAULT_PROBE_RADIUS_A, radius_offset: float = DEFAULT_RADIUS_OFFSET_A, coulomb_constant: float = DEFAULT_COULOMB_CONSTANT_KJ_MOL_ANGSTROM, name: str = 'gbsa', supports_virial: bool = True)Generalized-Born OBC implicit solvent plus ACE nonpolar term.
Positions and radii are in Angstrom. Energies are in kJ/mol. The implementation follows the OpenMM CustomGBForce OBC example, with pairwise Born integral accumulation and the ACE surface-area term.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
charges | object | ||
radius | object | ||
scale | object | ||
solvent_dielectric | float | DEFAULT_SOLVENT_DIELECTRIC | |
solute_dielectric | float | DEFAULT_SOLUTE_DIELECTRIC | |
surface_area_energy | float | DEFAULT_SURFACE_AREA_ENERGY_KJ_MOL_A2 | |
probe_radius | float | DEFAULT_PROBE_RADIUS_A | |
radius_offset | float | DEFAULT_RADIUS_OFFSET_A | |
coulomb_constant | float | DEFAULT_COULOMB_CONSTANT_KJ_MOL_ANGSTROM | |
name | str | 'gbsa' | |
supports_virial | bool | True |
Methods
ace_surface_area_energy
Section titled “ace_surface_area_energy”def ace_surface_area_energy(positions: object, cell: Cell | None = None) -> mx.arrayReturn the ACE nonpolar (surface-area) solvation energy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | object | Atomic coordinates, shape (n_atoms, 3). | |
cell | Cell | None | None | Optional periodic cell; when given, distances use the minimum-image convention. Defaults to None. |
Returns
mx.array— The nonpolar solvation energy as a scalar array.
energy_forces
Section titled “energy_forces”def energy_forces(positions: object, cell: Cell | None = None, pairs: object | None = None) -> tuple[mx.array, mx.array]Return the GB/SA implicit-solvent energy and per-atom forces.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | object | Atomic coordinates, shape (n_atoms, 3). | |
cell | Cell | None | None | Optional periodic cell; when given, distances use the minimum-image convention. Defaults to None. |
pairs | object | None | None | Accepted for interface uniformity and ignored; the term uses its stored index list. Defaults to None. |
Returns
tuple[mx.array, mx.array]— An(energy, forces)tuple: scalar energy and per-atom forces of shape(n_atoms, 3).
potential_energy
Section titled “potential_energy”def potential_energy(positions: object, cell: Cell | None = None, pairs: object | None = None) -> mx.arrayReturn the GB/SA implicit-solvent energy (polar + nonpolar terms).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | object | Atomic coordinates, shape (n_atoms, 3). | |
cell | Cell | None | None | Optional periodic cell; when given, distances use the minimum-image convention. Defaults to None. |
pairs | object | None | None | Accepted for interface uniformity and ignored; the term uses its stored index list. Defaults to None. |
Returns
mx.array— Total implicit-solvent energy as a scalar array.