faunus
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Faunus::analysis::Density Class Referenceabstract

Abstract base class for analysing atomic and molecular densities. More...

#include <analysis.h>

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

Public Member Functions

template<RequireNamedElements Range>
 Density (const Space &spc, const Range &atoms_or_molecules, const std::string_view name)
 
- 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)
 

Protected Types

using Table = Equidistant2DTable< unsigned int, double >
 
using id_type = size_t
 

Protected Member Functions

void _to_disk () override
 save sampled data to disk More...
 
void _sample () override
 perform sample event
 
void _to_json (json &j) const override
 provide json information
 

Static Protected Member Functions

static void writeTable (std::string_view name, Table &table)
 Write histograms to disk.
 

Protected Attributes

std::map< id_type, Average< double > > mean_density
 
std::map< id_type, std::string_view > names
 
- 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 Attributes inherited from Faunus::analysis::Analysis
const std::string name
 descriptive name
 
std::string cite
 url, doi etc. describing the analysis
 

Detailed Description

Abstract base class for analysing atomic and molecular densities.

Member Function Documentation

◆ _to_disk()

void Faunus::analysis::Density::_to_disk ( )
overrideprotectedvirtual

save sampled data to disk

This is virtual and can be overridden in derived classes.

Reimplemented from Faunus::analysis::Analysis.


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