1 #ifndef NLINK_AVERAGE_CPP 2 #define NLINK_AVERAGE_CPP 11 #include "NLinkAverage.h" 12 #include <mcMd/simulation/Simulation.h> 13 #include <mcMd/links/LinkMaster.h> 14 #include <util/misc/FileMaster.h> 32 read<int>(in,
"nSamplePerBlock", nSamplePerBlock_);
46 { accumulator_.
clear(); }
53 accumulator_.
sample(rn, outputFile_);
74 accumulator_.
output(outputFile_);
int nLink() const
Get the total number of active Links.
void clear()
Clear all accumulators, set to empty initial state.
virtual void readParameters(std::istream &in)
Read parameters from file, and allocate data array.
void openOutputFile(const std::string &filename, std::ofstream &out, std::ios_base::openmode mode=std::ios_base::out) const
Open an output file.
virtual void setup()
Clear accumulator.
A set of interacting Molecules enclosed by a Boundary.
System & system()
Return reference to parent system.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
virtual void output()
Output results at end of simulation.
virtual void writeParam(std::ostream &out)
Write all parameters to an output stream.
void readInterval(std::istream &in)
Read interval from file, with error checking.
Utility classes for scientific computation.
Template for Analyzer associated with one System.
void output(std::ostream &out) const
Output final statistical properties to file.
void setNSamplePerBlock(int nSamplePerBlock)
Set nSamplePerBlock.
virtual void sample(long iStep)
Evaluate squared radii of gyration for all molecules, add to ensemble.
NLinkAverage(System &system)
Constructor.
void sample(double value)
Add a sampled value to the ensemble.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
int nSamplePerBlock() const
Get number of samples per block average.
void setClassName(const char *className)
Set class name string.
FileMaster & fileMaster()
Get the FileMaster by reference.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
const std::string & outputFileName() const
Return outputFileName string.
LinkMaster & linkMaster() const
Get the LinkMaster by reference.