kups.potential.classical.coulomb
¶
Coulomb electrostatic potential for vacuum/non-periodic systems.
This module provides a simple pairwise Coulomb potential for charged systems without periodic boundary conditions. For periodic systems with long-range electrostatics, use Ewald summation instead.
Potential: \(U = \frac{1}{4\pi\epsilon_0} \sum_{i<j} \frac{q_i q_j}{r_{ij}}\)
coulomb_vacuum_energy(inp)
¶
Compute Coulomb electrostatic energy for vacuum systems.
Calculates pairwise electrostatic energy using Coulomb's law over all charge pairs in each (vacuum) system. Accounts for double counting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inp
|
CoulombVacuumInput
|
Graph potential input. |
required |
Returns:
| Type | Description |
|---|---|
WithPatch[Table[SystemId, Energy], IdPatch[Any]]
|
Total electrostatic energy per system. |
Source code in src/kups/potential/classical/coulomb.py
make_coulomb_vacuum_potential(particles_view, systems_view, neighborlist_view, probe, gradient_lens, hessian_lens, hessian_idx_view, patch_idx_view=None, out_cache_lens=None)
¶
Create simple Coulomb potential for non-periodic systems.
Computes pairwise electrostatic interactions using Coulomb's law. Suitable for gas-phase or cluster systems. For periodic/bulk systems, use Ewald summation for proper treatment of long-range electrostatics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
particles_view
|
View[State, Table[ParticleId, IsCoulombGraphParticles]]
|
Extracts indexed particle data (positions, charges, system index) |
required |
systems_view
|
View[State, Table[SystemId, HasCell[Vacuum]]]
|
Extracts indexed system data (cell) |
required |
neighborlist_view
|
View[State, NeighborList[Literal[2]]]
|
Extracts a cutoff-bound neighbor list |
required |
probe
|
Probe[State, Ptch, IsGraphProbe[IsCoulombGraphParticles, Literal[2]]] | None
|
Grouped probe for incremental updates (particles, neighborlist_after, neighborlist_before) |
required |
gradient_lens
|
Lens[CoulombVacuumInput, 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
|
out_cache_lens
|
Lens[State, PotentialOut[Gradients, Hessians]] | None
|
Cache location lens (optional) |
None
|
Returns:
| Type | Description |
|---|---|
Potential[State, Gradients, Hessians, Ptch]
|
Coulomb potential for vacuum. |