CMAPLE 1.0.0
C++ MAximum Parsimonious Likelihood Estimation
Loading...
Searching...
No Matches
model.h
1
2#pragma once
3
4#include "../alignment/seqregions.h"
5#include "modelbase.h"
6
7namespace cmaple {
9class Model {
10 public:
14 struct ModelParams {
18 std::string model_name;
19
23 std::string state_freqs;
24
28 std::string mut_rates;
29 };
30
51
55
62 void fixParameters(const bool& fixed_model_params);
63
69
70 // TODO: allow users to specify model parameters
71
72 // declare Tree as a friend class
73 friend class Tree;
74
75 private:
79 ModelBase* model_base;
80};
81} // namespace cmaple
Definition modelbase.h:17
SubModel
Definition modelbase.h:116
@ DEFAULT
Default - GTR for DNA, and LG for Protein data.
Definition modelbase.h:166
Definition model.h:9
void fixParameters(const bool &fixed_model_params)
Keep the model parameters unchanged. This API is useful when using one model for multiple trees - aft...
~Model()
Destructor.
ModelParams getParams()
Export the substitution model and its parameters to a ModelParams structure.
Model(const cmaple::ModelBase::SubModel sub_model=cmaple::ModelBase::DEFAULT, const cmaple::SeqRegion::SeqType seqtype=cmaple::SeqRegion::SEQ_AUTO)
Constructor from a model name.
SeqType
Definition seqregion.h:25
@ SEQ_AUTO
Definition seqregion.h:28
Definition tree.h:12
Definition model.h:14
std::string model_name
Definition model.h:18
std::string mut_rates
Definition model.h:28
std::string state_freqs
Definition model.h:23