Chaste  Release::3.4
AbstractSrnModel Class Referenceabstract

#include <AbstractSrnModel.hpp>

+ Inheritance diagram for AbstractSrnModel:
+ Collaboration diagram for AbstractSrnModel:

Public Member Functions

 AbstractSrnModel ()
 
virtual ~AbstractSrnModel ()
 
void SetCell (CellPtr pCell)
 
virtual void Initialise ()
 
virtual void InitialiseDaughterCell ()
 
CellPtr GetCell ()
 
void SetSimulatedToTime (double simulatedToTime)
 
double GetSimulatedToTime ()
 
virtual void SimulateToCurrentTime ()=0
 
virtual void ResetForDivision ()
 
virtual AbstractSrnModelCreateSrnModel ()=0
 
void OutputSrnModelInfo (out_stream &rParamsFile)
 
virtual void OutputSrnModelParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Attributes

CellPtr mpCell
 
double mSimulatedToTime
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

The AbstractSrnModel contains basic information to all sub-cellular reaction network (SRN) models. It handles assignment of a Cell.

SRN models are noncopyable since cells are noncopyable.

Todo:
#2752 Thoroughly document this class (including, for example, what SRN stands for!)

Definition at line 62 of file AbstractSrnModel.hpp.

Constructor & Destructor Documentation

AbstractSrnModel::AbstractSrnModel ( )

Sets up a new AbstractSrnModel, gives it a birth time of the current simulation time (which is overwritten by some subclasses)

Definition at line 38 of file AbstractSrnModel.cpp.

AbstractSrnModel::~AbstractSrnModel ( )
virtual

Base class with virtual methods needs a virtual destructor. The destructor does not delete mpCell. Instead, the cell takes responsibility for deleting the cell-cycle model when it is destroyed.

Definition at line 43 of file AbstractSrnModel.cpp.

Member Function Documentation

virtual AbstractSrnModel* AbstractSrnModel::CreateSrnModel ( )
pure virtual

Builder method to create new instances of the SRN model. Each concrete subclass must implement this method to create an instance of that subclass.

This method is called by Cell::Divide() to create a SRN model for the daughter cell. Note that the parent SRN model will have had ResetForDivision() called just before CreateSrnModel() is called, so performing an exact copy of the parent is suitable behaviour. Any daughter-cell-specific initialisation can be done in InitialiseDaughterCell().

Returns
new SRN model

Implemented in NullSrnModel, Goldbeter1991SrnModel, and DeltaNotchSrnModel.

Referenced by DeltaNotchSrnModel::CreateSrnModel(), Goldbeter1991SrnModel::CreateSrnModel(), and Cell::Divide().

CellPtr AbstractSrnModel::GetCell ( )
Returns
The cell which plays host to this SRN model.

Definition at line 67 of file AbstractSrnModel.cpp.

References mpCell.

double AbstractSrnModel::GetSimulatedToTime ( )
Returns
the time the SRN simulated has run to.

Definition at line 78 of file AbstractSrnModel.cpp.

References mSimulatedToTime.

void AbstractSrnModel::Initialise ( void  )
virtual
Todo:
#2752 remove in favour of copy-constructors

Initialise the SRN model at the start of a simulation.

This method will be called precisely once per cell set up in the initial cell population. It is not called on cell division; use ResetForDivision(), CreateCellCycleModel() and InitialiseDaughterCell() for that.

By the time this is called, a CellPopulation will have been set up, so the model can know where its cell is located in space. If relevant to the simulation, any singletons will also have been initialised.

Reimplemented in Goldbeter1991SrnModel, and DeltaNotchSrnModel.

Definition at line 47 of file AbstractSrnModel.cpp.

Referenced by DeltaNotchSrnModel::Initialise(), Goldbeter1991SrnModel::Initialise(), and Cell::InitialiseSrnModel().

void AbstractSrnModel::InitialiseDaughterCell ( )
virtual

Initialise the new daughter cell's SRN model after a cell division.

This is called by Cell::Divide once the new cell object has been fully created, to perform any initialisation of the SRN which requires access to the cell.

Note that much initialisation can be performed using the combination of ResetForDivision() (called on the parent prior to division) and CreateCellCycleModel() (called on the reset parent to create the new cell-cycle model object).

Definition at line 51 of file AbstractSrnModel.cpp.

void AbstractSrnModel::OutputSrnModelInfo ( out_stream &  rParamsFile)

Output SRN model used in the simulation to file and then call OutputSrnParameters() to output all relevant parameters.

Parameters
rParamsFilethe file stream to which the parameters are output

Definition at line 92 of file AbstractSrnModel.cpp.

References Identifiable::GetIdentifier(), and OutputSrnModelParameters().

void AbstractSrnModel::OutputSrnModelParameters ( out_stream &  rParamsFile)
virtual

Output SRN model parameters to file.

As this method is pure virtual, it must be overridden in subclasses.

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented in AbstractOdeSrnModel, DeltaNotchSrnModel, and Goldbeter1991SrnModel.

Definition at line 101 of file AbstractSrnModel.cpp.

Referenced by OutputSrnModelInfo(), and AbstractOdeSrnModel::OutputSrnModelParameters().

void AbstractSrnModel::ResetForDivision ( )
virtual

Each SRN model must be able to be reset 'after' a cell division.

Actually, this method is called from Cell::Divide() to reset the SRN just before the daughter cell is created. CreateSrnModel() can then clone our state to generate a cell-cycle model instance for the daughter cell.

Reimplemented in AbstractOdeSrnModel.

Definition at line 55 of file AbstractSrnModel.cpp.

References SimulationTime::Instance(), mSimulatedToTime, and SimulateToCurrentTime().

Referenced by Cell::Divide(), and AbstractOdeSrnModel::ResetForDivision().

template<class Archive >
void AbstractSrnModel::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 75 of file AbstractSrnModel.hpp.

References SerializableSingleton< SINGLETON_CLASS >::GetSerializationWrapper(), SimulationTime::Instance(), and mSimulatedToTime.

void AbstractSrnModel::SetCell ( CellPtr  pCell)

Gives the SRN model a pointer to its host cell.

Parameters
pCellpointer to the cell

Definition at line 62 of file AbstractSrnModel.cpp.

References mpCell.

Referenced by Cell::Cell(), and Cell::SetSrnModel().

void AbstractSrnModel::SetSimulatedToTime ( double  simulatedToTime)

Set the time that the SRN simulation has run to.

Parameters
simulatedToTimethe current simulation time of the SRN.

Definition at line 73 of file AbstractSrnModel.cpp.

References mSimulatedToTime.

Referenced by NullSrnModel::CreateSrnModel(), AbstractOdeSrnModel::CreateSrnModel(), NullSrnModel::SimulateToCurrentTime(), and AbstractOdeSrnModel::SimulateToCurrentTime().

virtual void AbstractSrnModel::SimulateToCurrentTime ( )
pure virtual

Simulate the SRN to the current time.

This should be overridden for each SRN type i.e. ODE based.

Implemented in AbstractOdeSrnModel, Goldbeter1991SrnModel, DeltaNotchSrnModel, and NullSrnModel.

Referenced by Cell::ReadyToDivide(), and ResetForDivision().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 67 of file AbstractSrnModel.hpp.

Member Data Documentation

CellPtr AbstractSrnModel::mpCell
protected

The cell that this model is associated with.

Definition at line 92 of file AbstractSrnModel.hpp.

Referenced by GetCell(), AbstractOdeSrnModel::Initialise(), SetCell(), and DeltaNotchSrnModel::UpdateDeltaNotch().


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