ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Run_MD Namespace Reference

the md loop line More...

Functions

void md_line (MDCell &mdcell, ModuleESolver::ESolver *p_esolver, const Parameter &param_in, DomainDecomposition &decomp)
 the md loop line
bool is_cadence_step (const int current_step, const int freq)
bool is_structure_output_step (const int current_step, const int out_freq_ion, const bool out_stru)
 Periodic structure output is independent of the MD restart cadence.
bool is_last_step (const int current_step, const int md_nstep)

Detailed Description

the md loop line

Function Documentation

◆ is_cadence_step()

bool Run_MD::is_cadence_step ( const int current_step,
const int freq )
inline

Returns true when a per-step action with cadence frequency freq should fire at current_step. A frequency <= 0 disables the action (never fires). Keeping output and restart cadences behind this predicate makes their independence directly unit-testable.

Here is the caller graph for this function:

◆ is_last_step()

bool Run_MD::is_last_step ( const int current_step,
const int md_nstep )
inline

Returns true when current_step is the final ionic step of the run. current_step is the global step (local step + restart offset); md_nstep is the global step count, so the last processed step is md_nstep - 1. The final step is always written even if it does not sit on the output cadence.

Here is the caller graph for this function:

◆ is_structure_output_step()

bool Run_MD::is_structure_output_step ( const int current_step,
const int out_freq_ion,
const bool out_stru )
inline

Periodic structure output is independent of the MD restart cadence.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ md_line()

void Run_MD::md_line ( MDCell & mdcell,
ModuleESolver::ESolver * p_esolver,
const Parameter & param_in,
DomainDecomposition & decomp )

the md loop line

Parameters
cellcell information
p_esolverenergy solver
md_parainput parameters used in md

md cycle, mohan update 2026-01-04, change '<=' to '<'

Mark the final ionic step on the cell passed to the solver. The output module then writes the final snapshot even when this step is off the out_freq_ion cadence or its SCF did not converge.

flush the COLVAR and other PLUMED output files

Here is the call graph for this function:
Here is the caller graph for this function: