NAMD
|
Public Member Functions | |
int | check (int step) |
int | init (int initstep, int initperiod, int delta=0) |
CheckStep () | |
Public Attributes | |
int | period |
period for some step dependent event (e.g. stepsPerCycle) More... | |
int | nextstep |
next step value More... | |
Check the current step number for some periodic event. The idea is to store extra integers to avoid mod operations. Specifically, replace calls like: ! (step % stepsPerCycle) with: stepsPerCycle.check(step) or: stepsPerCycle.init(firstTimestep, simParams->stepsPerCycle) when initializing.
Set up the struct by calling init with initial step and period. Then call once per time step loop in place of mod operation.
Definition at line 142 of file Sequencer.C.
|
inline |
Definition at line 167 of file Sequencer.C.
|
inline |
Check step to see if current step is special for this event. Returns nonzero for true, zero for false. Side effect: might increment nextstep to the next event step.
Definition at line 149 of file Sequencer.C.
References nextstep, and period.
Referenced by Sequencer::integrate_SOA().
|
inline |
Initialize the step checking, e.g., with simParams->firsttimestep and simParams->stepsPerCycle Special case set delta for off boundary shift, needed for half-step-cycle Langevin piston. Returns nonzero if initial step is divisible by period.
Definition at line 159 of file Sequencer.C.
References nextstep, and period.
Referenced by Sequencer::integrate_SOA().
int CheckStep::nextstep |
int CheckStep::period |
period for some step dependent event (e.g. stepsPerCycle)
Definition at line 143 of file Sequencer.C.
Referenced by check(), init(), and Sequencer::integrate_SOA().