ZBL short-range potential

class metatrain.utils.additive.zbl.ZBL(model_hypers: Dict, dataset_info: DatasetInfo)[source]

Bases: Module

A simple model for short-range repulsive interactions.

The implementation here is equivalent to its LAMMPS counterpart, where we set the inner cutoff to 0 and the outer cutoff to the sum of the covalent radii of the two atoms as tabulated in ASE. Covalent radii that are not available in ASE are set to 0.2 Å (and a warning is issued).

Parameters:
  • model_hypers (Dict) – A dictionary of model hyperparameters. This contains the “inner_cutoff” and “outer_cutoff” keys, which are the inner and outer cutoffs for the ZBL potential.

  • dataset_info (DatasetInfo) – An object containing information about the dataset, including target quantities and atomic types.

Initialize internal Module state, shared by both nn.Module and ScriptModule.

restart(dataset_info: DatasetInfo) ZBL[source]

Restart the model with a new dataset info.

Parameters:

dataset_info (DatasetInfo) – New dataset information to be used.

Return type:

ZBL

forward(systems: List[System], outputs: Dict[str, ModelOutput], selected_atoms: Labels | None = None) Dict[str, TensorMap][source]

Compute the energies of a system solely based on a ZBL repulsive potential.

Parameters:
  • systems (List[System]) – List of systems to calculate the ZBL energy.

  • outputs (Dict[str, ModelOutput]) – Dictionary containing the model outputs.

  • selected_atoms (Labels | None) – Optional selection of atoms for which to compute the predictions.

Returns:

A dictionary with the computed predictions for each system.

Raises:

ValueError – If the outputs contain unsupported keys.

Return type:

Dict[str, TensorMap]

get_pairwise_zbl(zi, zj, rij)[source]

Ziegler-Biersack-Littmark (ZBL) potential.

Inputs are the atomic numbers (zi, zj) of the two atoms of interest and their distance rij.

requested_neighbor_lists() List[NeighborListOptions][source]
Return type:

List[NeighborListOptions]

static is_valid_target(target_name: str, target_info: TargetInfo) bool[source]

Finds if a TargetInfo object is compatible with the ZBL model.

Parameters:
  • target_info (TargetInfo) – The TargetInfo object to be checked.

  • target_name (str)

Return type:

bool