@@ -43,7 +43,7 @@ def __init__(self, parameters):
4343
4444 # Initialize a dictionary with ionic radii (in Angstrom).
4545 # and a list containing all elements which are considered metals.
46- self ._ionic_radii , self ._metal_list = self .__init_element_lists ()
46+ self ._atomic_radii , self ._metal_list = self .__init_element_lists ()
4747
4848 # Initialize several arrays that are computed using
4949 # nested for-loops but can be reused.
@@ -52,15 +52,15 @@ def __init__(self, parameters):
5252 # If a pkl file is detected, the array is loaded from the pkl file,
5353 # otherwise it is computed and saved to a pkl file.
5454 # The arrays are used within the ACE descriptor calculation.
55- # Which arrays are actually needed depends on which type of coefficients
56- # are used for the ACE descriptor calculation.
57- if self .parameters .ace_coupling_type == "wigner3j" :
55+ # Which arrays are actually needed depends on which type of
56+ # coefficients are used for the ACE descriptor calculation.
57+ if self .parameters .ace_coupling_coefficients_type == "wigner3j" :
5858 self .__precomputed_wigner_3j = self .__init_wigner_3j (
59- self .parameters .ace_reduction_coefficients_lmax
59+ self .parameters .ace_coupling_coefficients_maximum_l
6060 )
61- if self .parameters .ace_coupling_type == "clebsch_gordan" :
61+ if self .parameters .ace_coupling_coefficients_type == "clebsch_gordan" :
6262 self .__precomputed_clebsch_gordan = self .__init_clebsch_gordan (
63- self .parameters .ace_reduction_coefficients_lmax
63+ self .parameters .ace_coupling_coefficients_maximum_l
6464 )
6565
6666 # File which holds the coupling coefficients.
@@ -71,6 +71,8 @@ def __init__(self, parameters):
7171 # Will get filled once the atoms object has been loaded.
7272 # ACE_DOCS_MISSING: What do these do?
7373 self .__ace_mumax = None
74+
75+ # Comment WHY this is always zero.
7476 self .__ace_reference_ensemble = None
7577
7678 # Will get filled during calculation of coupling coefficients.
@@ -92,9 +94,12 @@ def __init__(self, parameters):
9294
9395 # Consistency checks for the ACE settings.
9496 if (
95- len (self .parameters .ace_ranks ) != len (self .parameters .ace_lmax )
96- or len (self .parameters .ace_ranks ) != len (self .parameters .ace_nmax )
97- or len (self .parameters .ace_ranks ) != len (self .parameters .ace_lmin )
97+ len (self .parameters .ace_included_expansion_ranks )
98+ != len (self .parameters .ace_maximum_l_per_rank )
99+ or len (self .parameters .ace_included_expansion_ranks )
100+ != len (self .parameters .ace_maximum_n_per_rank )
101+ or len (self .parameters .ace_included_expansion_ranks )
102+ != len (self .parameters .ace_minimum_l_per_rank )
98103 ):
99104 raise Exception (
100105 "ACE ranks, lmax, nmax, and lmin must have the same length"
@@ -240,6 +245,10 @@ def __calculate_lammps(self, outdir, **kwargs):
240245
241246 # Check the cutoff radius, i.e., compare that the user choice
242247 # is not too small compared to those requird by ACE.
248+
249+ # TODO: Not self.parameters.ace_cutoff will be passed to LAMMPS,
250+ # but rather self._maximum_cutoff_factor.
251+ # It is only used for the pair_style command in the LAMMPS input file.
243252 if self .parameters .ace_cutoff < self ._maximum_cutoff_factor :
244253 printout (
245254 "One or more automatically generated ACE cutoff radii is "
@@ -422,6 +431,8 @@ def _calculate_bonds_and_cutoff(self):
422431 lmb_default ,
423432 ) = self .__default_settings ()
424433
434+ # TODO: Scale _cutoff_factors by * self.parameters.ace_cutoff
435+ # Make self.parameters.ace_cutoff 1.0 by default
425436 self ._cutoff_factors = [float (k ) for k in rc_default .split ()[2 :]]
426437 self ._maximum_cutoff_factor = np .max (self ._cutoff_factors )
427438 self .__lambdas = [float (k ) for k in lmb_default .split ()[2 :]]
@@ -463,7 +474,8 @@ def _calculate_coupling_coeffs(self):
463474 ldict = {
464475 ranki : li
465476 for ranki , li in zip (
466- self .parameters .ace_ranks , self .parameters .ace_lmax
477+ self .parameters .ace_included_expansion_ranks ,
478+ self .parameters .ace_maximum_l_per_rank ,
467479 )
468480 }
469481
@@ -472,14 +484,16 @@ def _calculate_coupling_coeffs(self):
472484 # used for the reduction of the spherical harmonics products.
473485 # So maybe "reduction coefficients" or something?
474486 # Or is this really the "coupling type"?
475- if self .parameters .ace_coupling_type == "wigner3j" :
487+ if self .parameters .ace_coupling_coefficients_type == "wigner3j" :
476488 ccs = wigner_coupling .wigner_3j_coupling (
477489 self .__precomputed_wigner_3j ,
478490 ldict ,
479491 L_R = self .parameters .ace_L_R ,
480492 )
481493
482- elif self .parameters .ace_coupling_type == "clebsch_gordan" :
494+ elif (
495+ self .parameters .ace_coupling_coefficients_type == "clebsch_gordan"
496+ ):
483497 ccs = cg_coupling .clebsch_gordan_coupling (
484498 self .__precomputed_clebsch_gordan ,
485499 ldict ,
@@ -489,7 +503,7 @@ def _calculate_coupling_coeffs(self):
489503 else :
490504 raise Exception (
491505 "Coupling type "
492- + str (self .parameters .ace_coupling_type )
506+ + str (self .parameters .ace_coupling_coefficients_type )
493507 + " not recongised"
494508 )
495509
@@ -498,16 +512,16 @@ def _calculate_coupling_coeffs(self):
498512 Apot = ACEPotential (
499513 element_list ,
500514 self .__ace_reference_ensemble ,
501- self .parameters .ace_ranks ,
502- self .parameters .ace_nmax ,
503- self .parameters .ace_lmax ,
504- max (self .parameters .ace_nmax ),
515+ self .parameters .ace_included_expansion_ranks ,
516+ self .parameters .ace_maximum_n_per_rank ,
517+ self .parameters .ace_maximum_l_per_rank ,
518+ max (self .parameters .ace_maximum_n_per_rank ),
505519 self ._cutoff_factors ,
506520 self .__lambdas ,
507521 ccs [self .parameters .ace_M_R ],
508522 rcutinner = rcinner ,
509523 drcutinner = drcinner ,
510- lmin = self .parameters .ace_lmin ,
524+ lmin = self .parameters .ace_minimum_l_per_rank ,
511525 )
512526
513527 # ACE_DOCS_MISSING: What does this function do?
@@ -535,14 +549,16 @@ def __calculate_limit_nus(self):
535549 # ACE_DOCS_MISSING: Add maybe a general outline of what is being
536550 # done here.
537551 ranked_chem_nus = []
538- for ind , rank in enumerate (self .parameters .ace_ranks ):
552+ for ind , rank in enumerate (
553+ self .parameters .ace_included_expansion_ranks
554+ ):
539555 rank = int (rank )
540556 PA_lammps = ace_coupling_utils .compute_pa_labels_raw (
541557 rank ,
542- int (self .parameters .ace_nmax [ind ]),
543- int (self .parameters .ace_lmax [ind ]),
558+ int (self .parameters .ace_maximum_n_per_rank [ind ]),
559+ int (self .parameters .ace_maximum_l_per_rank [ind ]),
544560 int (self .__ace_mumax ),
545- lmin = int (self .parameters .ace_lmin [ind ]),
561+ lmin = int (self .parameters .ace_minimum_l_per_rank [ind ]),
546562 )
547563 ranked_chem_nus .append (PA_lammps )
548564
@@ -613,7 +629,7 @@ def __default_settings(self):
613629 rc_range = {bp : None for bp in self .__bonds }
614630 rin_def = {bp : None for bp in self .__bonds }
615631 rc_def = {bp : None for bp in self .__bonds }
616- fac_per_elem = {key : 0.5 for key in list (self ._ionic_radii .keys ())}
632+ fac_per_elem = {key : 0.5 for key in list (self ._atomic_radii .keys ())}
617633 fac_per_elem_sub = {
618634 "H" : 0.61 ,
619635 "Be" : 0.52 ,
@@ -642,7 +658,7 @@ def __default_settings(self):
642658 # if apply_shift:
643659 for bond in self .__bonds :
644660 if rc_def [bond ] != max (rc_def .values ()):
645- if self .parameters .ace_apply_shift :
661+ if self .parameters .ace_balance_cutoff_radii_for_elements :
646662 rc_def [bond ] = rc_def [bond ] + shift # *nshell
647663 else :
648664 rc_def [bond ] = rc_def [bond ] # *nshell
@@ -687,7 +703,7 @@ def __default_cutoff_factors(self, elms):
687703 atnum1 = ase .data .atomic_numbers ["Au" ]
688704 covr1 = ase .data .covalent_radii [atnum1 ]
689705 vdwr1 = ase .data .vdw_radii [atnum1 ]
690- ionr1 = self ._ionic_radii [elm1 ]
706+ ionr1 = self ._atomic_radii [elm1 ]
691707 if np .isnan (vdwr1 ):
692708 printout (
693709 "NOTE: using dummy VDW radius of 2* covalent radius for %s"
@@ -700,15 +716,15 @@ def __default_cutoff_factors(self, elms):
700716 atnum2 = ase .data .atomic_numbers ["Au" ]
701717 covr2 = ase .data .covalent_radii [atnum2 ]
702718 vdwr2 = ase .data .vdw_radii [atnum2 ]
703- ionr2 = self ._ionic_radii [elm2 ]
719+ ionr2 = self ._atomic_radii [elm2 ]
704720 if np .isnan (vdwr2 ):
705721 printout (
706722 "NOTE: using dummy VDW radius of 2* covalent radius for %s"
707723 % elm2
708724 )
709725 vdwr2 = 2 * covr2
710726 minbond = ionr1 + ionr2
711- if self .parameters .ace_metal_max :
727+ if self .parameters .ace_larger_cutoff_for_metals :
712728 if elm1 not in self ._metal_list and elm2 not in self ._metal_list :
713729 maxbond = vdwr1 + vdwr2
714730 elif elm1 in self ._metal_list and elm2 not in self ._metal_list :
@@ -725,7 +741,7 @@ def __default_cutoff_factors(self, elms):
725741 # by default, return the ionic bond length * number of bonds for
726742 # minimum
727743 returnmin = minbond
728- if self .parameters .ace_use_vdw :
744+ if self .parameters .ace_use_maximum_cutoff_per_element :
729745 # return vdw bond length if requested
730746 returnmax = maxbond
731747 else :
@@ -890,7 +906,7 @@ def __init_element_arrays(self):
890906 @staticmethod
891907 def __init_element_lists ():
892908 """
893- Initialize a dictionary with ionic radii and list of metals.
909+ Initialize a dictionary with atomic radii and list of metals.
894910
895911 This function initializes a dictionary with ionic radii (in
896912 Angstrom) and a list containing all elements which are considered
@@ -901,7 +917,7 @@ def __init_element_lists():
901917
902918 Returns
903919 -------
904- ionic_radii : dict
920+ atomic_radii : dict
905921 Dictionary with ionic radii.
906922
907923 metal_list : List
@@ -916,13 +932,13 @@ def __init_element_lists():
916932 # These ionic (actually, atomic radii) are taken from mendeleev.
917933 # In the original implementation of the ACE class, these were
918934 # hardcoded, now we get them automatically from mendeleev.
919- ionic_radii = element_info .to_dict ()["atomic_radius" ]
920- ionic_radii = {key : v / 100 for (key , v ) in ionic_radii .items ()}
921- ionic_radii ["G" ] = 1.35
935+ atomic_radii = element_info .to_dict ()["atomic_radius" ]
936+ atomic_radii = {key : v / 100 for (key , v ) in atomic_radii .items ()}
937+ atomic_radii ["G" ] = 1.35
922938
923939 # The metal list that was originally here only contains elements up to
924940 # the 13th group (I am not sure why, e.g., Al is excluded).
925- # Additionally, only _some_ Lanthanoids and Actininoids were included,
941+ # Additionally, only _some_ Lanthanoids and Actinoids were included,
926942 # but that may be due to the list having been outdated, since the old
927943 # name for Db (Ha) had been used. The code here now includes all
928944 # elements up to group 13 (minus H) and all Lanthanoids and
@@ -938,7 +954,7 @@ def __init_element_lists():
938954 metal_list = list (set (main_groups + actininoids_lanthanoids ))
939955 metal_list .remove ("H" )
940956
941- return ionic_radii , metal_list
957+ return atomic_radii , metal_list
942958
943959 @staticmethod
944960 def _clebsch_gordan (j1 , m1 , j2 , m2 , j3 , m3 ):
0 commit comments