kups.application.potential.classical.inversion
¶
State-binding constructors for UFF-style inversion potentials.
These adapters take a :class:~kups.core.lens.Lens into a concrete simulation
state and wire its particles, systems, inversion connectivity, and parameters
into the state-agnostic factories in
kups.potential.classical.inversion.
Parameters may live on the state (state.inversion_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. For incremental (probe)
updates with constant parameters, the cache is read from a conventional
inversion_cache attribute.
IsCachedInversionGraphState
¶
Bases: IsInversionGraphState, Protocol
:class:IsInversionGraphState carrying an incremental-update cache (params passed in).
Source code in src/kups/application/potential/classical/inversion.py
IsInversionGraphState
¶
Bases: IsState[IsBondedParticles, HasCell[AnyPeriodicity]], Protocol
Particles, systems, and inversion connectivity (no parameters).
Source code in src/kups/application/potential/classical/inversion.py
IsInversionState
¶
Bases: IsInversionGraphState, Protocol
:class:IsInversionGraphState that also carries inversion parameters.
Source code in src/kups/application/potential/classical/inversion.py
make_inversion_from_state(state, probe=None, *, parameters=None, gradient=None)
¶
make_inversion_from_state(
state: Lens[
State,
IsInversionState[
MaybeCached[InversionParameters, Any]
],
],
probe: None = None,
*,
parameters: None = None,
gradient: None = None,
) -> Potential[State, EmptyType, EmptyType, Patch[Any]]
make_inversion_from_state(
state: Lens[
State,
IsInversionState[
MaybeCached[InversionParameters, Any]
],
],
probe: None = None,
*,
parameters: None = None,
gradient: Lens[Geometry, PositionsAndCell],
) -> Potential[
State, PositionsAndCell, EmptyType, Patch[Any]
]
make_inversion_from_state(
state: Lens[
State,
IsInversionState[
HasCache[
InversionParameters,
PotentialOut[EmptyType, EmptyType],
]
],
],
probe: Probe[
State,
P,
IsGraphProbe[IsBondedParticles, Literal[4]],
],
*,
parameters: None = None,
gradient: None = None,
) -> Potential[State, EmptyType, EmptyType, P]
make_inversion_from_state(
state: Lens[
State,
IsInversionState[
HasCache[
InversionParameters,
PotentialOut[PositionsAndCell, EmptyType],
]
],
],
probe: Probe[
State,
P,
IsGraphProbe[IsBondedParticles, Literal[4]],
],
*,
parameters: None = None,
gradient: Lens[Geometry, PositionsAndCell],
) -> Potential[State, PositionsAndCell, EmptyType, P]
make_inversion_from_state(
state: Lens[State, IsInversionGraphState],
probe: None = None,
*,
parameters: InversionParameters,
gradient: None = None,
) -> Potential[State, EmptyType, EmptyType, Patch[Any]]
make_inversion_from_state(
state: Lens[State, IsInversionGraphState],
probe: None = None,
*,
parameters: InversionParameters,
gradient: Lens[Geometry, PositionsAndCell],
) -> Potential[
State, PositionsAndCell, EmptyType, Patch[Any]
]
make_inversion_from_state(
state: Lens[
State,
IsCachedInversionGraphState[
PotentialOut[EmptyType, EmptyType]
],
],
probe: Probe[
State,
P,
IsGraphProbe[IsBondedParticles, Literal[4]],
],
*,
parameters: InversionParameters,
gradient: None = None,
) -> Potential[State, EmptyType, EmptyType, P]
make_inversion_from_state(
state: Lens[
State,
IsCachedInversionGraphState[
PotentialOut[PositionsAndCell, EmptyType]
],
],
probe: Probe[
State,
P,
IsGraphProbe[IsBondedParticles, Literal[4]],
],
*,
parameters: InversionParameters,
gradient: Lens[Geometry, PositionsAndCell],
) -> Potential[State, PositionsAndCell, EmptyType, P]
Create an inversion potential, optionally with incremental updates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
Any
|
Lens into the sub-state providing particles, cell, inversion
indices, and inversion parameters (the latter only when
|
required |
probe
|
Any
|
If provided, detects particle changes and supplies the before/after fixed-edge neighbor lists for incremental updates. Those neighbor lists carry any required update capacity. |
None
|
parameters
|
InversionParameters | None
|
Constant inversion parameters. When given they are bound
with a constant lens and the state need not carry
|
None
|
gradient
|
Lens[Geometry, PositionsAndCell] | None
|
Relaxation filter |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Configured inversion Potential. |