inc

Model

class sme::model::Model

Public Functions

bool getIsValid() const
const QString &getErrorMessage() const
bool getHasUnsavedChanges() const
const QString &getCurrentFilename() const
void setName(const QString &name)
QString getName() const
ModelCompartments &getCompartments()
const ModelCompartments &getCompartments() const
ModelGeometry &getGeometry()
const ModelGeometry &getGeometry() const
ModelMembranes &getMembranes()
const ModelMembranes &getMembranes() const
ModelSpecies &getSpecies()
const ModelSpecies &getSpecies() const
ModelReactions &getReactions()
const ModelReactions &getReactions() const
ModelFunctions &getFunctions()
const ModelFunctions &getFunctions() const
ModelParameters &getParameters()
const ModelParameters &getParameters() const
ModelEvents &getEvents()
const ModelEvents &getEvents() const
ModelUnits &getUnits()
const ModelUnits &getUnits() const
ModelMath &getMath()
const ModelMath &getMath() const
simulate::SimulationData &getSimulationData()
const simulate::SimulationData &getSimulationData() const
SimulationSettings &getSimulationSettings()
const SimulationSettings &getSimulationSettings() const
MeshParameters &getMeshParameters()
const MeshParameters &getMeshParameters() const
simulate::OptimizeOptions &getOptimizeOptions()
const simulate::OptimizeOptions &getOptimizeOptions() const
explicit Model()
Model(Model&&) noexcept = default
Model &operator=(Model&&) noexcept = default
Model &operator=(const Model&) = delete
Model(const Model&) = delete
~Model()
void createSBMLFile(const std::string &name)
void importSBMLFile(const std::string &filename)
void importSBMLString(const std::string &xml, const std::string &filename = {})
void exportSBMLFile(const std::string &filename)
void importFile(const std::string &filename)
void exportSMEFile(const std::string &filename)
QString getXml()
void clear()
SpeciesGeometry getSpeciesGeometry(const QString &speciesID) const
std::string inlineExpr(const std::string &mathExpression) const
DisplayOptions getDisplayOptions() const
void setDisplayOptions(const DisplayOptions &displayOptions)

ModelCompartments

class sme::model::ModelCompartments

Public Functions

ModelCompartments()
ModelCompartments(libsbml::Model *model, ModelMembranes *membranes, const ModelUnits *units, simulate::SimulationData *data)
void setGeometryPtr(ModelGeometry *geometry)
void setSpeciesPtr(ModelSpecies *species)
void setReactionsPtr(ModelReactions *reactions)
void setSimulationDataPtr(simulate::SimulationData *data)
const QStringList &getIds() const
const QStringList &getNames() const
const QVector<QRgb> &getColours() const
QString add(const QString &name)
bool remove(const QString &id)
QString getName(const QString &id) const
QString setName(const QString &id, const QString &name)
std::optional<std::vector<QPointF>> getInteriorPoints(const QString &id) const
void setInteriorPoints(const QString &id, const std::vector<QPointF> &points)
void setColour(const QString &id, QRgb colour)
QRgb getColour(const QString &id) const
QString getIdFromColour(QRgb colour) const
const std::vector<std::unique_ptr<geometry::Compartment>> &getCompartments() const
geometry::Compartment *getCompartment(const QString &id)
const geometry::Compartment *getCompartment(const QString &id) const
double getSize(const QString &id) const
const std::map<std::string, double, std::less<>> &getInitialCompartmentSizes() const
void clear()
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelEvents

class sme::model::ModelEvents

Public Functions

ModelEvents()
explicit ModelEvents(libsbml::Model *model, ModelParameters *parameters = nullptr, ModelSpecies *species = nullptr)
const QStringList &getIds() const
const QStringList &getNames() const
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
void setVariable(const QString &id, const QString &variable)
QString getVariable(const QString &id) const
void setTime(const QString &id, double time)
double getTime(const QString &id) const
void setExpression(const QString &id, const QString &expr)
QString getExpression(const QString &id) const
QString add(const QString &name, const QString &variable)
bool isParameter(const QString &id) const
double getValue(const QString &id) const
void remove(const QString &id)
void removeAnyUsingVariable(const QString &variable)
void applyEvent(const QString &id)
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelFunctions

class sme::model::ModelFunctions

Public Functions

ModelFunctions()
explicit ModelFunctions(libsbml::Model *model)
const QStringList &getIds() const
const QStringList &getNames() const
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
void setExpression(const QString &id, const QString &expression)
QString getExpression(const QString &id) const
QStringList getArguments(const QString &id) const
QString addArgument(const QString &functionId, const QString &argumentId)
void removeArgument(const QString &functionId, const QString &argumentId)
QString add(const QString &name)
void remove(const QString &id)
std::vector<common::SymbolicFunction> getSymbolicFunctions() const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelGeometry

class sme::model::ModelGeometry

Public Functions

