xnn.ffnn.models.amoeba.ion_terms#
- xnn.ffnn.models.amoeba.ion_terms(i_, k_, R, weight, cls_idx, N, B, params, ionct_index, ionpair_index, mbct_index, mbct_atom, mbct_slot, molecule, n_molecules, form='ceq', c0=0.0, ionct_x_set=None, ct_eps=None, ct_alpha=None, with_ct=True, with_pair=True)[source]#
The terms of ions per atom, from the pairs
i_,k_at the distancesRwithweight(zero drops a pair).ct: the charge transfer from a partner class into an ion class,-A exp(-B R)(ionct, parametersionct_a,ionct_b), from the rows of both orders (a library has one order of a pair of two classes, a row of a class with itself counts both ways);repanddisp: the two parts of the pair correctionA exp(-beta R) - C f6(beta R) / R^6,f6the Tang-Toennies damping (ionpair);mbct: the many-body charge transfer of every centre, a molecule holding an atom of a class with anx(mbct), on that atom. A ligand moleculejgives the centrec_j, minus the charge transfer of their atom pairs: the pair’sionctrow, else HIPPO’s two pieces-(eps_a exp(-alpha_b R) + eps_b exp(-alpha_a R))from the class tablesct_eps,ct_alpha(none without them). A pair of two centres enters both.form"ceq"is the one-directional charge equilibration (q_j >= 0) withx_j = eta / b_j: the ligands sorted byt_j = sqrt(c_j (1 + x_j) / x_j), the active setAthe firstkwitht_(k) > theta_k = sum_(j <= k) u_j / (1 + sum_(j <= k) x_j),u_j = sqrt(c_j x_j (1 + x_j)), and the term-sum_A c_j x_j + (sum_A u_j)^2 / (1 + sum_A x_j) + sum_(not A) c_j.x_jis thec-weighted mean over the ligand’s pairs of the row’sionct_x(rows withionct_x_set, for the centre holding the row’s ion) and the centre’smbct_xotherwise."weighted"takes the centre’sx,w_j = c_j / (c_j + c0),n = sum_j w_jandS2 = sum_j c_j + sum_(j != k) w_j w_k sqrt(c_j c_k):x [(1 + x) S2 / (1 + x n) - sum_j c_j].
The pair energies go half to each atom. The batch holds
Bstructures ofN / Batoms;mbct_atomlists the atom of every centre of one structure,mbct_slotgives every atom of a structure the place of its molecule among the centres (-1 for the others) andmoleculeits molecule, one ofn_molecules.with_ctandwith_pairsay whether the library has rows of the two pair terms.- Parameters:
i_ (Tensor)
k_ (Tensor)
R (Tensor)
weight (Tensor)
cls_idx (Tensor)
N (int)
B (int)
ionct_index (Tensor)
ionpair_index (Tensor)
mbct_index (Tensor)
mbct_atom (Tensor)
mbct_slot (Tensor)
molecule (Tensor)
n_molecules (int)
form (str)
c0 (float)
ionct_x_set (Tensor | None)
ct_eps (Tensor | None)
ct_alpha (Tensor | None)
with_ct (bool)
with_pair (bool)
- Return type: