votca 2024.2-dev
Loading...
Searching...
No Matches
votca::csg::Imc Class Reference

class to calculate distribution functions and cross correlations for inverse monte carlo More...

#include <csg_stat_imc.h>

Collaboration diagram for votca::csg::Imc:

Classes

struct  group_t
 struct to store collected information for groups (e.g. crosscorrelations) More...
 
struct  interaction_t
 struct to store collected information for interactions More...
 
struct  pair_t
 
class  Worker
 

Public Member Functions

void Initialize (void)
 
void LoadOptions (const std::string &file)
 load cg definitions file
 
void BeginEvaluate (Topology *top, Topology *top_atom)
 begin coarse graining a trajectory
 
void EndEvaluate ()
 end coarse graining a trajectory
 
void BlockLength (votca::Index length)
 
void DoImc (bool do_imc)
 
void IncludeIntra (bool include_intra)
 
void Extension (std::string ext)
 
std::unique_ptr< CsgApplication::WorkerForkWorker ()
 
void MergeWorker (CsgApplication::Worker *worker_)
 

Protected Types

using group_matrix = Eigen::MatrixXd
 
using pair_matrix = Eigen::Block<group_matrix>
 

Protected Member Functions

interaction_tAddInteraction (tools::Property *p, bool is_bonded)
 create a new interaction entry based on given options
 
group_tgetGroup (const std::string &name)
 get group by name, creates one if it doesn't exist
 
void InitializeGroups ()
 initializes the group structs after interactions were added
 
void WriteDist (const std::string &suffix="")
 
void WriteIMCData (const std::string &suffix="")
 
void WriteIMCBlock (const std::string &suffix)
 
void CalcDeltaS (interaction_t *interaction, Eigen::VectorBlock< Eigen::VectorXd > &dS)
 
void ClearAverages ()
 
void DoCorrelations (Imc::Worker *worker)
 update the correlations after interations were processed
 

Protected Attributes

tools::Average< double > avg_vol_
 
tools::Property options_
 the options parsed from cg definition file
 
votca::Index block_length_ = 0
 
bool do_imc_ = false
 
bool include_intra_ = false
 
std::string extension_
 
votca::Index nframes_
 
votca::Index nblock_
 
std::vector< tools::Property * > bonded_
 list of bonded interactions
 
std::vector< tools::Property * > nonbonded_
 list of non-bonded interactions
 
std::map< std::string, std::unique_ptr< interaction_t > > interactions_
 map interaction-name to interaction
 
std::map< std::string, std::unique_ptr< group_t > > groups_
 map group-name to group
 
bool processed_some_frames_ = false
 

Detailed Description

class to calculate distribution functions and cross correlations for inverse monte carlo

This class calculates distribution functions as well as cross-correlations for specific groups of interactions based on a given trajectory.

Definition at line 39 of file csg_stat_imc.h.

Member Typedef Documentation

◆ group_matrix

using votca::csg::Imc::group_matrix = Eigen::MatrixXd
protected

Definition at line 60 of file csg_stat_imc.h.

◆ pair_matrix

using votca::csg::Imc::pair_matrix = Eigen::Block<group_matrix>
protected

Definition at line 61 of file csg_stat_imc.h.

Member Function Documentation

◆ AddInteraction()

Imc::interaction_t * votca::csg::Imc::AddInteraction ( tools::Property * p,
bool is_bonded )
protected

create a new interaction entry based on given options

Definition at line 185 of file csg_stat_imc.cc.

◆ BeginEvaluate()

void votca::csg::Imc::BeginEvaluate ( Topology * top,
Topology * top_atom )

begin coarse graining a trajectory

Definition at line 83 of file csg_stat_imc.cc.

◆ BlockLength()

void votca::csg::Imc::BlockLength ( votca::Index length)
inline

Definition at line 52 of file csg_stat_imc.h.

◆ CalcDeltaS()

void votca::csg::Imc::CalcDeltaS ( interaction_t * interaction,
Eigen::VectorBlock< Eigen::VectorXd > & dS )
protected

Definition at line 715 of file csg_stat_imc.cc.

◆ ClearAverages()

void votca::csg::Imc::ClearAverages ( )
protected

Definition at line 274 of file csg_stat_imc.cc.

◆ DoCorrelations()

void votca::csg::Imc::DoCorrelations ( Imc::Worker * worker)
protected

update the correlations after interations were processed

