1 #ifndef LINK_LENGTH_DIST_CPP 2 #define LINK_LENGTH_DIST_CPP 11 #include "LinkLengthDist.h" 12 #include <mcMd/simulation/Simulation.h> 13 #include <mcMd/links/LinkMaster.h> 14 #include <simp/species/Species.h> 15 #include <simp/boundary/Boundary.h> 16 #include <mcMd/chemistry/Molecule.h> 17 #include <mcMd/chemistry/Atom.h> 18 #include <util/misc/FileMaster.h> 38 read<int>(in,
"speciesId", speciesId_);
49 { accumulator_.
clear(); }
61 for (idLink=0; idLink < nLinks0; idLink++) {
83 accumulator_.
output(outputFile_);
int nLink() const
Get the total number of active Links.
virtual void setup()
Clear accumulator.
virtual void readParameters(std::istream &in)
Read parameters from file.
double distanceSq(const Vector &r1, const Vector &r2) const
Return square distance between positions r1 and r2.
void openOutputFile(const std::string &filename, std::ofstream &out, std::ios_base::openmode mode=std::ios_base::out) const
Open an output file.
A set of interacting Molecules enclosed by a Boundary.
System & system()
Return reference to parent system.
A Link represents a crosslink between two Atoms.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
virtual void output()
Output results to output file.
LinkLengthDist(System &system)
Constructor.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
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.
void sample(double value)
Sample a value.
Template for Analyzer associated with one System.
void output(std::ostream &out)
Output the distribution to file.
virtual void clear()
Clear (i.e., zero) previously allocated histogram.
Boundary & boundary() const
Get the Boundary by reference.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
const Atom & atom1() const
Get Atom1 connected to a Link.
void setClassName(const char *className)
Set class name string.
void readParamComposite(std::istream &in, ParamComposite &child, bool next=true)
Add and read a required child ParamComposite.
Link & link(int id) const
Return an active link by an internal set index.
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.
void sample(long iStep)
Add particle pairs to LinkLengthDist histogram.
const Vector & position() const
Get the position Vector by const reference.
const Atom & atom0() const
Get Atom0 connected to a Link.
LinkMaster & linkMaster() const
Get the LinkMaster by reference.