nvalchemi.dynamics.FIRE2#
- class nvalchemi.dynamics.FIRE2(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, **kwargs)[source]#
Fixed-cell FIRE2 geometry optimizer.
- Parameters:
model (BaseModelMixin) – The neural network potential model.
dt (float or torch.Tensor) – Initial adaptive timestep
[M]or scalar. Withby_group=True,Mis the number of graph groups rather than the number of graphs.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.
by_group (bool, optional) – If True, update each group of graphs as a single unit, sharing the adaptive timestep, mixing parameter, and adaptation counters across the graphs in that group. Requires a valid layout set with
batch.set_group_layout(). A configured convergence hook must use the sameby_groupsetting. Default False. Forwarded through**kwargstoBaseDynamics.**kwargs – Forwarded to
BaseDynamics.
- __needs_keys__#
{"forces"}.- Type:
set[str]
- __provides_keys__#
{"positions", "velocities"}.- 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 step using current forces.
- Parameters:
batch (Batch) – Current batch; positions and velocities updated in-place.
- Return type:
None
- samples_equilibrium: ClassVar[bool] = False#
A relaxation descends to a minimum rather than sampling an ensemble.