faunus
Protected Member Functions | Protected Attributes | List of all members
Faunus::analysis::PerturbationAnalysis Class Reference

Base class for perturbation analysis. More...

#include <analysis.h>

Inheritance diagram for Faunus::analysis::PerturbationAnalysis:
Inheritance graph
[legend]
Collaboration diagram for Faunus::analysis::PerturbationAnalysis:
Collaboration graph
[legend]

Protected Member Functions

bool collectWidomAverage (double energy_change)
 add to exp(-du/kT) incl. safety checks
 
 PerturbationAnalysis (const std::string &name, Energy::EnergyTerm &pot, Space &spc, const std::string &filename=""s)
 
double meanFreeEnergy () const
 Average perturbation free energy, -ln(<exp(-du/kT)>)
 

Protected Attributes

Spacemutable_space
 This reference to space can be changed.
 
Energy::EnergyTermpot
 
std::string filename
 output filename (optional)
 
std::unique_ptr< std::ostream > stream = nullptr
 output file stream if filename given
 
Change change
 Change object to describe perturbation.
 
Average< double > mean_exponentiated_energy_change
 < exp(-du/kT) >
 
- Protected Attributes inherited from Faunus::analysis::Analysis
const Spacespc
 Instance of Space to analyse.
 
int sample_interval = 0
 Steps in between each sample point (do not modify)
 
int number_of_samples = 0
 counter for number of samples
 

Additional Inherited Members

- Public Member Functions inherited from Faunus::analysis::Analysis
void to_json (json &j) const
 JSON report w. statistics, output etc.
 
void from_json (const json &j)
 configure from json object
 
void to_disk ()
 Save data to disk (if defined) More...
 
void sample ()
 Increase step count and sample. More...
 
int getNumberOfSteps () const
 Number of steps.
 
 Analysis (const Space &spc, std::string_view name)
 
 Analysis (const Space &spc, std::string_view name, int sample_interval, int number_of_skipped_steps)
 
- Public Attributes inherited from Faunus::analysis::Analysis
const std::string name
 descriptive name
 
std::string cite
 url, doi etc. describing the analysis
 

Detailed Description

Base class for perturbation analysis.

This class provides basic data and functions to support Widom Particle Insertion, Virtual Volume Move etc. If a non-empty filename is given, a (compressed) output file used for streaming will be opened.

Note
Constructor throws if non-empty filename cannot to opened for writing

The documentation for this class was generated from the following files: