Time.h

Timekeeping variables such as Timestep and Frame.

Before any calculation occurs, multiple timesteps are averaged into a frame (as defined by Options::stepsPerFrame). The Timestep and Frame objects are declared here.

If the number of steps in the dumpfile is not divisible by Options::stepsPerFrame, then the last frame contains extra timesteps. Relevant quantities are stored in the LastFrame object.

struct Timestep
#include <Time.h>

A single timestep.

Public Functions

Timestep()

Public Members

int time

The timestep number from the LAMMPS dumpfile, corresponding to actual simulation time (generally in fs).

int stepNum

The index of the timestep.

e.g. 0, 1, 2 for the first three timesteps.

struct Frame
#include <Time.h>

Public Functions

Frame()

Public Members

int time

Timestep::time for the first timestep in the frame.

int frameNum

The index of the frame.

e.g. 0, 1, 2 for the first three frames.

int frameStep

Timestep::stepNum for the first timestep in the frame.

int stepsThisFrame

Number of steps in the current frame.

For all but the last frame, this is equal to Options::stepsPerFrame. For the last frame, it is equal to LastFrame::numSteps.

int atomsThisFrame

The number of atoms times the number of steps this frame.

Equal to numAtoms * stepsThisFrame

struct LastFrame
#include <Time.h>

If Options::stepsPerFrame does not evenly divide SimData::numSteps, then the last frame contains extra steps.

Public Functions

void setSteps(int numSteps, int stepsPerFrame)

Calculate and set the number of steps in the last frame.

Public Members

int extraSteps

Number of additional steps in the last frame.

int frameNum

Frame::frameNum for the last frame.

int numSteps

Number of steps in the last frame.

See
Frame::stepsThisFrame