Skip to content

Commit 34a1397

Browse files
committed
formatting docs and additional updates
1 parent a2086b8 commit 34a1397

File tree

9 files changed

+179
-213
lines changed

9 files changed

+179
-213
lines changed

mala/common/parameters.py

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -471,50 +471,47 @@ class ParametersDescriptors(ParametersBase):
471471
descriptor calculation.
472472
473473
ace_ranks : list
474-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
475-
how to best communicate to users how to set this.
474+
Orders of the expansion, referred to as `N` in Drautz 2019, of the
475+
descriptors to be enumerated
476476
477477
ace_nmax : list
478-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
479-
how to best communicate to users how to set this.
478+
Maximum radial basis function index per descriptor rank
480479
481480
ace_lmax : list
482-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
483-
how to best communicate to users how to set this.
481+
Maximum angular momentum number per descriptor rank (maximum angular function index)
484482
485483
ace_lmin : list
486-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
487-
how to best communicate to users how to set this.
484+
Lower bound on angular momentum quantum number per rank.
488485
489486
ace_nshell : list
490-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
491-
how to best communicate to users how to set this.
487+
Number(s) to multiply atomic radii by to get radial cutoffs
492488
493489
ace_apply_shift : list
494-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
495-
how to best communicate to users how to set this.
490+
Constants to shift radial cutoffs by (useful for small elements like H).
496491
497492
ace_metal_max : list
498-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
499-
how to best communicate to users how to set this.
493+
Maximize radial cutoffs for "metals", effectively increases radial cutoffs for certain elements.
500494
501495
ace_use_vdw : list
502-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
503-
how to best communicate to users how to set this.
496+
Flag to use vdW radii (larger automated radial cutoffs generated).
504497
505498
ace_L_R : list
506-
ACE_DOCS_MISSING: I am not sure how to set this.
499+
Resultant angular momentum quantum number. This determines the equivariant
500+
character of the rank N descriptor after reduction. L_R=0 corresponds to
501+
a rotationally invariant feature, L_R=1 corresponds to a feature that
502+
transforms like a vector, L_R=2 a tensor, etc.
507503
508504
ace_M_R : list
509-
ACE_DOCS_MISSING: I am not sure how to set this.
505+
Resultant projection quantum number. This also determines the equivariant
506+
character of the rank N descriptor after reduction. M_R must obey
507+
-L_R <= M_R <= L_R
510508
511509
ace_coupling_type : str
512510
Coupling type used for reduction of spherical harmonic products.
513511
Can be "clebsch_gordan" or "wigner_3j".
514512
515513
ace_reduction_coefficients_lmax : int
516-
ACE_DOCS_MISSING: I think I know what this does, but I am not sure
517-
how to best communicate to users how to set this.
514+
Global maximum angular momentum for precalculating generalized coupling coefficients.
518515
"""
519516

520517
def __init__(self):

mala/descriptors/ace.py

Lines changed: 60 additions & 65 deletions
Large diffs are not rendered by default.

mala/descriptors/acelib/ace_potential.py

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,11 @@
1616

1717
class ACEPotential:
1818
"""
19-
Class to manage interface between ACE descriptor enumeration library and
20-
LAMMPS. By default, it will enumerate ACE descriptors according to the
21-
Permutation-adapted approach described in https://doi.org/10.1016/j.jcp.2024.113073.
22-
However, there are options for assigning descriptor labels if desired, manually
23-
for example.
24-
25-
After enumerating descriptors, it assigns all relevant hyperparamters needed
26-
to evaluate the ACE descriptors in LAMMPS. It saves a .yace file needed to
27-
evaluate ACE descriptors in LAMMPS (containing coupling coefficients). It does this
28-
by writing an ACE potential file, readable by LAMNMPS, that contains only
29-
information to evaluate descriptors, not energy models.
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+
21+
However, there are options for assigning descriptor labels if desired, manually for example.
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.
3024
3125
Parameters
3226
----------
@@ -79,7 +73,7 @@ class ACEPotential:
7973
0.0 (OFF) for each bond type in MALA.
8074
8175
lmin : int/list
82-
lower bound on angular momentum quantum number per rank.
76+
Lower bound on angular momentum quantum number per rank.
8377
8478
manual_labels : str
8579
File for loading labels. If not None, then labels will be loaded from
@@ -88,6 +82,11 @@ class ACEPotential:
8882
8983
**kwarg : dict
9084
Additional keyword arguments.
85+
86+
Returns
87+
-------
88+
ACEPotential : class
89+
Class containing ACE descriptor and hyperparamter info.
9190
"""
9291

9392
def __init__(
@@ -231,9 +230,9 @@ def __init__(
231230

232231
def __set_embeddings(self, npoti="FinnisSinclair", FSparams=[1.0, 1.0]):
233232
"""
234-
Set 'embeddings' in the .yace file for lammps. Some terms here control
235-
if a square-root embedding term is added. This should always be OFF
236-
for descriptor calculations in MALA
233+
Set 'embeddings' in the .yace file for lammps. Some terms here control if a square-root embedding term is added.
234+
235+
This should always be OFF for descriptor calculations in MALA.
237236
238237
Parameters
239238
----------
@@ -263,12 +262,11 @@ def __set_bonds(self):
263262

