_base

class mlptrain.potentials._base.MLPotential(name: str, system: System)

Bases: ABC

__init__(name: str, system: System)

Machine learnt potential. Name defines the name of the potential which will be saved. Training data is populated

al_train(method_name: str, **kwargs) None

Train this MLP using active learning (AL) using a defined reference method

al_train_then_bias(method_name: str, coordinate: ReactionCoordinate, min_coordinate: float | None = None, max_coordinate: float | None = None, **kwargs) None

Active learning that ensures sufficient sampling over a coordinate. Adds a single harmonic bias to the least well sampled regions of a histogram of coordinate values obtained in the AL e.g. for a reaction coordinate histogram that looks like:


/ /———
Frequency | / | /
___/ |_/
|________________________

coordinate

then two harmonic biases would be added in the two minimums

Parameters:
  • min_coordinate – Minimum value of the coordinate to consider sampling over

  • max_coordinate

abstract property ase_calculator: ASECalculator

Generate an ASE calculator for this potential

copy() MLPotential
property n_eval: int

Number of reference evaluations used to generate this potential

property n_train: int

Number of training configurations used to train this potential

predict(*args) None

Predict energies and forces using a MLP in serial

abstract property requires_atomic_energies: bool

Does this potential need E_0s for each atom to be specified

abstract property requires_non_zero_box_size: bool

Can this potential be run in a box with side lengths = 0

set_atomic_energies(method_name: str) None

Set the atomic energies of all atoms in this system

train(configurations: ConfigurationSet | None = None) None

Train this potential on a set of configurations

Raises:

(RuntimeError)

property training_data: ConfigurationSet

Training data which this potential was trained on

Return type:

(mlt.ConfigurationSet)