ace_potential

ACE potential class.

It writes a .yace file (ACE potential file) that is readable by LAMMPS. When only the coupling coefficients are saved to the .yace file, this acts as a parameter file with which one can evaluate ACE descriptors.

class ACEPotential(elements, reference_energy, ranks, nmax, lmax, nradbase, rcut, lmbda, css, rcutinner=0.0, drcutinner=0.01, lmin=1, manual_labels=None, **kwargs)[source]

Bases: object

Class to manage interface between ACE descriptor enumeration library and LAMMPS. By default, it will enumerate ACE descriptors according to the Permutation-adapted approach described in https://doi.org/10.1016/j.jcp.2024.113073.

However, there are options for assigning descriptor labels if desired, manually for example.

After enumerating descriptors, it assigns all relevant hyperparamters needed to evaluate the ACE descriptors in LAMMPS. It saves a .yace file needed to evaluate ACE descriptors in LAMMPS (containing coupling coefficients). It does this by writing an ACE potential file, readable by LAMNMPS, that contains only information to evaluate descriptors, not energy models.

Parameters:
  • elements (List) – List of elements (symbols), including ‘G’ for the grid points. In ACE, all possible combinations of these elements determine the “bond types” spanned by the ACE chemical basis (the chemical basis is the delta function basis used in Drautz 2019). For example, the “bond types” resulting from all possible combinations of [‘Al’,’G’] are determined with itertools.product() in python. They are (Al,Al)(Al,G)(G,Al)(G,G). For mala, only those of type (G,X) are kept, (grid-atom interactions) and only a placeholder is kept for other interaction types.

  • reference_ens (List) – List of reference energies. (To be applied only for linear models) with a constant shift to the energy per element type. Values other than 0 not be necessary in MALA.

  • ranks (List) – Orders of the expansion, referred to as N in Drautz 2019, of the descriptors to be enumerated

  • nmax (List) – Maximum radial basis function index per descriptor rank

  • lmax (List) – Maximum angular momentum number per descriptor rank (maximum angular function index)

  • nradbase (int) – Maximum radial basis function index OVERALL: max(nmax) - in the future, may be used to define the number of g_k(r) comprising R_nl from Drautz 2019 radial basis.

  • rcut (float/list) – radial basis function cutoff per bond type. For example, if elements are [‘Al’,’G’] then rcut must be supplied for each:(Al,Al)(Al,G)(G,Al)(G,G)

  • lmbda (float/list) – Exponential factor for scaled distance in Drautz 2019 used in the radial basis functions. As with the radial cutoff, lambda must be supplied per bond type. For example, if elements are [‘Al’,’G’] then lambda must be supplied for each:(Al,Al)(Al,G)(G,Al)(G,G)

  • css (dict) – Dictionary of coupling coefficients of the format: {rank:{l:{m:coupling_coefficient}}

  • rcutinner (List) – Inner cutoff to turn on soft-core repulsions. This parameter should be 0.0 (OFF) for each bond type in MALA.

  • drcutinner (List) –

    Parameter for soft-core repulsions. This parameter should not matter if rcutinner is

    0.0 (OFF) for each bond type in MALA.

  • lmin (int/list) – Lower bound on angular momentum quantum number per rank.

  • manual_labels (str) – File for loading labels. If not None, then labels will be loaded from this json file. If None, then labels will be generated using the pa_labels_raw function (default).

  • **kwarg (dict) – Additional keyword arguments.

Returns:

ACEPotential – Class containing ACE descriptor and hyperparamter info.

Return type:

class

set_funcs(nulst=None, print_0s=True)[source]

Set ctilde ‘functions’ in the .yace file, used to calculate descriptors in lammps.

Parameters:
  • nulst (List) – List of nus, a.k.a. ACE descriptor labels to write to the .yace file.

  • print_0s (bool) – Logical to include 0-valued descriptors, this should always be True in MALA as 0-valued descriptors only arise after training linear models with sparsifying solvers like LASSO

write_pot(name)[source]

Write coupling coefficients to file.

Parameters:

name (str) – Name (without file ending) of the file to write to.

Returns:

name – Filename of the written file (with file ending)

Return type:

str