Model: Base Charge Model#

Implementation of a base class for charge models.

class tad_multicharge.model.base.ChargeModel(chi, kcn, eta, rad, device=None, dtype=None)[source]#

Model for electronegativity equilibration.

chi#

Electronegativity for each element

eta#

Chemical hardness for each element

kcn#

Coordination number dependency of the electronegativity

rad#

Atomic radii for each element

abstract solve(numbers, positions, total_charge, cn, return_energy=False, solve_mode='schur')[source]#

Solve the electronegativity equilibration for the partial charges minimizing the electrostatic energy.

Parameters:
  • numbers (Tensor) – Atomic numbers of all atoms in the system. (shape: (..., nat)).

  • positions (Tensor) – Cartesian coordinates of the atoms in system (shape: (..., nat, 3)).

  • total_charge (Tensor) – Total charge of the system.

  • model (ChargeModel) – Charge model to use.

  • cn (Tensor) – Coordination numbers for all atoms in the system.

  • return_energy (bool, optional) – Return the EEQ energy as well. Defaults to False.

  • solve_mode (Literal[“schur”, “linear”], optional) – Choose the solution method for the linear system. - "schur": Use Schur-complement based method with Cholesky

    factorization (default, recommended).

    • "linear": Solve the full bordered linear system directly. Less stable and slower for large systems.

    Defaults to "schur".

Returns:

Tensor of electrostatic charges or tuple of partial charges and electrostatic energies if return_energy=True.

Return type:

Tensor | (Tensor, Tensor)