Definition at line 522 of file csg_stat_imc.cc.

◆ DoImc()

void votca::csg::Imc::DoImc ( bool do_imc)
inline

Definition at line 53 of file csg_stat_imc.h.

◆ EndEvaluate()

void votca::csg::Imc::EndEvaluate ( )

end coarse graining a trajectory

Definition at line 238 of file csg_stat_imc.cc.

◆ Extension()

void votca::csg::Imc::Extension ( std::string ext)
inline

Definition at line 55 of file csg_stat_imc.h.

◆ ForkWorker()

std::unique_ptr< CsgApplication::Worker > votca::csg::Imc::ForkWorker ( )

Definition at line 829 of file csg_stat_imc.cc.

◆ getGroup()

Imc::group_t * votca::csg::Imc::getGroup ( const std::string & name)
protected

get group by name, creates one if it doesn't exist

Definition at line 462 of file csg_stat_imc.cc.

◆ IncludeIntra()

void votca::csg::Imc::IncludeIntra ( bool include_intra)
inline

Definition at line 54 of file csg_stat_imc.h.

◆ Initialize()

void votca::csg::Imc::Initialize ( void )

Definition at line 47 of file csg_stat_imc.cc.

◆ InitializeGroups()

void votca::csg::Imc::InitializeGroups ( )
protected

initializes the group structs after interactions were added

Definition at line 474 of file csg_stat_imc.cc.

◆ LoadOptions()

void votca::csg::Imc::LoadOptions ( const std::string & file)

load cg definitions file

Definition at line 258 of file csg_stat_imc.cc.

◆ MergeWorker()

void votca::csg::Imc::MergeWorker ( CsgApplication::Worker * worker_)

Definition at line 850 of file csg_stat_imc.cc.

◆ WriteDist()

void votca::csg::Imc::WriteDist ( const std::string & suffix = "")
protected

Definition at line 542 of file csg_stat_imc.cc.

◆ WriteIMCBlock()

void votca::csg::Imc::WriteIMCBlock ( const std::string & suffix)
protected

Definition at line 744 of file csg_stat_imc.cc.

◆ WriteIMCData()

void votca::csg::Imc::WriteIMCData ( const std::string & suffix = "")
protected

Here the inverse monte carlo matrix is calculated and written out

steps:

  • calculate th

Definition at line 628 of file csg_stat_imc.cc.

Member Data Documentation

◆ avg_vol_

tools::Average<double> votca::csg::Imc::avg_vol_
protected

Definition at line 58 of file csg_stat_imc.h.

◆ block_length_

votca::Index votca::csg::Imc::block_length_ = 0
protected

Definition at line 97 of file csg_stat_imc.h.

◆ bonded_

std::vector<tools::Property *> votca::csg::Imc::bonded_
protected

list of bonded interactions

Definition at line 111 of file csg_stat_imc.h.

◆ do_imc_

bool votca::csg::Imc::do_imc_ = false
protected

Definition at line 99 of file csg_stat_imc.h.

◆ extension_

std::string votca::csg::Imc::extension_
protected

Definition at line 104 of file csg_stat_imc.h.

◆ groups_

std::map<std::string, std::unique_ptr<group_t> > votca::csg::Imc::groups_
protected

map group-name to group

Definition at line 118 of file csg_stat_imc.h.

◆ include_intra_

bool votca::csg::Imc::include_intra_ = false
protected

Definition at line 101 of file csg_stat_imc.h.

◆ interactions_

std::map<std::string, std::unique_ptr<interaction_t> > votca::csg::Imc::interactions_
protected

map interaction-name to interaction

Definition at line 116 of file csg_stat_imc.h.

◆ nblock_

votca::Index votca::csg::Imc::nblock_
protected

Definition at line 108 of file csg_stat_imc.h.

◆ nframes_

votca::Index votca::csg::Imc::nframes_
protected

Definition at line 107 of file csg_stat_imc.h.

◆ nonbonded_

std::vector<tools::Property *> votca::csg::Imc::nonbonded_
protected

list of non-bonded interactions

Definition at line 113 of file csg_stat_imc.h.

◆ options_

tools::Property votca::csg::Imc::options_
protected

the options parsed from cg definition file

Definition at line 95 of file csg_stat_imc.h.

◆ processed_some_frames_

bool votca::csg::Imc::processed_some_frames_ = false
protected

Definition at line 155 of file csg_stat_imc.h.


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