jaxdem.domains.free#

Unbounded (free) simulation domain.

Classes

FreeDomain(box_size, anchor)

A Domain implementation representing an unbounded, "free" space.

class jaxdem.domains.free.FreeDomain(box_size: Array, anchor: Array)[source]#

Bases: Domain

A Domain implementation representing an unbounded, “free” space.

In a FreeDomain, there are no explicit boundary conditions applied to particles. Particles can move indefinitely in any direction, and the concept of a “simulation box” is only used to define the bounding box of the system.

Notes

  • The box_size and anchor attributes are dynamically updated in the shift method to encompass all particles. Some hashing tools require the domain size.

static displacement(ri: jax.Array, rj: jax.Array, _: System) jax.Array[source][source]#

Computes the displacement vector between two particles.

In a free domain, the displacement is simply the direct vector difference between the particle positions.

Parameters:
  • ri (jax.Array) – Position vector of the first particle \(r_i\).

  • rj (jax.Array) – Position vector of the second particle \(r_j\).

  • _ (System) – The system object.

Returns:

The direct displacement vector \(r_i - r_j\).

Return type:

jax.Array

static shift(state: State, system: System) Tuple['State', 'System'][source][source]#

Updates the System’s domain anchor and box_size to encompass all particles. Does not apply any transformations to the state.

Parameters:
  • state (State) – The current state of the simulation.

  • system (System) – The current system configuration.

Returns:

The original State object (unchanged) and the System object with updated domain.anchor and domain.box_size.

Return type:

Tuple[State, System]

classmethod registry_name() str[source]#
property type_name: str[source]#