Skip to content

Commit

Permalink
Add ace potential to finish generation of coupling coefficients
Browse files Browse the repository at this point in the history
Co-authored-by: James Goff <goffjimmy1@gmail.com>
  • Loading branch information
timcallow and jmgoff committed Jun 11, 2024
1 parent c29119c commit 8f71b1b
Show file tree
Hide file tree
Showing 4 changed files with 422 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mala/common/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ def __init__(self):
self.ace_ranks = [1, 2, 3]
self.ace_nmax = [6, 2, 2]
self.ace_lmax = [0, 2, 2]
self.ace_nradbase = max(self.ace_nmax)
self.ace_lmin = [0, 0, 0]
self.ace_reference_ens = [0.0, 0.0]

self.ace_nshell = 2.0
self.ace_apply_shift = False
Expand Down
1 change: 1 addition & 0 deletions mala/descriptors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
from .descriptor import Descriptor
from .minterpy_descriptors import MinterpyDescriptors
from .ace import ACE
from .ace_potential import AcePot
21 changes: 21 additions & 0 deletions mala/descriptors/ace.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from mala.common.parallelizer import printout
from mala.descriptors.lammps_utils import extract_compute_np
from mala.descriptors.descriptor import Descriptor
from mala.descriptors.ace_potential import AcePot
import mala.descriptors.ace_coupling_utils as acu
import mala.descriptors.wigner_coupling as wigner_coupling
import mala.descriptors.cg_coupling as cg_coupling
Expand Down Expand Up @@ -522,6 +523,26 @@ def calculate_coupling_coeffs(self):

limit_nus = self.calc_limit_nus()

# permutation symmetry adapted ACE labels
Apot = AcePot(
self.parameters.ace_elements,
self.parameters.ace_reference_ens,
self.parameters.ace_ranks,
self.parameters.ace_nmax,
self.parameters.ace_lmax,
self.parameters.ace_nradbase,
rcutfac,
lmbda,
rcinner,
drcinner,
lmin=self.parameters.ace_lmin,
**{"input_nus": limit_nus, "ccs": ccs[self.parameters.ace_M_R]}
)
Apot.write_pot("coupling_coefficients_fullbasis")

Apot.set_funcs(nulst=limit_nus, muflg=True, print_0s=True)
Apot.write_pot("coupling_coefficients")

def calc_limit_nus(self):
ranked_chem_nus = []
for ind, rank in enumerate(self.parameters.ace_ranks):
Expand Down
Loading

0 comments on commit 8f71b1b

Please sign in to comment.