nvalchemi.dynamics.FIRE2VariableCell#
- class nvalchemi.dynamics.FIRE2VariableCell(model, dt, delaystep=_FIRE2_DEFAULTS['delaystep'], dtgrow=_FIRE2_DEFAULTS['dtgrow'], dtshrink=_FIRE2_DEFAULTS['dtshrink'], alphashrink=_FIRE2_DEFAULTS['alphashrink'], alpha0=_FIRE2_DEFAULTS['alpha0'], tmax=_FIRE2_DEFAULTS['tmax'], tmin=_FIRE2_DEFAULTS['tmin'], maxstep=_FIRE2_DEFAULTS['maxstep'], n_steps=None, hooks=None, convergence_hook=None, *, cell_force_scale=1.0, **kwargs)[source]#
Variable-cell FIRE2 geometry optimizer.
Simultaneously relaxes atomic coordinates and the simulation cell using the FIRE2 algorithm with cell-force derived from the model’s stress tensor.
- Parameters:
model (BaseModelMixin) – The neural network potential model. Must produce
"stress".dt (float or torch.Tensor) – Initial adaptive timestep
[M]or scalar.delaystep (int) – Minimum steps before adaptation. Default 60.
dtgrow (float) – Timestep growth factor. Default 1.05.
dtshrink (float) – Timestep shrink factor. Default 0.75.
alphashrink (float) – Alpha decrease factor. Default 0.985.
alpha0 (float) – Initial mixing parameter. Default 0.09.
tmax (float) – Maximum timestep. Default 0.08.
tmin (float) – Minimum timestep. Default 0.005.
maxstep (float) – Maximum displacement per step. Default 0.1.
n_steps (int, optional) – Total steps for
run().hooks (list[Hook], optional) – Initial hooks.
convergence_hook (ConvergenceHook or dict, optional) – Convergence criterion.
cell_force_scale (float) – Multiplier on the atom count normalizing stress-derived cell forces; raise it to move the cell less per step. Read every step. Default 1.0.
**kwargs – Forwarded to
BaseDynamics.
- __needs_keys__#
{"forces", "stress"}.- Type:
set[str]
- __provides_keys__#
{"positions", "velocities", "cell"}.- Type:
set[str]
- post_update(batch)[source]#
No-op; forces from new positions are used on the next step.
- Parameters:
batch (Batch)
- Return type:
None
- pre_update(batch)[source]#
Full FIRE2 variable-cell step using current forces and stress.
- Parameters:
batch (Batch) – Current batch; positions, velocities, and cell updated in-place.
- Return type:
None
- samples_equilibrium: ClassVar[bool] = False#
A relaxation descends to a minimum rather than sampling an ensemble.