kups.application.potential.classical.blocking
¶
State-binding constructors for blocking sphere potentials.
These adapters take a :class:~kups.core.lens.Lens into a concrete simulation
state and wire its particles, groups, systems, neighbor list, and parameters
into the state-agnostic factories in
kups.potential.classical.blocking.
Parameters may live on the state (state.blocking_spheres_parameters) or be
passed directly via parameters=; in the latter case they are bound with a
constant lens and the state need not carry a parameter field.
IsBlockingSpheresGraphState
¶
Bases: IsState[_BlockingParticles, HasCell[AnyPeriodicity]], IsNeighborListState[IsUniversalNeighborlistParams], Protocol
Particles, groups, systems, and neighbor list (no parameters).
Source code in src/kups/application/potential/classical/blocking.py
IsBlockingSpheresState
¶
Bases: IsBlockingSpheresGraphState, Protocol
:class:IsBlockingSpheresGraphState that also carries parameters on the state.
Source code in src/kups/application/potential/classical/blocking.py
make_blocking_spheres_from_state(state, probe=None, *, parameters=None, neighborlist_factory=AdaptiveNeighborList.from_state)
¶
make_blocking_spheres_from_state(
state: Lens[State, IsBlockingSpheresState],
probe: None = None,
*,
parameters: None = None,
neighborlist_factory: NeighborListFactory[
IsBlockingSpheresState
] = ...,
) -> Potential[State, EmptyType, EmptyType, Patch[Any]]
make_blocking_spheres_from_state(
state: Lens[State, IsBlockingSpheresState],
probe: Probe[State, P, IsBlockingSpheresProbe],
*,
parameters: None = None,
neighborlist_factory: NeighborListFactory[
IsBlockingSpheresState
] = ...,
) -> Potential[State, EmptyType, EmptyType, P]
Create a blocking spheres potential, optionally with incremental updates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
Any
|
Lens into the sub-state providing particles, groups, systems, and
neighbor list (plus |
required |
probe
|
Any
|
Probe returning a IsBlockingSpheresProbe; |
None
|
parameters
|
BlockingSpheresParameters | None
|
Constant blocking sphere parameters. When given they are
bound with a constant lens and the state need not carry
|
None
|
neighborlist_factory
|
NeighborListFactory[Any]
|
Builds a |
from_state
|
Returns:
| Type | Description |
|---|---|
Any
|
Configured blocking spheres Potential. |