264263
def __set_bond_base(self):
265264
"""
266-
Set the per-bond radial basis parameters. The 'bonds' are determined based
267-
on the elements. If the elements are ['Al','G'], the bonds may be
268-
determined with :code:`itertools.product()` in python. They are
269-
(Al,Al)(Al,G)(G,Al)(G,G). Some hyperparameters must be specified per bond
270-
label shown here.
265+
Set the per-bond radial basis parameters. The 'bonds' are determined based on the elements.
266+
267+
If the elements are ['Al','G'], the bonds may be determined with :code:`itertools.product()` in python. They are (Al,Al)(Al,G)(G,Al)(G,G).
271268
269+
Some hyperparameters must be specified per bond label shown here.
272270
273271
"""
274272
bondstrs = ["[%d, %d]" % (b[0], b[1]) for b in self.__bondlsts]
@@ -352,8 +350,7 @@ def __set_bond_base(self):
352350

353351
def set_funcs(self, nulst=None, print_0s=True):
354352
"""
355-
Set ctilde 'functions' in the .yace file, used to calculate
356-
descriptors in lammps
353+
Set ctilde 'functions' in the .yace file, used to calculate descriptors in lammps.
357354
358355
Parameters
359356
----------

mala/descriptors/acelib/clebsch_gordan_coupling.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ def clebsch_gordan_coupling(
99
):
1010
"""
1111
Compute generalized Clebsch-Gordan coefficients for a given L_R.
12-
These are all defined according to the pairwise coupling scheme
13-
in Goff et al. 2024.
1412
15-
The approach to construct generalized Clebsch-Gordan coefficients is
16-
manually defined for each rank for pedagogical and clarity purposes.
13+
These are all defined according to the pairwise coupling scheme in Goff et al. 2024.
14+
15+
The approach to construct generalized Clebsch-Gordan coefficients is manually defined for each rank for pedagogical and clarity purposes.
1716
1817
Parameters
1918
----------
@@ -53,15 +52,10 @@ def _rank_1_tree(_clebsch_gordan_coefficients, _l, _L_R=0, _M_R=0):
5352
list of angular momentum quantum numbers [l1]
5453
5554
_L_R : int
56-
Resultant angular momentum quantum number. This determines the equivariant
57-
character of the rank N descriptor after reduction. L_R=0 corresponds to
58-
a rotationally invariant feature, L_R=1 corresponds to a feature that
59-
transforms like a vector, L_R=2 a tensor, etc.
55+
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.
6056
6157
_M_R : int
62-
Resultant projection quantum number. This also determines the equivariant
63-
character of the rank N descriptor after reduction. M_R must obey
64-
-L_R <= M_R <= L_R
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.
6559
6660
Returns
6761
-------

mala/descriptors/acelib/common_utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
def filled_perm(tuples, rank):
1010
"""
11-
Returns a sympy Permutation object for permutations tabulated from GAP. This function
12-
uses `rank` to fill in missing permutation indices from GAP. For example tuples = [(0,1)],
13-
rank=4 would yeild Permutation(3)(0,1) corresponding to the cycles (0,1)(2)(3)
11+
Return sympy Permutation object for permutations tabulated from GAP. This function uses `rank` to fill in missing permutation indices from GAP.
12+
13+
For example tuples = [(0,1)], rank=4 would yeild Permutation(3)(0,1) corresponding to the cycles (0,1)(2)(3).
1414
1515
Parameters
1616
----------
@@ -203,8 +203,9 @@ def get_ms(l_vector, M_R=0):
203203

204204
def check_triangle(l1, l2, l3):
205205
"""
206-
check if three quantum angular momenta obey triangle conditions. Note that
207-
the order matters.
206+
Check if three quantum angular momenta obey triangle conditions.
207+
208+
Note that the order matters.
208209
209210
Parameters
210211
----------

0 commit comments

Comments
 (0)