NAMD
|
#include <Output.h>
Public Member Functions | |
Output () | |
~Output () | |
void | energy (int, BigReal *) |
void | coordinate (int timestep, int n, Vector *coor, FloatVector *fcoor, Lattice &lattice) |
Produce appropriate coordinate output for the current timestep. More... | |
void | velocity (int timestep, int n, Vector *vel, FloatVector *fvel) |
Produce appropriate velocity for the current timestep. More... | |
void | force (int timestep, int n, Vector *frc, FloatVector *ffrc) |
Produce appropriate force for the current timestep. More... | |
void | replicaDcdOff () |
void | setReplicaDcdIndex (int index) |
void | replicaDcdInit (int index, const char *filename) |
void | replicaDcdSelectInit (int index, const char *tag, const char *filename) |
void | recvReplicaDcdInit (ReplicaDcdInitMsg *msg) |
void | recvReplicaDcdData (ReplicaDcdDataMsg *msg) |
Static Public Member Functions | |
static std::pair< int, int > | coordinateNeeded (int timestep) |
Check if the step requires to output the coordinates. More... | |
static int | velocityNeeded (int timestep) |
Check if the step requires to output the velocities. More... | |
static int | forceNeeded (int timestep) |
Check if the step requires to output the forces. More... | |
Friends | |
class | SimParameters |
void Output::coordinate | ( | int | timestep, |
int | n, | ||
Vector * | coor, | ||
FloatVector * | fcoor, | ||
Lattice & | lattice | ||
) |
Produce appropriate coordinate output for the current timestep.
timestep | Timestep coordinates were accumulated for |
n | The number of coordinates accumulated |
coor | Array of Vectors containing the coordinates in double precision. If the second bit of the first bitmask of coordinateNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
fcoor | Array of Vectors containing the coordinates in single precision. If the first bit of the first bitmask of coordinateNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
lattice | The PBC box for wrapping the output coordinates |
Definition at line 334 of file Output.C.
References Lattice::a(), Lattice::b(), Lattice::c(), Molecule::dcdSelectionParams, END_OF_RUN, endi(), EVAL_MEASURE, FILE_OUTPUT, dcd_params::frequency, IMDOutput::gather_box(), IMDOutput::gather_coordinates(), Molecule::get_dcd_selection_index_from_atom_id(), Molecule::get_dcd_selection_size(), Node::getScript(), Node::imd, IMDv2, IMDv3, iout, ScriptTcl::measure(), Node::molecule, Node::Object(), Node::simParameters, simParams, dcd_params::size, dcd_params::tag, wrap_coor(), wrap_coor_dcd_selection(), Vector::x, Vector::y, and Vector::z.
Referenced by CollectionMaster::disposePositions().
|
static |
Check if the step requires to output the coordinates.
timestep | The current step number |
Definition at line 185 of file Output.C.
References Molecule::dcdSelectionParams, END_OF_RUN, EVAL_MEASURE, FILE_OUTPUT, dcd_params::frequency, IMDv2, IMDv3, Node::molecule, Node::Object(), Node::simParameters, simParams, and dcd_params::tag.
Referenced by Controller::enqueueCollections(), Sequencer::submitCollections(), and Sequencer::submitCollections_SOA().
void Output::energy | ( | int | , |
BigReal * | |||
) |
void Output::force | ( | int | timestep, |
int | n, | ||
Vector * | frc, | ||
FloatVector * | ffrc | ||
) |
Produce appropriate force for the current timestep.
This function receives the forces accumulated for a given timestep from the Collect object and calls the appropriate output functions. ALL routines used to output force information should be called from here.
timestep | Timestep forces were accumulated for |
n | The number of forces accumulated |
frc | Array of Vectors containing the forces in double precision. If the second bit of forceNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
ffrc | Array of Vectors containing the forces in single precision. If the first bit of forceNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
Definition at line 646 of file Output.C.
References endi(), FORCE_OUTPUT, IMDOutput::gather_forces(), Node::imd, IMDv2, IMDv3, iout, Node::Object(), Node::simParameters, and simParams.
Referenced by CollectionMaster::disposeForces().
|
static |
Check if the step requires to output the forces.
timestep | The current step number |
Definition at line 612 of file Output.C.
References FORCE_OUTPUT, IMDv2, IMDv3, Node::Object(), Node::simParameters, and simParams.
Referenced by Controller::enqueueCollections(), Sequencer::submitCollections(), and Sequencer::submitCollections_SOA().
void Output::recvReplicaDcdData | ( | ReplicaDcdDataMsg * | msg | ) |
Definition at line 925 of file Output.C.
References ReplicaDcdDataMsg::data, DCD_FILEEXISTS, ReplicaDcdDataMsg::dcdIndex, ReplicaDcdDataMsg::dcdSelectIndex, ReplicaDcdDataMsg::DELTA, endi(), iout, NAMD_bug(), NAMD_die(), NAMD_err(), namdMyNode, ReplicaDcdDataMsg::NFILE, ReplicaDcdDataMsg::NPRIV, ReplicaDcdDataMsg::NSAVC, ReplicaDcdDataMsg::NSTEP, ReplicaDcdDataMsg::numAtoms, open_dcd_write(), sendReplicaDcdAck(), ReplicaDcdDataMsg::srcPart, ReplicaDcdDataMsg::unitcell, ReplicaDcdDataMsg::with_unitcell, write_dcdheader(), and write_dcdstep().
Referenced by recvReplicaDcdData().
void Output::recvReplicaDcdInit | ( | ReplicaDcdInitMsg * | msg | ) |
Definition at line 914 of file Output.C.
References close_dcd_write(), ReplicaDcdInitMsg::data, ReplicaDcdInitMsg::dcdIndex, ReplicaDcdInitMsg::dcdSelectIndex, endi(), iout, sendReplicaDcdAck(), and ReplicaDcdInitMsg::srcPart.
Referenced by recvReplicaDcdInit().
void Output::replicaDcdInit | ( | int | index, |
const char * | filename | ||
) |
Definition at line 888 of file Output.C.
References ReplicaDcdInitMsg::data, ReplicaDcdInitMsg::dcdIndex, ReplicaDcdInitMsg::dcdSelectIndex, sendReplicaDcdInit(), and ReplicaDcdInitMsg::srcPart.
|
inline |
void Output::replicaDcdSelectInit | ( | int | index, |
const char * | tag, | ||
const char * | filename | ||
) |
Definition at line 900 of file Output.C.
References ReplicaDcdInitMsg::data, ReplicaDcdInitMsg::dcdIndex, ReplicaDcdInitMsg::dcdSelectIndex, Molecule::find_or_create_dcd_selection_index(), namdMyNode, sendReplicaDcdInit(), and ReplicaDcdInitMsg::srcPart.
void Output::setReplicaDcdIndex | ( | int | index | ) |
void Output::velocity | ( | int | timestep, |
int | n, | ||
Vector * | vel, | ||
FloatVector * | fvel | ||
) |
Produce appropriate velocity for the current timestep.
This function receives the velocities accumulated for a given timestep from the Collect object and calls the appropriate output functions. ALL routines used to output velocity information should be called from here.
timestep | Timestep velocities were accumulated for |
n | The number of velocities accumulated |
vel | Array of Vectors containing the velocities in double precision. If the second bit of velocityNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
fvel | Array of Vectors containing the velocities in single precision. If the first bit of velocityNeeded is 1, then this parameter shouldn't be nullptr or NULL. |
Definition at line 541 of file Output.C.
References END_OF_RUN, endi(), FILE_OUTPUT, IMDOutput::gather_velocities(), Node::imd, IMDv3, iout, Node::Object(), PDBVELFACTOR, Node::simParameters, and simParams.
Referenced by CollectionMaster::disposeVelocities().
|
static |
Check if the step requires to output the velocities.
timestep | The current step number |
Definition at line 502 of file Output.C.
References END_OF_RUN, FILE_OUTPUT, IMDv3, Node::Object(), Node::simParameters, and simParams.
Referenced by Controller::enqueueCollections(), Sequencer::submitCollections(), and Sequencer::submitCollections_SOA().
|
friend |