kups.potential.classical.cosine_angle
¶
UFF-style cosine angle bending potential.
Reference: Rappe et al. (1992) "UFF, a Full Periodic Table Force Field" J. Am. Chem. Soc. 114, 10024-10035. DOI: 10.1021/ja00051a040
General form:
where the coefficients are computed from the equilibrium angle \(\theta_0\):
- \(C_2 = \frac{1}{4 \sin^2(\theta_0)}\)
- \(C_1 = -4 C_2 \cos(\theta_0)\)
- \(C_0 = C_2 (2 \cos^2(\theta_0) + 1)\)
For linear angles (\(\theta_0 = 180°\)), the coefficients are singular, so a special form is used: \(U(\theta) = K (1 + \cos\theta)\).
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
IsBondedParticles
¶
Bases: HasPositionsAndLabels, IsRadiusGraphPoints, Protocol
Particle data with positions, labels, and system index.
Source code in src/kups/potential/classical/cosine_angle.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[Any]]
|
Total angle energy per system |
Source code in src/kups/potential/classical/cosine_angle.py
make_cosine_angle_potential(particles_view, edge_indices_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 |
edge_indices_view
|
View[State, Index[ParticleId]]
|
Extracts angle connectivity (triplets) |
required |
systems_view
|
View[State, Table[SystemId, HasCell[AnyPeriodicity]]]
|
Extracts indexed system data (cell) |
required |
parameter_view
|
View[State, CosineAngleParameters]
|
Extracts CosineAngleParameters |
required |
probe
|
Probe[State, Ptch, IsGraphProbe[IsBondedParticles, Literal[3]]] | None
|
Graph probe for incremental particle and neighbor-list 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 |