MOOSE - Multiscale Object Oriented Simulation Environment
|
Go to the source code of this file.
Functions | |
double | convertConcToNumRateInTwoCompts (double v1, unsigned int n1, double v2, unsigned int n2, double scale) |
double | convertConcToNumRateUsingMesh (const Eref &e, const SrcFinfo *pools, bool doPartialConversion) |
double | convertConcToNumRateUsingVol (const Eref &e, const SrcFinfo *pools, double volume, double scale, bool doPartialConversion) |
ObjId | getCompt (Id id) |
unsigned int | getReactantVols (const Eref &reac, const SrcFinfo *pools, vector< double > &vols) |
double | lookupVolumeFromMesh (const Eref &e) |
double convertConcToNumRateInTwoCompts | ( | double | v1, |
unsigned int | n1, | ||
double | v2, | ||
unsigned int | n2, | ||
double | scale | ||
) |
Generates conversion factor for rates from concentration to mol# units. This variant is used when the reactants are in different compartments or mesh entries, and may therefore have different volumes. We already know the reactants and their affiliations.
Definition at line 187 of file lookupVolumeFromMesh.cpp.
References NA.
double convertConcToNumRateUsingMesh | ( | const Eref & | e, |
const SrcFinfo * | pools, | ||
bool | doPartialConversion | ||
) |
Returns conversion factor to convert rates from concentration to mol# units. Handles arbitrary combinations of volumes. Assumes that the reference volume for computing rates is the smallest volume. 26 Feb 2013: This is now changed to use the volume of the first entry. Should only be used for substrates. For products need to find the first substrate, separately, and use that to scale down the conv factor. Assumes all calculations are in SI: cubic metres and millimolar. 27 Feb 2013: This is changed to use the volume of a voxel of the the home compartment of the reac. Be warned: this can cause unexpected problems if the home compartment isn't according to convention. For example, if there is a single substrate and the home compartment is elsewhere, you will get very odd Kf:kf values. 9 Oct 2013: This is now changed to use the volume of the first substrate. Note that if the conversion is for products, then the routine has to look up the substrate list to get the first substrate. Reason is that the home compartment was often wrong in ReadKkit. Unfortunately this may yet cause problems with SBML. I don't know what conventions they use for cross-compartment reactions.
Definition at line 114 of file lookupVolumeFromMesh.cpp.
References Element::cinfo(), Eref::element(), Cinfo::findFinfo(), getReactantVols(), NA, and Finfo::name().
Referenced by ZombieEnz::vGetK1(), Reac::vGetNumKb(), ZombieReac::vGetNumKb(), Reac::vGetNumKf(), ZombieReac::vGetNumKf(), Enz::vGetNumKm(), ZombieMMenz::vGetNumKm(), MMenz::vGetNumKm(), ZombieEnz::vGetNumKm(), Reac::vReinit(), MMenz::vRemesh(), Reac::vRemesh(), Enz::vSetConcK1(), Reac::vSetConcKb(), Reac::vSetConcKf(), ZombieEnz::vSetK1(), Enz::vSetK1(), Enz::vSetKm(), MMenz::vSetKm(), ZombieReac::vSetNumKb(), Reac::vSetNumKb(), ZombieReac::vSetNumKf(), Reac::vSetNumKf(), Enz::vSetNumKm(), ZombieMMenz::vSetNumKm(), MMenz::vSetNumKm(), ZombieEnz::vSetNumKm(), and Enz::vSetRatio().
double convertConcToNumRateUsingVol | ( | const Eref & | e, |
const SrcFinfo * | pools, | ||
double | volume, | ||
double | scale, | ||
bool | doPartialConversion | ||
) |
Generates conversion factor for rates from concentration to mol# units. This variant already knows the volume, but has to figure out # of reactants.
Definition at line 160 of file lookupVolumeFromMesh.cpp.
References Eref::element(), SrcFinfo::getBindIndex(), Element::getMsgAndFunc(), and NA.
Returns the compartment in which the specified object is located. Traverses the tree toward the rood till it finds a compartment.
Definition at line 23 of file lookupVolumeFromMesh.cpp.
References Element::cinfo(), ObjId::element(), getCompt(), ObjId::id, Cinfo::isA(), and Neutral::parent().
Referenced by ReadKkit::assignPoolCompartments(), ReadKkit::assignReacCompartments(), findMeshOfEnz(), findParentComptOfReac(), getCompt(), Stoich::installEnzyme(), Stoich::installMMenz(), Stoich::installReaction(), isOffSolverReac(), and lookupVolumeFromMesh().
Figures out all the volumes of the substrates or products on the specified reaction 'reac'. The SrcFinfo is for the sub or prd msg. Returns the index of the smallest vol. Passes back a vector of volumes. The meshIndex is zero. Reasoning is as follows: both in the case of well-stirred (single mesh entry) models, and in the case of spatial models with consistent mesh sizes and alignments, the mesh entry volumes are in the same ratio. Cases with more complex arrangements may also use the current vols as a starting point, but will need to add index-specific scaling factors to their reaction system.
Definition at line 58 of file lookupVolumeFromMesh.cpp.
References Element::cinfo(), Msg::e2(), Eref::element(), SrcFinfo::getBindIndex(), Msg::getMsg(), Element::getMsgAndFunc(), Cinfo::isA(), and lookupVolumeFromMesh().
Referenced by convertConcToNumRateUsingMesh().
double lookupVolumeFromMesh | ( | const Eref & | e | ) |
Utility function to find the size of a pool. We assume one-to-one match between pool indices and mesh indices: that is what they are for.
Definition at line 36 of file lookupVolumeFromMesh.cpp.
References Eref::dataIndex(), LookupField< L, A >::get(), getCompt(), and Eref::id().
Referenced by ReadKkit::buildEnz(), getReactantVols(), PoolBase::setNinit(), ZombiePool::vGetConc(), Pool::vGetConc(), ZombiePool::vGetConcInit(), ZombiePool::vGetVolume(), Pool::vGetVolume(), ZombieBufPool::vSetConc(), BufPool::vSetConc(), ZombiePool::vSetConc(), Pool::vSetConc(), ZombiePool::vSetConcInit(), and Pool::vSetConcInit().