ModelGeometry()
explicit ModelGeometry(libsbml::Model *model, ModelCompartments *compartments, ModelMembranes *membranes, const ModelUnits *units, Settings *annotation)
void importSampledFieldGeometry(const libsbml::Model *model)
void importSampledFieldGeometry(const QString &filename)
void importGeometryFromImage(const QImage &img, bool keepColourAssignments)
void updateMesh()
void clear()
int getNumDimensions() const
double getPixelWidth() const
void setPixelWidth(double width, bool updateSBML = true)
double getPixelDepth() const
void setPixelDepth(double depth)
double getZOrigin() const
const QPointF &getPhysicalOrigin() const
const QSizeF &getPhysicalSize() const
QPointF getPhysicalPoint(const QPoint pixel) const
QString getPhysicalPointAsString(const QPoint pixel) const
const QImage &getImage() const
mesh::Mesh *getMesh() const
bool getIsValid() const
bool getHasImage() const
void writeGeometryToSBML() const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelMath

class sme::model::ModelMath

Public Functions

ModelMath()
explicit ModelMath(const libsbml::Model *model)
void parse(const std::string &expr)
double eval(const std::map<const std::string, std::pair<double, bool>> &vars = {}) const
bool isValid() const
const std::string &getErrorMessage() const
ModelMath(ModelMath&&) noexcept
ModelMath &operator=(ModelMath&&) noexcept
ModelMath &operator=(const ModelMath&) = delete
ModelMath(const ModelMath&) = delete
~ModelMath()

ModelMembranes

class sme::model::ModelMembranes

Public Functions

const QStringList &getIds() const
const QStringList &getNames() const
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
const std::vector<geometry::Membrane> &getMembranes() const
const geometry::Membrane *getMembrane(const QString &id) const
const std::vector<std::pair<std::string, std::pair<QRgb, QRgb>>> &getIdColourPairs() const
double getSize(const QString &id) const
void updateCompartmentNames(const QStringList &compartmentNames)
void updateCompartments(const std::vector<std::unique_ptr<geometry::Compartment>> &compartments)
void updateCompartmentImage(const QImage &img)
void importMembraneIdsAndNames()
void exportToSBML(double pixelArea)
explicit ModelMembranes(libsbml::Model *model = nullptr)
ModelMembranes(ModelMembranes&&) noexcept
ModelMembranes &operator=(ModelMembranes&&) noexcept
ModelMembranes &operator=(const ModelMembranes&) = delete
ModelMembranes(const ModelMembranes&) = delete
~ModelMembranes()
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelParameters

class sme::model::ModelParameters

Public Functions

ModelParameters()
explicit ModelParameters(libsbml::Model *model)
void setEventsPtr(ModelEvents *events)
void setSpeciesPtr(ModelSpecies *species)
const QStringList &getIds() const
const QStringList &getNames() const
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
void setExpression(const QString &id, const QString &expr)
QString getExpression(const QString &id) const
QString add(const QString &name)
void remove(const QString &id)
const SpatialCoordinates &getSpatialCoordinates() const
void setSpatialCoordinates(SpatialCoordinates coords)
std::vector<IdName> getSymbols(const QStringList &compartments = {}) const
std::vector<IdNameValue> getGlobalConstants() const
std::vector<IdNameExpr> getNonConstantParameters() const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelReactions

class sme::model::ModelReactions

Public Functions

ModelReactions()
explicit ModelReactions(libsbml::Model *model, const ModelCompartments *compartments, const ModelMembranes *membranes, bool isNonSpatialModel)
void makeReactionLocationsValid()
void applySpatialReactionRescalings(const std::vector<ReactionRescaling> &reactionRescalings)
std::vector<ReactionRescaling> getSpatialReactionRescalings() const
bool getIsIncompleteODEImport() const
QStringList getIds(const QString &locationId) const
QStringList getIds(const ReactionLocation &reactionLocation) const
std::vector<ReactionLocation> getReactionLocations() const
QString add(const QString &name, const QString &locationId, const QString &rateExpression = "1")
void remove(const QString &id)
void removeAllInvolvingSpecies(const QString &speciesId)
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
QString getScheme(const QString &id) const
void setLocation(const QString &id, const QString &locationId)
QString getLocation(const QString &id) const
double getSpeciesStoichiometry(const QString &id, const QString &speciesId) const
void setSpeciesStoichiometry(const QString &id, const QString &speciesId, double stoichiometry)
QString getRateExpression(const QString &id) const
void setRateExpression(const QString &id, const QString &expression)
QStringList getParameterIds(const QString &id) const
QString setParameterName(const QString &reactionId, const QString &parameterId, const QString &name)
QString getParameterName(const QString &reactionId, const QString &parameterId) const
void setParameterValue(const QString &reactionId, const QString &parameterId, double value)
double getParameterValue(const QString &reactionId, const QString &parameterId) const
QString addParameter(const QString &reactionId, const QString &name, double value)
void removeParameter(const QString &reactionId, const QString &id)
bool dependOnVariable(const QString &variableId) const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelSpecies

