kups.application.relaxation.data
¶
Data structures and ASE initialisation for structure relaxation.
RelaxParticles
¶
Bases: Particles
Particle data for structure relaxation.
Extends Particles with energy gradients and derived properties
(forces, inclusion/exclusion indices) needed by relaxation propagators.
Attributes:
| Name | Type | Description |
|---|---|---|
position_gradients |
Array
|
Optimizer position-DOF gradient |
Source code in src/kups/application/relaxation/data.py
forces
property
¶
Atomic forces, the negative position gradient.
RelaxRunConfig
¶
Bases: BaseModel
Configuration for a relaxation run.
Source code in src/kups/application/relaxation/data.py
force_tolerance
instance-attribute
¶
Convergence threshold for max atomic force (eV/Å).
max_steps
instance-attribute
¶
Maximum number of optimisation steps.
optimize_cell
instance-attribute
¶
Whether to also relax lattice vectors.
optimizer
instance-attribute
¶
List of Optax transform specifications passed to make_optimizer.
out_file
instance-attribute
¶
Path to the HDF5 output file.
seed
instance-attribute
¶
Random seed. None for time-based.
RelaxState
¶
Force-field-agnostic relaxation state.
The potential is built with its parameters at construction time (via the
adapters' parameters=), so no force-field field lives on the state.
Source code in src/kups/application/relaxation/data.py
RelaxSystems
¶
System-level data for structure relaxation.
Source code in src/kups/application/relaxation/data.py
cell
instance-attribute
¶
Cell geometry, batched with shape (1,).
cell_gradients
instance-attribute
¶
Optimizer cell-DOF gradient ∂E/∂u_cell (the relaxation filter's output),
stored on :attr:cell's frame (the lower-triangular log-deformation entries
under cell_filter). The ASE-fmax convergence quantity for the cell; the
atoms-ride-the-cell coupling is already folded in by the filter pullback.
potential_energy
instance-attribute
¶
Potential energy per system, shape (1,).
relax_state_from_ase(atoms)
¶
Build relaxation particle and system data from an ASE Atoms object or file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
atoms
|
Atoms | str | Path
|
ASE Atoms object, or a file path (str/Path) readable by
|
required |
Returns:
| Type | Description |
|---|---|
tuple[Table[ParticleId, RelaxParticles], Table[SystemId, RelaxSystems]]
|
Tuple of |