AnalyzeExample
-
class AnalyzeExample : public feasst::Analyze
Add an analysis to FEASST by using this file as a template and instruction set. Follow the same 4 steps detailed in /feasst/plugin/example/include/model_example.h In summary, copy analyze_example.[h/cpp] to new_name.[h/cpp], replace AnalyzeExample with NewName, Replace ANALYZE_EXAMPLE with NEW_NAME, and finally cd /path/to/feasst/build; python ../dev/tools/depend-py -s ../
For more inspiration, take a look at the other existing Analyze in the stepper plugin, such as Movie, Log or PairDistribution.
In this example, compute the average geometric center of all site positions.
Public Functions
-
const Accumulator &geometric_center(const int dimension) const
Return the average geometric center of a given dimension.
-
const std::vector<std::unique_ptr<Accumulator>> &geometric_center() const
Return the average geometric center.
-
std::string header(const MonteCarlo &mc) const
Write the header for the file.
-
void initialize(MonteCarlo *mc)
Size and zero the geometric center accumulator for each dimension.
-
void update(const MonteCarlo &mc)
Compute the geometric center and update the accumulator.
-
std::string write(const MonteCarlo &mc)
Write the geometric center to file.
Arguments
group_index: index of group defined in Configuration (default: 0, which is all existing sites).
Stepper arguments.
Note that Stepper, which is the Base class of Analyze, already contains the vast majority of arguments that are required.
-
const Accumulator &geometric_center(const int dimension) const