compute pace command
Syntax
compute ID group-ID pace ace_potential_filename ... keyword values ...
ID, group-ID are documented in compute command
pace = style name of this compute command
ace_potential_filename = file name (in the .yace or .ace format from pace pair_style) including ACE hyper-parameters, bonds, and generalized coupling coefficients
keyword = bikflag or dgradflag
bikflag value = 0 or 1 0 = descriptors are summed over atoms of each type 1 = descriptors are listed separately for each atom dgradflag value = 0 or 1 0 = descriptor gradients are summed over atoms of each type 1 = descriptor gradients are listed separately for each atom pair
Examples
compute pace all pace coupling_coefficients.yace
compute pace all pace coupling_coefficients.yace 0 1
compute pace all pace coupling_coefficients.yace 1 1
Description
Added in version 7Feb2024.
This compute calculates a set of quantities related to the atomic cluster expansion (ACE) descriptors of the atoms in a group. ACE descriptors are highly general atomic descriptors, encoding the radial and angular distribution of neighbor atoms, up to arbitrary bond order (rank). The detailed mathematical definition is given in the paper by (Drautz). These descriptors are used in the pace pair_style. Quantities obtained from compute pace are related to those used in pace pair_style to evaluate atomic energies, forces, and stresses for linear ACE models.
For example, the energy for a linear ACE model is calculated as:
where the bracketed terms on the right-hand side are the combined functions
with linear model parameters typically provided in the <name>.yace potential
file for pace pair_style. When these bracketed terms are multiplied by the
products of the atomic base from (Drautz),
The coefficient file, <name>.yace, ultimately defines the number of ACE descriptors to be computed, their maximum body-order, the degree of angular character they have, the degree of radial character they have, the chemical character (which element-element interactions are encoded by descriptors), and other hyper-parameters defined in (Drautz). These may be modeled after the potential files in pace pair_style, and have the same format. Details on how to generate the coefficient files to train ACE models may be found in FitSNAP.
The keyword bikflag determines whether or not to list the descriptors of
each atom separately, or sum them together and list in a single row. If
bikflag is set to 0 then a single descriptor row is used, which contains
the per-atom ACE descriptors
The keyword dgradflag determines whether to sum atom gradients or list
them separately. If dgradflag is set to 0, the ACE
descriptor gradients w.r.t. atom j are summed over all atoms i’
of, which may be useful when training linear ACE models on atomic forces.
If dgradflag is set to 1, gradients are listed separately for each pair of atoms.
Each row corresponds
to a single term
Note
It is noted here that in contrast to pace pair_style,
the .yace file for compute pace typically should not contain linear
parameters for an ACE potential. If
Note
Generalized Clebsch-Gordan or Generalized Wigner symbols (with appropriate factors) must be used to evaluate ACE descriptors with this compute. There are multiple ways to define the generalized coupling coefficients. Because of this, this compute will not revert your potential file to a coupling coefficient file. Instead this compute allows the user to supply coupling coefficients that follow any convention.
Note
Using dgradflag = 1 produces a global array with
Note
If you have a bonded system, then the settings of special_bonds command can remove pairwise interactions between atoms in the same bond, angle, or dihedral. This is the default setting for the special_bonds command, and means those pairwise interactions do not appear in the neighbor list. Because this fix uses the neighbor list, it also means those pairs will not be included in the calculation. One way to get around this, is to write a dump file, and use the rerun command to compute the ACE descriptors for snapshots in the dump file. The rerun script can use a special_bonds command that includes all pairs in the neighbor list.
Output info
Compute pace evaluates a global array. The columns are arranged into ntypes blocks, listed in order of atom type I. Each block contains one column for each ACE descriptor, the same as for compute sna/atomin compute snap. A final column contains the corresponding energy, force component on an atom, or virial stress component. The rows of the array appear in the following order:
1 row: pace average descriptor values for all atoms of type I
3*n force rows: quantities, with derivatives w.r.t. x, y, and z coordinate of atom i appearing in consecutive rows. The atoms are sorted based on atom ID and run up to the total number of atoms, n.
6 rows: virial quantities summed for all atoms of type I
For example, if
If the bik keyword is set to 1, the structure of the pace array is expanded.
The first
If the dgradflag keyword is set to 1, this changes the structure of the global array completely. Here the per-atom quantities are replaced with rows corresponding to descriptor gradient components on single atoms:
where
These values can be accessed by any command that uses global values from a compute as input. See the Howto output doc page for an overview of LAMMPS output options.
Restrictions
These computes are part of the ML-PACE package. They are only enabled if LAMMPS was built with that package. See the Build package page for more info.
Default
The optional keyword defaults are bikflag = 0, dgradflag = 0
(Drautz) Drautz, Phys Rev B, 99, 014104 (2019).
(Lysogorskiy) Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
(Goff) Goff, Zhang, Negre, Rohskopf, Niklasson, Journal of Chemical Theory and Computation 19, no. 13 (2023).