You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mala/descriptors/acelib/ace_potential.py
+68-37Lines changed: 68 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
"""
2
2
ACE potential class.
3
3
4
-
Computes the coupling coefficients. ACE_DOCS_MISSING: Why is this called
5
-
"potential" - would this work as an actual ACE potential or is this just the
6
-
expansion coefficients?
4
+
It writes a .yace file (ACE potential file) that is readable by LAMMPS. When only the
5
+
coupling coefficients are saved to the .yace file, this acts as a parameter
6
+
file with which one can evaluate ACE descriptors.
7
7
"""
8
8
9
9
importitertools
@@ -16,49 +16,64 @@
16
16
17
17
classACEPotential:
18
18
"""
19
-
Class for calculation of ACE coupling coefficients.
19
+
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.
20
20
21
-
ACE_DOCS_MISSING: Explain scope of class. I think we always assume PA
22
-
basis, but I don't know what that is.
21
+
However, there are options for assigning descriptor labels if desired, manually for example.
23
22
23
+
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.
24
+
24
25
Parameters
25
26
----------
26
27
elements : List
27
-
List of elements (symbols)
28
+
List of elements (symbols), including 'G' for the grid points. In ACE, all possible
29
+
combinations of these elements determine the "bond types" spanned by the ACE chemical
30
+
basis (the chemical basis is the delta function basis used in Drautz 2019). For
31
+
example, the "bond types" resulting from all possible combinations of ['Al','G'] are
32
+
determined with :code:`itertools.product()` in python. They are (Al,Al)(Al,G)(G,Al)(G,G).
33
+
For mala, only those of type (G,X) are kept, (grid-atom interactions) and only a placeholder
34
+
is kept for other interaction types.
28
35
29
36
reference_ens : List
30
-
List of floats, has same dimensions as elements. ACE_DOCS_MISSING:
31
-
What does it do?
37
+
List of reference energies. (To be applied only for linear models) with a constant
38
+
shift to the energy per element type. Values other than 0 not be necessary in MALA.
32
39
33
40
ranks : List
34
-
ACE_DOCS_MISSING
41
+
Orders of the expansion, referred to as `N` in Drautz 2019, of the
42
+
descriptors to be enumerated
35
43
36
44
nmax: List
37
-
ACE_DOCS_MISSING
45
+
Maximum radial basis function index per descriptor rank
38
46
39
47
lmax: List
40
-
ACE_DOCS_MISSING
48
+
Maximum angular momentum number per descriptor rank (maximum angular function index)
41
49
42
50
nradbase : int
43
-
ACE_DOCS_MISSING
51
+
Maximum radial basis function index OVERALL: max(nmax) - in the future, may be used
52
+
to define the number of g_k(r) comprising R_nl from Drautz 2019 radial basis.
44
53
45
-
rcut : float
46
-
ACE_DOCS_MISSING
54
+
rcut : float/list
55
+
radial basis function cutoff per bond type. For example, if elements are ['Al','G']
56
+
then rcut must be supplied for each:(Al,Al)(Al,G)(G,Al)(G,G)
47
57
48
-
lmbda : float
49
-
ACE_DOCS_MISSING
58
+
lmbda : float/list
59
+
Exponential factor for scaled distance in Drautz 2019 used in the radial basis
60
+
functions. As with the radial cutoff, lambda must be supplied per bond type. For
61
+
example, if elements are ['Al','G'] then lambda must be supplied for
62
+
each:(Al,Al)(Al,G)(G,Al)(G,G)
50
63
51
64
css : dict
52
-
ACE_DOCS_MISSING
65
+
Dictionary of coupling coefficients of the format: {rank:{l:{m:coupling_coefficient}}
53
66
54
67
rcutinner : List
55
-
ACE_DOCS_MISSING
68
+
Inner cutoff to turn on soft-core repulsions. This parameter should be 0.0 (OFF) for
69
+
each bond type in MALA.
56
70
57
71
drcutinner : List
58
-
ACE_DOCS_MISSING
72
+
Parameter for soft-core repulsions. This parameter should not matter if rcutinner is
73
+
0.0 (OFF) for each bond type in MALA.
59
74
60
-
lmin : int
61
-
ACE_DOCS_MISSING
75
+
lmin : int/list
76
+
Lower bound on angular momentum quantum number per rank.
62
77
63
78
manual_labels : str
64
79
File for loading labels. If not None, then labels will be loaded from
@@ -67,12 +82,17 @@ class ACEPotential:
67
82
68
83
**kwarg : dict
69
84
Additional keyword arguments.
85
+
86
+
Returns
87
+
-------
88
+
ACEPotential : class
89
+
Class containing ACE descriptor and hyperparamter info.
70
90
"""
71
91
72
92
def__init__(
73
93
self,
74
94
elements,
75
-
reference_ensemble,
95
+
reference_energy,
76
96
ranks,
77
97
nmax,
78
98
lmax,
@@ -89,15 +109,22 @@ def __init__(
89
109
ifkwargsisnotNone:
90
110
self.__dict__.update(kwargs)
91
111
92
-
# ACE_DOCS_MISSING: Explain what all these variables do, at least
93
-
# briefly, and give them more meaningful names.
112
+
#NOTE Our unused variable names here match exactly what is in LAMMPS
113
+
# I'm hesitant to change these to something else. We wont use them in MALA
114
+
# and if people are really interested, they can find them in the lammps
115
+
# source code directly
116
+
#coupling coefficients (generalized Wigner symbols or Generalized Clebsch-Gordan coefficients)
Resultant angular momentum quantum number. This determines the equivariant character of the rank N descriptor after reduction. L_R=0 corresponds to a rotationally invariant feature, L_R=1 corresponds to a feature that transforms like a vector, L_R=2 a tensor, etc.
53
56
54
57
_M_R : int
55
-
ACE_DOCS_MISSING
58
+
Resultant projection quantum number. This also determines the equivariant character of the rank N descriptor after reduction. M_R must obey -L_R <= M_R <= L_R.
0 commit comments