Skip to content

gbsa

GB-OBC implicit solvent with ACE surface-area approximation.

import mlx_atomistic.gbsa

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

NameTypeDefaultDescription
chargesobject
radiusobject
scaleobject
solvent_dielectricfloatDEFAULT_SOLVENT_DIELECTRIC
solute_dielectricfloatDEFAULT_SOLUTE_DIELECTRIC
surface_area_energyfloatDEFAULT_SURFACE_AREA_ENERGY_KJ_MOL_A2
probe_radiusfloatDEFAULT_PROBE_RADIUS_A
radius_offsetfloatDEFAULT_RADIUS_OFFSET_A
coulomb_constantfloatDEFAULT_COULOMB_CONSTANT_KJ_MOL_ANGSTROM
namestr'gbsa'
supports_virialboolTrue

Methods

def ace_surface_area_energy(positions: object, cell: Cell | None = None) -> mx.array

Return the ACE nonpolar (surface-area) solvation energy.

Parameters

NameTypeDefaultDescription
positionsobjectAtomic coordinates, shape (n_atoms, 3).
cellCell | NoneNoneOptional periodic cell; when given, distances use the minimum-image convention. Defaults to None.

Returns

  • mx.array — The nonpolar solvation energy as a scalar array.
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

NameTypeDefaultDescription
positionsobjectAtomic coordinates, shape (n_atoms, 3).
cellCell | NoneNoneOptional periodic cell; when given, distances use the minimum-image convention. Defaults to None.
pairsobject | NoneNoneAccepted 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).
def potential_energy(positions: object, cell: Cell | None = None, pairs: object | None = None) -> mx.array

Return the GB/SA implicit-solvent energy (polar + nonpolar terms).

Parameters

NameTypeDefaultDescription
positionsobjectAtomic coordinates, shape (n_atoms, 3).
cellCell | NoneNoneOptional periodic cell; when given, distances use the minimum-image convention. Defaults to None.
pairsobject | NoneNoneAccepted 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.