
A class to define a model and provide Disk/DB IO for models. More...
#include "us_model.h"
Classes | |
| class | Association |
| Reversible association class The chemical constants associated with a reaction. More... | |
| class | MfemInitial |
| class | SimulationComponent |
| Simulation component (solute/analyte) class Each analyte in the model is a component. A sedimenting solute can also be a component. More... | |
Public Types | |
| enum | ShapeType { SPHERE, PROLATE, OBLATE, ROD } |
| Enumeration of the general shapes of molecules. More... | |
| enum | OpticsType { ABSORBANCE, INTERFERENCE, FLUORESCENCE } |
| The type of optics used to acquire data for the current model. More... | |
| enum | AnalysisType { MANUAL, TWODSA, TWODSA_MW, GA, GA_MW, PCSA, COFS, FE, CUSTOMGRID, DMGA, DMGA_CONSTR } |
| The type of analysis used with the model. More... | |
| enum | GlobalType { NONE, MENISCUS, GLOBAL, SUPERGLOBAL } |
| The type of global analysis used with the model. More... | |
Public Member Functions | |
| US_Model () | |
| Constructor for the US_Model class. More... | |
| int | load (bool, const QString &, US_DB2 *=0) |
| Read a model from the disk or database. More... | |
| int | load (const QString &, US_DB2 *) |
| An overloaded function to read a model from a database. More... | |
| int | load (const QString &) |
| An overloaded function to read a model from the disk. More... | |
| int | load_string (const QString &) |
| A function to load a model from an XML string. More... | |
| bool | operator== (const US_Model &) const |
| A test for model equality. More... | |
| bool | operator!= (const US_Model &m) const |
| A test for model inequality. More... | |
| int | write (bool, const QString &, US_DB2 *=0) |
| Write a model to the disk or database. More... | |
| int | write (US_DB2 *) |
| An overloaded function to write a model to the DB. More... | |
| int | write (const QString &) |
| An overloaded function to write a model to a file on disk. More... | |
| bool | update_coefficients (void) |
| Update any missing analyte coefficient values. More... | |
| QString | typeText (int=0) |
| Model type text. More... | |
| bool | constant_ff0 (void) |
| Flag constant f/f0. More... | |
| bool | constant_vbar (void) |
| Flag constant vbar. More... | |
| bool | is_reactant (const int compx) |
| Flag if a specified component is a reactant. More... | |
| bool | is_product (const int compx) |
| Flag if a specified component is a product of a reaction. More... | |
| int | mc_iter_xmls (QStringList &) |
| Get count and list of MonteCarlo iteration xml contents. More... | |
| void | debug (void) |
| Dump model data for debugging. More... | |
Static Public Member Functions | |
| static bool | calc_coefficients (SimulationComponent &) |
| Calculate any missing coefficient values in an analyte component. More... | |
| static bool | model_path (QString &, bool=true) |
| Model directory path existence test and creation. More... | |
| static QString | get_filename (const QString &, const QString &, bool &) |
| Find a model file on the disk. More... | |
| static QString | composite_mc_file (QStringList &, const bool) |
| Create or append to a composite MC model file. More... | |
Public Attributes | |
| bool | monteCarlo |
| Model was generated by MC Analysis. More... | |
| double | wavelength |
| Wavelength of the data acquisition. More... | |
| double | variance |
| Variance of model fit. More... | |
| double | meniscus |
| Meniscus value for model meniscus fit. More... | |
| double | alphaRP |
| Alpha (Regularization Parameter) value. More... | |
| QString | description |
| Text description of the model. More... | |
| QString | modelGUID |
| Identifier of the model. More... | |
| QString | editGUID |
| Identifier of the edit data. More... | |
| QString | requestGUID |
| Identifier of the LIMS request. More... | |
| QString | dataDescrip |
| Raw data triple description string. More... | |
| OpticsType | optics |
| The optics used for the data acquisition. More... | |
| AnalysisType | analysis |
| The analysis used with this model. More... | |
| GlobalType | global |
| Global params used for model generation. More... | |
| QStringList | mcixmls |
| Component MC iteration XML contents. More... | |
| int | nmcixs |
| Number of MC component xmls (iterations) More... | |
| int | subGrids |
| int | coSedSolute |
| QVector< SimulationComponent > | components |
| The components being analyzed. More... | |
| QVector< Association > | associations |
| The association constants for interacting solutes. More... | |
| QString | message |
| Used internally for communication. More... | |
Private Member Functions | |
| int | load_db (const QString &, US_DB2 *) |
| Load a model from the database. More... | |
| int | load_disk (const QString &) |
| Load a model from a local disk file. More... | |
| void | mfem_scans (QXmlStreamReader &, SimulationComponent &) |
| Parse and load an initial concentration vector. More... | |
| void | get_associations (QXmlStreamReader &, Association &) |
| Parse the associations part of a model XML. More... | |
| int | load_stream (QXmlStreamReader &) |
| Load a model from an XML stream. More... | |
| int | load_multi_model (QTextStream &) |
| Load a multi-iteration model from a text stream. More... | |
| void | write_stream (QXmlStreamWriter &) |
| Write to an XML stream. More... | |
| void | write_mm_stream (QTextStream &) |
| Write to a multiple model text stream. More... | |
A class to define a model and provide Disk/DB IO for models.
Definition at line 9 of file us_model.h.
The type of analysis used with the model.
| Enumerator | |
|---|---|
| MANUAL | |
| TWODSA | |
| TWODSA_MW | |
| GA | |
| GA_MW | |
| PCSA | |
| COFS | |
| FE | |
| CUSTOMGRID | |
| DMGA | |
| DMGA_CONSTR | |
Definition at line 27 of file us_model.h.
| enum US_Model::GlobalType |
The type of global analysis used with the model.
| Enumerator | |
|---|---|
| NONE | |
| MENISCUS | |
| GLOBAL | |
| SUPERGLOBAL | |
Definition at line 31 of file us_model.h.
| enum US_Model::OpticsType |
The type of optics used to acquire data for the current model.
| Enumerator | |
|---|---|
| ABSORBANCE | |
| INTERFERENCE | |
| FLUORESCENCE | |
Definition at line 24 of file us_model.h.
| enum US_Model::ShapeType |
Enumeration of the general shapes of molecules.
| Enumerator | |
|---|---|
| SPHERE | |
| PROLATE | |
| OBLATE | |
| ROD | |
Definition at line 21 of file us_model.h.
| US_Model::US_Model | ( | ) |
Constructor for the US_Model class.
Definition at line 78 of file us_model.cpp.
|
static |
Calculate any missing coefficient values in an analyte component.
Definition at line 146 of file us_model.cpp.
|
static |
Create or append to a composite MC model file.
| mcfiles | A list of MC iteration files to concatenate |
| rmvi | Flag to remove iteration files |
Definition at line 1294 of file us_model.cpp.
| bool US_Model::constant_ff0 | ( | void | ) |
Flag constant f/f0.
Definition at line 446 of file us_model.cpp.
| bool US_Model::constant_vbar | ( | void | ) |
Flag constant vbar.
Definition at line 461 of file us_model.cpp.
| void US_Model::debug | ( | void | ) |
Dump model data for debugging.
Definition at line 1596 of file us_model.cpp.
|
private |
Parse the associations part of a model XML.
Definition at line 898 of file us_model.cpp.
|
static |
Find a model file on the disk.
| path | The full path of the directory to search |
| guid | The GUID of the desired model |
| newFile | A reference to a boolean variable. Sets false if the model exist, true otherwise. |
Definition at line 1230 of file us_model.cpp.
| bool US_Model::is_product | ( | const int | compx | ) |
Flag if a specified component is a product of a reaction.
| compx | Index of component to interrogate |
Definition at line 496 of file us_model.cpp.
| bool US_Model::is_reactant | ( | const int | compx | ) |
Flag if a specified component is a reactant.
| compx | Index of component to interrogate |
Definition at line 476 of file us_model.cpp.
| int US_Model::load | ( | bool | db_access, |
| const QString & | guid, | ||
| US_DB2 * | db = 0 |
||
| ) |
Read a model from the disk or database.
| db_access | - A flag to indicate if the DB (true) or disk (false) should be searched for the model |
| guid | - The guid of the model to be loaded |
| db | - For DB access, pointer to open database connection |
Definition at line 516 of file us_model.cpp.
| int US_Model::load | ( | const QString & | id, |
| US_DB2 * | db | ||
| ) |
An overloaded function to read a model from a database.
| id | - Database ModelID |
| db | - For DB access, pointer to open database connection |
Definition at line 956 of file us_model.cpp.
| int US_Model::load | ( | const QString & | filename | ) |
An overloaded function to read a model from the disk.
| filename | The name, including full path, of the analyte file |
Definition at line 577 of file us_model.cpp.
|
private |
Load a model from the database.
Definition at line 941 of file us_model.cpp.
|
private |
Load a model from a local disk file.
Definition at line 523 of file us_model.cpp.
|
private |
Load a multi-iteration model from a text stream.
Definition at line 736 of file us_model.cpp.
|
private |
Load a model from an XML stream.
Definition at line 611 of file us_model.cpp.
| int US_Model::load_string | ( | const QString & | mcont | ) |
A function to load a model from an XML string.
| mcont | The XML string model contents |
Definition at line 603 of file us_model.cpp.
| int US_Model::mc_iter_xmls | ( | QStringList & | mcixs | ) |
Get count and list of MonteCarlo iteration xml contents.
| mcixs | Reference for return of MC xml contents |
Definition at line 1588 of file us_model.cpp.
|
private |
Parse and load an initial concentration vector.
Definition at line 876 of file us_model.cpp.
|
static |
Model directory path existence test and creation.
| path | - A reference to the directory path on the disk where model files are to be written |
| is_perm | - An optional flag if the files are non-temporary |
Definition at line 338 of file us_model.cpp.
|
inline |
A test for model inequality.
Definition at line 95 of file us_model.h.
| bool US_Model::operator== | ( | const US_Model & | m | ) | const |
A test for model equality.
Definition at line 103 of file us_model.cpp.
| QString US_Model::typeText | ( | int | subtype = 0 | ) |
Model type text.
| subtype | Optional PCSA subtype (1,2,4...->SL,IS,DS...) |
Definition at line 360 of file us_model.cpp.
| bool US_Model::update_coefficients | ( | void | ) |
Update any missing analyte coefficient values.
Definition at line 134 of file us_model.cpp.
| int US_Model::write | ( | bool | db_access, |
| const QString & | filename, | ||
| US_DB2 * | db = 0 |
||
| ) |
Write a model to the disk or database.
| db_access | - A flag to indicate if the DB (true) or disk (false) should be used to save the model |
| filename | - The filename (with path) where the xml file be written if disk access is specified |
| db | - For DB access, pointer to open database connection |
Definition at line 984 of file us_model.cpp.
| int US_Model::write | ( | US_DB2 * | db | ) |
An overloaded function to write a model to the DB.
| db | - A pointer to an open database connection |
Definition at line 991 of file us_model.cpp.
| int US_Model::write | ( | const QString & | filename | ) |
An overloaded function to write a model to a file on disk.
| filename | - The filename to write |
Definition at line 1055 of file us_model.cpp.
|
private |
Write to a multiple model text stream.
Definition at line 856 of file us_model.cpp.
|
private |
Write to an XML stream.
Definition at line 1080 of file us_model.cpp.
| double US_Model::alphaRP |
Alpha (Regularization Parameter) value.
Definition at line 38 of file us_model.h.
| AnalysisType US_Model::analysis |
The analysis used with this model.
Definition at line 45 of file us_model.h.
| QVector< Association > US_Model::associations |
The association constants for interacting solutes.
Definition at line 62 of file us_model.h.
| QVector< SimulationComponent > US_Model::components |
The components being analyzed.
Definition at line 59 of file us_model.h.
| int US_Model::coSedSolute |
An index into components (-1 means none). Generally buffer data in the form of a component that affects the data readings.
Definition at line 56 of file us_model.h.
| QString US_Model::dataDescrip |
Raw data triple description string.
Definition at line 43 of file us_model.h.
| QString US_Model::description |
Text description of the model.
Definition at line 39 of file us_model.h.
| QString US_Model::editGUID |
Identifier of the edit data.
Definition at line 41 of file us_model.h.
| GlobalType US_Model::global |
Global params used for model generation.
Definition at line 46 of file us_model.h.
| QStringList US_Model::mcixmls |
Component MC iteration XML contents.
Definition at line 47 of file us_model.h.
| double US_Model::meniscus |
Meniscus value for model meniscus fit.
Definition at line 37 of file us_model.h.
| QString US_Model::message |
Used internally for communication.
Definition at line 64 of file us_model.h.
| QString US_Model::modelGUID |
Identifier of the model.
Definition at line 40 of file us_model.h.
| bool US_Model::monteCarlo |
Model was generated by MC Analysis.
Definition at line 34 of file us_model.h.
| int US_Model::nmcixs |
Number of MC component xmls (iterations)
Definition at line 48 of file us_model.h.
| OpticsType US_Model::optics |
The optics used for the data acquisition.
Definition at line 44 of file us_model.h.
| QString US_Model::requestGUID |
Identifier of the LIMS request.
Definition at line 42 of file us_model.h.
| int US_Model::subGrids |
An integer to define the number of subgrids for a CUSTOMGRID needed for the 2DSA initialization or output components for DISCRETEGA
Definition at line 52 of file us_model.h.
| double US_Model::variance |
Variance of model fit.
Definition at line 36 of file us_model.h.
| double US_Model::wavelength |
Wavelength of the data acquisition.
Definition at line 35 of file us_model.h.
1.8.3.1-20130324