xnn.ffnn.models.reaxff_fast#

The fast path of ReaxFF: the terms on the kernels of reaxff_kernels, their backward from the generated adjoints of reaxff_tangents. The numbers are those of the eager terms to round-off. Differentiable once, in the positions, the cells and the inputs (charges, parameter tables).

Functions

atom_terms(b_src, b_dst, bo0, bopi, bopp, ...)

The per-atom energies (float64) of the lone pairs, the over- and under-coordination, the C-C over-coordination and the triple-bond stabilization of a stepper's bonds and the lone pairs per atom (LAMMPS conventions, constant parameters: the tables at, ap and gen of reaxff_kernels).

bond_corrections(b_src, b_dst, bop_si, ...)

(bo0, bosi, bopi, bopp) per bond and the per-atom bond energy (N,) in dtype of the bond list (b_src, b_dst) (LAMMPS conventions), from the uncorrected bond orders, the uncorrected coordination per atom, the per-species table (S, 2) (valency, correction valency), the per-species-pair table (S, S, BC_COLUMNS) and the general (boc1, boc2); act the integer flags of the bonds that take part (the others get zero bond orders; all without).

bond_orders(b_src, b_dst, b_r, valid, ...)

The uncorrected bond orders (bop_si, bop_pi, bop_pp) of a stepper's bond candidates at the distances b_r (LAMMPS conventions, constant parameters: the pair table ch (S, S, BO_COLUMNS) of reaxff_kernels and sc (botol, the bond cutoff)), the uncorrected coordination (n,) and the flags of the candidates that take part (valid set, within the cutoff, at least botol).

kernel_terms(kernel, index, inputs, n_atoms, ...)

The per-atom energies (N, k) in dtype of KernelTerms for kernel of reaxff_kernels; extra its integer arguments after the term count, consts its compile-time switches; twice differentiable twice (reaxff_train); act the integer flags of the terms that take part (all without); keep the arguments passed in their own precision (positions).

nonbonded(pos, cell, batch, src, dst, ...[, ...])

The per-atom van der Waals and Coulomb energies (N,) each in dtype of the directed pair list (src, dst) with image shifts shifts (or None), the species index per atom, the charges and the (S, S, NB_COLUMNS) table of nonbonded_table(); twice differentiable twice in the positions, charges and table (reaxff_train, the cell a constant); forces instead the two total energies (2,) and their position gradient (N, 3) (float64) in one pass, not differentiable.

Classes

AtomTerms(*args, **kwargs)

A stepper's lone-pair, over- and under-coordination, C-C over-coordination and triple-bond stabilization energies per atom (float64) and the lone pairs per atom from the corrected bond orders and the coordinations (_bond_atom_sums_forward(), _atom_terms_forward()), differentiable in both.

BondCorrections(*args, **kwargs)

The corrected bond orders per bond and the per-atom bond energy of a bond list (_bond_corrections_forward()), differentiable in the uncorrected bond orders, the uncorrected coordination and the parameter tables.

BondOrders(*args, **kwargs)

A stepper's uncorrected bond orders (sigma less botol, pi, double pi) per bond candidate and the uncorrected coordination per atom from the candidates' distances (_bond_orders_forward()), differentiable in the distances; the flags of the candidates that take part (int32) last.

KernelTerms(*args, **kwargs)

Per-atom energies (N, K) (float64) of a list of terms from a forward kernel of reaxff_kernels whose arguments are index arrays (constants) followed by input arrays (the float ones differentiable), with the backward from the kernel's generated adjoint (its gradients into <name>_g for every float input).

NonbondedTerms(*args, **kwargs)

The van der Waals and Coulomb energies per atom (N, 2) (float64) of the pairs i <= k of a directed pair list (_nonbonded_forward()), differentiable in the positions, the cells ((B, 3, 3), or the positions as a stand-in without cells), the charges q and the species-pair table.