BioDynaMo  v1.03.58-27764645
Public Member Functions | Private Member Functions | Private Attributes | List of all members
bdm::GeneRegulation Class Reference

#include <gene_regulation.h>

Inheritance diagram for bdm::GeneRegulation:
Collaboration diagram for bdm::GeneRegulation:

Public Member Functions

 GeneRegulation ()
virtual ~GeneRegulation ()=default
void Initialize (const NewAgentEvent &event) override
void AddGene (const std::function< real_t(real_t, real_t)> &first_derivative, real_t initial_concentration)
const std::vector< real_t > & GetConcentrations () const
void Run (Agent *agent) override
- Public Member Functions inherited from bdm::Behavior
 Behavior ()
virtual ~Behavior ()=default
virtual BehaviorNew () const =0
 Create a new instance of this object using the default constructor. More...
virtual BehaviorNewCopy () const =0
 Create a new copy of this behavior. More...
virtual void Update (const NewAgentEvent &event)
void AlwaysCopyToNew ()
 Always copy this behavior to new agents. More...
void NeverCopyToNew ()
 Never copy this behavior to new agents. More...
void CopyToNewIf (const std::initializer_list< NewAgentEventUid > &uids)
void AlwaysRemoveFromExisting ()
void NeverRemoveFromExisting ()
void RemoveFromExistingIf (const std::initializer_list< NewAgentEventUid > &uids)
bool WillBeCopied (NewAgentEventUid event) const
bool WillBeRemoved (NewAgentEventUid event) const
void * operator new (size_t size)
void operator delete (void *p)

Private Member Functions

 BDM_BEHAVIOR_HEADER (GeneRegulation, Behavior, 1)

Private Attributes

std::vector< real_tconcentrations_ = {}
 Store the current concentration for each gene. More...
std::vector< std::function< real_t(real_t, real_t)> > first_derivatives_ = {}

Detailed Description

This behavior simulates expression of genes and contains all required additional variables for tracking of the concentration of proteins. Thus, it can work with any type of agent. It has the implementation of Euler and Runge-Kutta numerical methods for solving ODE. Both methods implemented inside the body of method Run(). The user determines which method is picked in particular simulation through variable Param::numerical_ode_solver.

Definition at line 36 of file gene_regulation.h.

Constructor & Destructor Documentation

◆ GeneRegulation()

bdm::GeneRegulation::GeneRegulation ( )

Definition at line 40 of file gene_regulation.h.

◆ ~GeneRegulation()

virtual bdm::GeneRegulation::~GeneRegulation ( )

Member Function Documentation

◆ AddGene()

void bdm::GeneRegulation::AddGene ( const std::function< real_t(real_t, real_t)> &  first_derivative,
real_t  initial_concentration 

AddGene adds a new differential equation.

first_derivativedifferential equation in the form: slope = f(time, last_concentration) – e.g.:
  [](real_t time, real_t last_concentration) {
     return 1 - time * last_concentration;

Definition at line 66 of file gene_regulation.h.


bdm::GeneRegulation::BDM_BEHAVIOR_HEADER ( GeneRegulation  ,
Behavior  ,

◆ GetConcentrations()

const std::vector<real_t>& bdm::GeneRegulation::GetConcentrations ( ) const

Definition at line 72 of file gene_regulation.h.

◆ Initialize()

void bdm::GeneRegulation::Initialize ( const NewAgentEvent event)

This method is called to initialize new behaviors that are created during a NewAgentEvent. Override this method to initialize attributes of your own Behavior subclasses. NB: Don't forget to call the implementation of the base class first. Base::Initialize(event); Failing to do so will result in errors.

Reimplemented from bdm::Behavior.

Definition at line 44 of file gene_regulation.h.

◆ Run()

void bdm::GeneRegulation::Run ( Agent agent)

Method Run() contains the implementation for Runge-Khutta and Euler methods for solving ODE.

Implements bdm::Behavior.

Definition at line 78 of file gene_regulation.h.

Member Data Documentation

◆ concentrations_

std::vector<real_t> bdm::GeneRegulation::concentrations_ = {}

Store the current concentration for each gene.

Definition at line 114 of file gene_regulation.h.

◆ first_derivatives_

std::vector<std::function<real_t(real_t, real_t)> > bdm::GeneRegulation::first_derivatives_ = {}

Store the gene differential equations, which define how the concentration change. New functions can be added through method AddGene()

Definition at line 119 of file gene_regulation.h.

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