kups.potential.classical
¶
Classical molecular mechanics force fields.
This module provides standard force field components used in molecular simulations: non-bonded interactions (Lennard-Jones, Coulomb, Ewald) and bonded terms (harmonic bonds, angles, dihedrals). All potentials support tail corrections, cutoffs, and neighbor lists.
Available Potentials¶
- Lennard-Jones: Van der Waals interactions with optional tail corrections
- Coulomb: Electrostatic interactions
- Ewald: Long-range electrostatics via Ewald summation
- Harmonic: Bonded interactions (bonds, angles)
- Cosine Angle: UFF-style cosine angle bending
- Morse: Anharmonic bond stretching with proper dissociation
- Dihedral: Torsion potentials (UFF-style)
- Inversion: Out-of-plane/improper potentials (UFF-style)
Each potential provides a make_*_potential factory function that constructs a
configured Potential instance.
CosineAngleParameters
¶
UFF-style cosine angle potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
theta0 |
Array
|
Equilibrium angles [radians], shape |
k |
Array
|
Force constants [energy], shape |
linear_tol |
Array
|
Tolerance for detecting linear angles [radians]. |
Source code in src/kups/potential/classical/cosine_angle.py
from_uff(labels, bond_angle, bond_radius, electronegativity, effective_charge, linear_tol=jnp.radians(5))
classmethod
¶
Create angle parameters using UFF formulas.
Computes angle parameters from per-species atomic properties: - \(\theta_0\) from central atom's bond angle - \(K\) from Eq. 13 using bond lengths and effective charges
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
tuple[str, ...]
|
Species labels, shape |
required |
bond_angle
|
Array
|
Natural valence angle [radians], shape |
required |
bond_radius
|
Array
|
Valence bond radii [A], shape |
required |
electronegativity
|
Array
|
GMP electronegativity, shape |
required |
effective_charge
|
Array
|
Effective atomic charge Z*, shape |
required |
linear_tol
|
Array
|
Tolerance for detecting linear angles [radians] |
radians(5)
|
Returns:
| Type | Description |
|---|---|
CosineAngleParameters
|
CosineAngleParameters with full interaction matrices |
Source code in src/kups/potential/classical/cosine_angle.py
DihedralParameters
¶
UFF dihedral/torsion potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
V |
Array
|
Barrier heights [energy], shape |
n |
Array
|
Periodicities, shape |
phi0 |
Array
|
Equilibrium dihedral angles [radians],
shape |
Source code in src/kups/potential/classical/dihedral.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
from_uff(labels, bond_angle, torsion_sp3, torsion_sp2, group, bond_order=None, hybridization_tol=5.0 * 3.141592653589793 / 180.0)
classmethod
¶
Create dihedral parameters using UFF formulas.
Computes torsion parameters based on central bond hybridization following the UFF paper (Rappe et al. 1992). For dihedral i-j-k-l, parameters depend on the central j-k bond and neighboring atoms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
tuple[str, ...]
|
Species labels, shape |
required |
bond_angle
|
Array
|
Natural valence angle [radians], shape |
required |
torsion_sp3
|
Array
|
sp3 torsional barrier V [kcal/mol], shape |
required |
torsion_sp2
|
Array
|
sp2 torsional parameter U [kcal/mol], shape |
required |
group
|
Array
|
Periodic table group (1-18), shape |
required |
bond_order
|
Array | None
|
Bond order for j-k bond, shape |
None
|
hybridization_tol
|
float
|
Tolerance for hybridization detection [radians]. |
5.0 * 3.141592653589793 / 180.0
|
Returns:
| Type | Description |
|---|---|
DihedralParameters
|
DihedralParameters with full 4D interaction matrices. |
Source code in src/kups/potential/classical/dihedral.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
EwaldParameters
¶
Ewald summation parameters: convergence settings and reciprocal lattice vectors.
Attributes:
| Name | Type | Description |
|---|---|---|
alpha |
Table[SystemId, Array]
|
Ewald screening parameter [1/Ang], shape |
cutoff |
Table[SystemId, Array]
|
Real-space cutoff radius [Ang], shape |
reciprocal_lattice_shifts |
Table[SystemId, Array]
|
Integer k-vector coefficients,
shape |
Source code in src/kups/potential/classical/ewald.py
make(charges, unitcell, epsilon_total=1e-08, real_cutoff=None)
classmethod
¶
Estimate Ewald parameters from indexed particles and systems.
Splits particles by system index, estimates per-system parameters, and zero-pads k-vectors to the maximum count across systems.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
charges
|
Table[ParticleId, IsEwaldPointData]
|
Indexed particles with charges and system assignment. |
required |
unitcell
|
Table[SystemId, HasUnitCell]
|
Indexed systems with unit cells. |
required |
epsilon_total
|
float
|
Target total accuracy for the Ewald sum. |
1e-08
|
real_cutoff
|
float | None
|
Optional real-space cutoff override; estimated if not given. |
None
|
Returns:
| Type | Description |
|---|---|
EwaldParameters
|
|
Source code in src/kups/potential/classical/ewald.py
GlobalTailCorrectedLennardJonesParameters
¶
Bases: LennardJonesParameters
Lennard-Jones parameters with analytical long-range correction.
Attributes:
| Name | Type | Description |
|---|---|---|
tail_corrected |
Array
|
Enable correction per species pair, shape |
Source code in src/kups/potential/classical/lennard_jones.py
from_dict(cutoff, parameters, mixing_rule, tail_correction=True)
classmethod
¶
Create tail-corrected parameters from a dict of per-species values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cutoff
|
float | Array
|
Cutoff radius [Angstrom]. |
required |
parameters
|
dict[str, tuple[float | None, float | None]]
|
Map from species label to |
required |
mixing_rule
|
MixingRule
|
Combining rule for cross-species interactions. |
required |
tail_correction
|
bool
|
Whether to enable tail corrections for all non-zero epsilon pairs. |
True
|
Source code in src/kups/potential/classical/lennard_jones.py
HarmonicAngleParameters
¶
Harmonic angle potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
theta0 |
Array
|
Equilibrium angles [degrees], shape |
k |
Array
|
Force constants [energy/degree²], shape |
Source code in src/kups/potential/classical/harmonic.py
HarmonicBondParameters
¶
Harmonic bond potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
x0 |
Array
|
Equilibrium bond lengths [Å], shape |
k |
Array
|
Force constants [energy/Ų], shape |
Source code in src/kups/potential/classical/harmonic.py
InversionParameters
¶
UFF-style inversion potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
omega0 |
Array
|
Equilibrium out-of-plane angles [radians],
shape |
k |
Array
|
Force constant or barrier [energy],
shape |
Source code in src/kups/potential/classical/inversion.py
from_uff(labels, inversion_barrier, omega0=None)
classmethod
¶
Create inversion parameters using UFF formulas.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
tuple[str, ...]
|
Species labels, shape |
required |
inversion_barrier
|
Array
|
Barrier/force constant for each type, shape |
required |
omega0
|
Array | None
|
Equilibrium angle [radians], shape |
None
|
Returns:
| Type | Description |
|---|---|
InversionParameters
|
InversionParameters with full interaction matrices |
Source code in src/kups/potential/classical/inversion.py
LennardJonesParameters
¶
Lennard-Jones potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels as |
sigma |
Array
|
Length scale parameters [Å], shape |
epsilon |
Array
|
Energy well depths [energy units], shape |
cutoff |
Table[SystemId, Array]
|
Cutoff radius [Å], shape |
Source code in src/kups/potential/classical/lennard_jones.py
from_dict(cutoff, parameters, mixing_rule)
classmethod
¶
Create parameters from a dict of per-species values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cutoff
|
float | Array
|
Cutoff radius [Angstrom]. |
required |
parameters
|
dict[str, tuple[float | None, float | None]]
|
Map from species label to |
required |
mixing_rule
|
MixingRule
|
Combining rule for cross-species interactions. |
required |
Source code in src/kups/potential/classical/lennard_jones.py
from_lorentz_berthelot_mixing(labels, sigma, epsilon, cutoff)
classmethod
¶
Create parameters using Lorentz-Berthelot mixing rules.
- σᵢⱼ = (σᵢ + σⱼ) / 2 (arithmetic mean)
- εᵢⱼ = √(εᵢ × εⱼ) (geometric mean)
Source code in src/kups/potential/classical/lennard_jones.py
MorseBondParameters
¶
Morse bond potential parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
tuple[Label, ...]
|
Species labels, shape |
r0 |
Array
|
Equilibrium bond lengths [Å], shape |
D |
Array
|
Bond dissociation energy (well depth), shape |
alpha |
Array
|
Width parameter [Å⁻¹], shape |
Source code in src/kups/potential/classical/morse.py
from_harmonic(labels, r0, k, D)
classmethod
¶
Create Morse parameters from harmonic force constant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
tuple[str, ...]
|
Species labels, shape |
required |
r0
|
Array
|
Equilibrium bond lengths [Å], shape |
required |
k
|
Array
|
Harmonic force constants [energy/Ų], shape |
required |
D
|
Array
|
Bond dissociation energies, shape |
required |
Returns:
| Type | Description |
|---|---|
MorseBondParameters
|
MorseBondParameters with computed alpha values |
Source code in src/kups/potential/classical/morse.py
from_uff(labels, bond_radius, electronegativity, effective_charge, dissociation_energy)
classmethod
¶
Create Morse parameters using UFF bond length/force constant formulas.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
tuple[str, ...]
|
Species labels, shape |
required |
bond_radius
|
Array
|
Valence bond radii [Å], shape |
required |
electronegativity
|
Array
|
GMP electronegativity, shape |
required |
effective_charge
|
Array
|
Effective atomic charge Z*, shape |
required |
dissociation_energy
|
Array
|
Bond dissociation energy D, shape |
required |
Returns:
| Type | Description |
|---|---|
MorseBondParameters
|
MorseBondParameters with full interaction matrices |
Source code in src/kups/potential/classical/morse.py
PairTailCorrectedLennardJonesParameters
¶
Bases: LennardJonesParameters
Lennard-Jones parameters with smooth pairwise tail correction.
Attributes:
| Name | Type | Description |
|---|---|---|
truncation_radius |
Table[SystemId, Array]
|
Radius where smoothing begins [Å], shape |
Source code in src/kups/potential/classical/lennard_jones.py
cosine_angle_energy(inp)
¶
Compute UFF-style cosine angle energy for all angles.
Calculates energy using the general cosine form:
For near-linear angles (\(\theta_0\) close to 180deg), uses:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inp
|
CosineAngleInput
|
Graph potential input with cosine angle parameters |
required |
Returns:
| Type | Description |
|---|---|
WithPatch[Table[SystemId, Energy], IdPatch]
|
Total angle energy per system |
Source code in src/kups/potential/classical/cosine_angle.py
inversion_energy(inp)
¶
Compute UFF-style inversion energy for all inversion centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inp
|
InversionInput
|
Graph potential input with inversion parameters |
required |
Returns:
| Type | Description |
|---|---|
WithPatch[Table[SystemId, Energy], IdPatch]
|
Total inversion energy per system |
Source code in src/kups/potential/classical/inversion.py
make_cosine_angle_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create UFF-style cosine angle potential for explicitly defined angles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[3]]]
|
Extracts angle connectivity (triplets) |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, CosineAngleParameters]
|
Extracts CosineAngleParameters |
required |
probe
|
Probe[State, Ptch, IsEdgeSetGraphProbe[IsBondedParticles, Literal[3]]] | None
|
Probes particle, edge, and capacity changes for incremental updates |
required |
gradient_lens
|
Lens[CosineAngleInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, Ptch]
|
Cosine angle Potential |
Source code in src/kups/potential/classical/cosine_angle.py
make_dihedral_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create UFF dihedral potential for explicitly defined dihedrals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[4]]]
|
Extracts dihedral connectivity (quadruplets) |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, DihedralParameters]
|
Extracts DihedralParameters |
required |
probe
|
Probe[State, Ptch, IsEdgeSetGraphProbe[IsBondedParticles, Literal[4]]] | None
|
Grouped probe for incremental updates (particles, edges, capacity) |
required |
gradient_lens
|
Lens[DihedralInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, Ptch]
|
UFF dihedral Potential |
Source code in src/kups/potential/classical/dihedral.py
make_ewald_potential(particles_view, systems_view, neighborlist_view, parameter_lens, cache_lens, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, include_exclusion_mask=False)
¶
Create the complete Ewald potential combining all component terms.
Implements the Ewald decomposition:
E_total = E_sr + E_lr - E_self - E_excl
where each term is computed independently and cached for incremental
MC updates. Short-range and exclusion use radius graphs (real-space
pairs), long-range uses point clouds (reciprocal space), and
self-interaction is per-particle.
Internally converts _ParticleData adding inclusion and
exclusion fields for the neighbor list:
- sr/lr/self:
inclusion=system(all particles in same system interact),exclusion=particle_id(self-exclusion). - exclusion correction:
inclusion=group(only same-molecule pairs),exclusion=particle_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsEwaldPointData]]
|
Indexed particle data (positions, charges, system index). |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Indexed system data (unit cell). |
required |
neighborlist_view
|
View[State, NearestNeighborList]
|
Full neighbor list. |
required |
parameter_lens
|
Lens[State, EwaldParameters]
|
Lens to EwaldParameters. |
required |
cache_lens
|
Lens[State, EwaldCache] | None
|
Lens to EwaldCache, or |
required |
probe
|
Probe[State, Ptch, IsRadiusGraphProbe[IsEwaldPointData]] | None
|
Probe for incremental updates, or |
required |
gradient_lens
|
Lens[PointCloud[IsEwaldPointData, HasUnitCell], Gradients]
|
Specifies gradients to compute. |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute. |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure. |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure (optional). |
None
|
include_exclusion_mask
|
bool
|
Whether to include the exclusion correction. |
False
|
Returns:
| Type | Description |
|---|---|
EwaldPotential[State, Gradients, Hessians, Ptch]
|
Complete Ewald potential (sum of three or four components). |
Source code in src/kups/potential/classical/ewald.py
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
make_global_lennard_jones_tail_correction_potential(particles_view, systems_view, parameter_view, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create analytical long-range tail correction for Lennard-Jones potential.
Source code in src/kups/potential/classical/lennard_jones.py
make_harmonic_angle_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create harmonic angle potential for explicitly defined angles.
Applies harmonic restraints to specified atom triplets (angles). Angles must be explicitly provided via the input_view edge set as triplets (i-j-k).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[3]]]
|
Extracts angle connectivity (triplets) |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, HarmonicAngleParameters]
|
Extracts HarmonicAngleParameters |
required |
probe
|
Probe[State, P, IsEdgeSetGraphProbe[IsBondedParticles, Literal[3]]] | None
|
Grouped probe for incremental updates (particles, edges, capacity) |
required |
gradient_lens
|
Lens[HarmonicAngleInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, P]
|
Harmonic angle Potential |
Source code in src/kups/potential/classical/harmonic.py
make_harmonic_bond_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create harmonic bond potential for explicitly defined bonds.
Applies harmonic restraints to specified atom pairs (bonds). Bonds must be explicitly provided via the input_view edge set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[2]]]
|
Extracts bond connectivity |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, HarmonicBondParameters]
|
Extracts HarmonicBondParameters |
required |
probe
|
Probe[State, P, IsEdgeSetGraphProbe[IsBondedParticles, Literal[2]]] | None
|
Grouped probe for incremental updates (particles, edges, capacity) |
required |
gradient_lens
|
Lens[HarmonicBondInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, P]
|
Harmonic bond Potential |
Source code in src/kups/potential/classical/harmonic.py
make_inversion_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create UFF-style inversion potential for sp2/sp3 centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[4]]]
|
Extracts inversion connectivity (4-tuples: center + 3 neighbors) |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, InversionParameters]
|
Extracts InversionParameters |
required |
probe
|
Probe[State, Ptch, IsEdgeSetGraphProbe[IsBondedParticles, Literal[4]]] | None
|
Grouped probe for incremental updates (particles, edges, capacity) |
required |
gradient_lens
|
Lens[InversionInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, Ptch]
|
Inversion Potential |
Source code in src/kups/potential/classical/inversion.py
make_lennard_jones_potential(particles_view, systems_view, neighborlist_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create a standard Lennard-Jones potential with sharp cutoff.
Source code in src/kups/potential/classical/lennard_jones.py
make_morse_bond_potential(particles_view, edges_view, systems_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create Morse bond potential for explicitly defined bonds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsBondedParticles]]
|
Extracts particle data (positions, species) with system index |
required |
edges_view
|
View[State, Edges[Literal[2]]]
|
Extracts bond connectivity |
required |
systems_view
|
View[State, Table[SystemId, HasUnitCell]]
|
Extracts indexed system data (unit cell) |
required |
parameter_view
|
View[State, MorseBondParameters]
|
Extracts MorseBondParameters |
required |
probe
|
Probe[State, P, IsEdgeSetGraphProbe[IsBondedParticles, Literal[2]]] | None
|
Grouped probe for incremental updates (particles, edges, capacity) |
required |
gradient_lens
|
Lens[MorseBondInput, Gradients]
|
Specifies gradients to compute |
required |
hessian_lens
|
Lens[Gradients, Hessians]
|
Specifies Hessians to compute |
required |
hessian_idx_view
|
View[State, Hessians]
|
Hessian index structure |
required |
patch_idx_view
|
View[State, PotentialOut[Gradients, Hessians]] | None
|
Cached output index structure |
None
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, P]
|
Morse bond Potential |
Source code in src/kups/potential/classical/morse.py
make_pair_tail_corrected_lennard_jones_potential(particles_view, systems_view, neighborlist_view, parameter_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create a Lennard-Jones potential with smooth pairwise tail correction.