class sme::model::ModelSpecies

Public Functions

ModelSpecies()
ModelSpecies(libsbml::Model *model, const ModelCompartments *compartments, const ModelGeometry *geometry, const ModelParameters *parameters, simulate::SimulationData *data, Settings *annotation)
void setReactionsPtr(ModelReactions *reactions)
void setSimulationDataPtr(simulate::SimulationData *data)
bool containsNonSpatialReactiveSpecies() const
QString add(const QString &name, const QString &compartmentId)
void remove(const QString &id)
QString setName(const QString &id, const QString &name)
QString getName(const QString &id) const
void updateCompartmentGeometry(const QString &compartmentId)
void setCompartment(const QString &id, const QString &compartmentId)
QString getCompartment(const QString &id) const
QStringList getIds(const QString &compartmentId) const
QStringList getNames(const QString &compartmentId) const
void setIsSpatial(const QString &id, bool isSpatial)
bool getIsSpatial(const QString &id) const
void setDiffusionConstant(const QString &id, double diffusionConstant)
double getDiffusionConstant(const QString &id) const
ConcentrationType getInitialConcentrationType(const QString &id) const
void setInitialConcentration(const QString &id, double concentration)
double getInitialConcentration(const QString &id) const
void setAnalyticConcentration(const QString &id, const QString &analyticExpression)
void setFieldConcAnalytic(geometry::Field &field, const std::string &expr, const std::map<std::string, double, std::less<>> &substitutions = {})
QString getAnalyticConcentration(const QString &id) const
void updateAllAnalyticConcentrations()
void setSampledFieldConcentration(const QString &id, const std::vector<double> &concentrationArray)
std::vector<double> getSampledFieldConcentration(const QString &id, bool maskAndInvertY = false) const
QImage getConcentrationImage(const QString &id) const
void setColour(const QString &id, QRgb colour)
QRgb getColour(const QString &id) const
void setIsConstant(const QString &id, bool constant)
bool getIsConstant(const QString &id) const
bool isReactive(const QString &id) const
void removeInitialAssignments()
QString getSampledFieldInitialAssignment(const QString &id) const
geometry::Field *getField(const QString &id)
const geometry::Field *getField(const QString &id) const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

ModelUnits

class sme::model::ModelUnits

Public Functions

explicit ModelUnits(libsbml::Model *model = nullptr)
const Unit &getTime() const
int getTimeIndex() const
const QVector<Unit> &getTimeUnits() const
QVector<Unit> &getTimeUnits()
void setTimeIndex(int index)
const Unit &getLength() const
int getLengthIndex() const
const QVector<Unit> &getLengthUnits() const
QVector<Unit> &getLengthUnits()
void setLengthIndex(int index)
const Unit &getVolume() const
int getVolumeIndex() const
const QVector<Unit> &getVolumeUnits() const
QVector<Unit> &getVolumeUnits()
void setVolumeIndex(int index)
const Unit &getAmount() const
int getAmountIndex() const
const QVector<Unit> &getAmountUnits() const
QVector<Unit> &getAmountUnits()
void setAmountIndex(int index)
const QString &getConcentration() const
const QString &getDiffusion() const
const QString &getCompartmentReaction() const
const QString &getMembraneReaction() const
bool getHasUnsavedChanges() const
void setHasUnsavedChanges(bool unsavedChanges)

Settings

struct sme::model::Settings

Public Functions

template<class Archive>
inline void serialize(Archive &ar, std::uint32_t const version)

Public Members

SimulationSettings simulationSettings = {}
DisplayOptions displayOptions = {}
MeshParameters meshParameters = {}
std::map<std::string, QRgb> speciesColours = {}
sme::simulate::OptimizeOptions optimizeOptions = {}
struct sme::model::SimulationSettings

Public Functions

template<class Archive>
inline void serialize(Archive &ar, std::uint32_t const version)

Public Members

std::vector<std::pair<std::size_t, double>> times = {}
simulate::Options options = {}
sme::simulate::SimulatorType simulatorType = {}
struct sme::model::DisplayOptions

Public Functions

template<class Archive>
inline void serialize(Archive &ar, std::uint32_t const version)

Public Members

std::vector<bool> showSpecies = {}
bool showMinMax = {true}
bool normaliseOverAllTimepoints = {true}
bool normaliseOverAllSpecies = {true}
bool showGeometryGrid = {false}
bool showGeometryScale = {false}
bool invertYAxis = {false}
struct sme::model::MeshParameters

Public Functions

template<class Archive>
inline void serialize(Archive &ar, std::uint32_t const version)

Public Members

std::vector<std::size_t> maxPoints = {}
std::vector<std::size_t> maxAreas = {}
std::size_t boundarySimplifierType = {0}