| Lattice Microbes 2.5
    This is for whole cell modeling | 
A representation of the simulation that is used to input or output from an HDF5 file. More...
#include <SimulationFile.h>
| Classes | |
| struct | ReplicateHandles | 
| A handle for the different replicates that may be stored in the HDF5 file.  More... | |
| Public Member Functions | |
| SimulationFile (const string filename) | |
| Create a SimulationFile with the specified filename. | |
| SimulationFile (const char *filename) | |
| Create a SimulationFile with the specified filename. | |
| virtual | ~SimulationFile () | 
| Destroy the SimulationFile. | |
| virtual void | close () | 
| Close the file. | |
| virtual void | flush () | 
| Flush the current buffered data to the file. | |
| virtual string | checkpoint () | 
| Create the current checkpoint to the HDF5 file. | |
| virtual map< string, string > | getParameters () | 
| Get all the parameters from the current replicate. | |
| virtual string | getParameter (string key, string defaultValue="") | 
| Get the specified parameter from the current replicate. | |
| virtual void | setParameter (string key, string value) | 
| Set the specified parameter to the value. | |
| virtual void | getReactionModel (lm::io::ReactionModel *reactionModel) | 
| Pops the reaction model from the HDF5 file. | |
| virtual void | setReactionModel (lm::io::ReactionModel *reactionModel) | 
| Pushes the reaction model into the HDF5 file. | |
| virtual void | getDiffusionModel (lm::io::DiffusionModel *diffusionModel) | 
| Pops the diffusion model from the HDF5 file. | |
| virtual void | getDiffusionModelLattice (lm::io::DiffusionModel *diffusionModel, byte *lattice, size_t latticeMaxSize, byte *latticeSites, size_t latticeSitesMaxSize) | 
| Pops the diffusion lattice from the HDF5 file. | |
| virtual void | getDiffusionModelLattice (lm::io::DiffusionModel *diffusionModel, lm::rdme::Lattice *lattice) | 
| Pops the diffusion lattice from the HDF5 file. | |
| virtual void | setDiffusionModel (lm::io::DiffusionModel *diffusionModel) | 
| Pushes the diffusion model into the HDF5 file. | |
| virtual void | setDiffusionModelLattice (lm::io::DiffusionModel *m, uint8_t *lattice, uint8_t *latticeSites) | 
| Pushes the diffusion lattice into the HDF5 file. | |
| virtual void | setDiffusionModelLattice (lm::io::DiffusionModel *m, uint32_t *lattice, uint8_t *latticeSites) | 
| Pushes the diffusion lattice into the HDF5 file. | |
| virtual void | setDiffusionModelLattice (lm::io::DiffusionModel *m, lm::rdme::ByteLattice *lattice) | 
| Pushes the diffusion lattice into the HDF5 file. | |
| virtual void | setDiffusionModelLattice (lm::io::DiffusionModel *m, lm::rdme::IntLattice *lattice) | 
| Pushes the diffusion lattice into the HDF5 file. | |
| virtual void | setSpatialModel (lm::io::SpatialModel *model) | 
| Pushes the spacial model (i.e. obstacles) into the HDF5 file. | |
| virtual void | getSpatialModel (lm::io::SpatialModel *model) | 
| Pops the spacial model (i.e. obstacles) from the HDF5 file. | |
| virtual bool | replicateExists (unsigned int replicate) | 
| Checks if the specified replicate exists. | |
| virtual void | openReplicate (unsigned int replicate) | 
| Opens the specified replicate for reading. | |
| virtual void | appendSpeciesCounts (unsigned int replicate, lm::io::SpeciesCounts *speciesCounts) | 
| Appends the species counts in the various sites into the replicate. | |
| virtual void | appendLattice (unsigned int replicate, lm::io::Lattice *lattice, byte *latticeData, size_t latticeDataSize) | 
| Appends the lattice to the current replicate. | |
| virtual void | appendLattice_U32LE (unsigned int replicate, lm::io::Lattice *lattice, uint32_t *latticeData, size_t latticeDataSize) | 
| virtual void | arbitraryH5 (byte *ptr) | 
| virtual void | arbitraryH5Lookup (byte *in, byte *&out, size_t &out_sz) | 
| virtual void | appendSites (unsigned int replicate, lm::io::Lattice *lattice, uint8_t *siteData, size_t siteDataSize) | 
| virtual void | appendParameterValues (unsigned int replicate, lm::io::ParameterValues *parameterValues) | 
| Adds all the parameter values to the replicate. | |
| virtual void | setFirstPassageTimes (unsigned int replicate, lm::io::FirstPassageTimes *speciesCounts) | 
| Adds all the first passage times to the replicate. | |
| virtual vector< double > | getLatticeTimes (unsigned int replicate) | 
| Get the timestep times for the replicate. | |
| virtual void | getLattice (unsigned int replicate, unsigned int latticeIndex, lm::rdme::Lattice *lattice) | 
| Get the lattice for the replicate. | |
| virtual void | closeReplicate (unsigned int replicate) | 
| Close the specified replicate. | |
| virtual void | closeAllReplicates () | 
| Close all the replicates. | |
| std::map< uint32_t, uint > | getParticleCounts (unsigned int replicate, unsigned int latticeIndex) | 
| std::map< double, vector< int > > | getSpeciesCounts (unsigned int replicate) | 
| vector< double > | getSpeciesCountTimes (unsigned int replicate) | 
| std::map< uint, string > | getSpeciesNames () | 
| std::map< uint, string > | getSiteTypeNames () | 
| Static Public Member Functions | |
| static bool | isValidFile (const string filename) | 
| Check that the HDF5 file is valid. | |
| static bool | isValidFile (const char *filename) | 
| Check that the HDF5 file is valid. | |
| static void | create (const string filename) | 
| Create an HDF5 file. | |
| static void | create (const char *filename) | 
| Create an HDF5 file. | |
| static void | create (const string filename, unsigned int numberSpecies) | 
| Create an HDF5 file with the specified number of species. | |
| static void | create (const char *filename, unsigned int numberSpecies) | 
| Create an HDF5 file with the specified number of species. | |
| static void | create (const char *filename, bool initializeModel, unsigned int numberSpecies=0) | 
| Create an HDF5 file and initialize the model with an optional number of species. | |
| Static Public Attributes | |
| static const uint | MIN_VERSION = 2 | 
| static const uint | CURRENT_VERSION = 4 | 
| static const uint | MAX_REACTION_RATE_CONSTANTS = 10 | 
| static const uint | MAX_SHAPE_PARAMETERS = 10 | 
| Protected Member Functions | |
| void | writeParticleLattice_U8LE (const char *path, uint8_t *data, unsigned int x, unsigned int y, unsigned int z, unsigned int w) | 
| void | writeParticleLattice_U32LE (hid_t handle, const char *path, unsigned int *data, unsigned int x, unsigned int y, unsigned int z, unsigned int w) | 
| void | write3DLattice_U8LE (const char *path, uint8_t *data, unsigned int x, unsigned int y, unsigned int z) | 
| void | appendToDataset (H5MetaData *header, byte *data) | 
| void | makeNewDataset (H5MetaData *header, byte *data) | 
| void | appendDsToGroup (H5MetaData *header, byte *data) | 
| void | readDataset (H5Lookup *req, byte *&data, size_t &sz) | 
| void | readAttr (H5Lookup *req, byte *&data, size_t &sz) | 
| virtual void | open () | 
| virtual void | openGroups () | 
| virtual void | loadParameters () | 
| virtual void | loadModel () | 
| virtual ReplicateHandles * | openReplicateHandles (unsigned int replicate) | 
| virtual ReplicateHandles * | createReplicateHandles (string replicateString) | 
| virtual void | closeReplicateHandles (ReplicateHandles *handles) | 
| Static Protected Member Functions | |
| static herr_t | parseParameter (hid_t location_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) | 
| Protected Attributes | |
| string | filename | 
| hid_t | file | 
| unsigned int | version | 
| hid_t | parametersGroup | 
| hid_t | modelGroup | 
| hid_t | simulationsGroup | 
| map< string, string > | parameterMap | 
| bool | modelLoaded | 
| unsigned int | numberSpecies | 
| map< unsigned int, ReplicateHandles * > | openReplicates | 
A representation of the simulation that is used to input or output from an HDF5 file.
| lm::io::hdf5::SimulationFile::SimulationFile | ( | const string | filename | ) | 
Create a SimulationFile with the specified filename.
| lm::io::hdf5::SimulationFile::SimulationFile | ( | const char * | filename | ) | 
Create a SimulationFile with the specified filename.
| 
 | virtual | 
Destroy the SimulationFile.
| 
 | protected | 
| 
 | virtual | 
Appends the lattice to the current replicate.
| replicate | Replicate number | 
| lattice | Lattice to add to replicate | 
| latticeData | The actual data of the lattice | 
| latticeDataSize | The size of the lattice | 
| 
 | virtual | 
| 
 | virtual | 
Adds all the parameter values to the replicate.
| replicate | Replicate number | 
| parameterValues | Actual values to store | 
| 
 | virtual | 
| 
 | virtual | 
Appends the species counts in the various sites into the replicate.
| replicate | Replicate number | 
| speciesCounts | Protocol buffers object with species counts in lattice | 
| 
 | protected | 
| 
 | virtual | 
| 
 | virtual | 
| 
 | virtual | 
Create the current checkpoint to the HDF5 file.
| checkpointFilename | Name of the new checkpoint file | 
| 
 | virtual | 
Close the file.
| 
 | virtual | 
Close all the replicates.
| 
 | virtual | 
Close the specified replicate.
| replicate | Replicate number | 
| 
 | protectedvirtual | 
| 
 | static | 
Create an HDF5 file.
| 
 | static | 
Create an HDF5 file and initialize the model with an optional number of species.
| 
 | static | 
Create an HDF5 file with the specified number of species.
| 
 | static | 
Create an HDF5 file.
| 
 | static | 
Create an HDF5 file with the specified number of species.
| 
 | protectedvirtual | 
| 
 | virtual | 
Flush the current buffered data to the file.
| 
 | virtual | 
Pops the diffusion model from the HDF5 file.
| diffusionModel | Memory at which to place the diffusionModel | 
| 
 | virtual | 
Pops the diffusion lattice from the HDF5 file.
| diffusionModel | Memoryfrom which to get the lattice | 
| lattice | Memory in which to place lattice | 
| latticeMaxSize | Total size of the lattice (i.e. number of bytes) | 
| latticeSites | Actual lattice site data in byte format | 
| latticeSitesMaxSize | Max size of a lattice site (i.e. number of particles it can contain) | 
| 
 | virtual | 
Pops the diffusion lattice from the HDF5 file.
| diffusionModel | Memoryfrom which to get the lattice | 
| lattice | Memory at which to place the lattice | 
| 
 | virtual | 
Get the lattice for the replicate.
| replicate | Replicate number | 
| latticeIndex | Seems to be unused... | 
| lattice | The lattice object in which to store the data | 
| 
 | virtual | 
Get the timestep times for the replicate.
| replicate | Replicate number | 
| 
 | virtual | 
Get the specified parameter from the current replicate.
| 
 | virtual | 
Get all the parameters from the current replicate.
| std::map< uint32_t, uint > lm::io::hdf5::SimulationFile::getParticleCounts | ( | unsigned int | replicate, | 
| unsigned int | latticeIndex ) | 
| 
 | virtual | 
Pops the reaction model from the HDF5 file.
| reactionModel | Memory at which to place the reactionModel | 
| std::map< uint, string > lm::io::hdf5::SimulationFile::getSiteTypeNames | ( | ) | 
| 
 | virtual | 
Pops the spacial model (i.e. obstacles) from the HDF5 file.
| model | The model in which to store the object | 
| std::map< double, vector< int > > lm::io::hdf5::SimulationFile::getSpeciesCounts | ( | unsigned int | replicate | ) | 
| vector< double > lm::io::hdf5::SimulationFile::getSpeciesCountTimes | ( | unsigned int | replicate | ) | 
| std::map< uint, string > lm::io::hdf5::SimulationFile::getSpeciesNames | ( | ) | 
| 
 | static | 
Check that the HDF5 file is valid.
| 
 | static | 
Check that the HDF5 file is valid.
| 
 | protectedvirtual | 
| 
 | protectedvirtual | 
| 
 | protected | 
| 
 | protectedvirtual | 
| 
 | protectedvirtual | 
| 
 | virtual | 
Opens the specified replicate for reading.
| replicate | Replicate number | 
| 
 | protectedvirtual | 
| 
 | staticprotected | 
| 
 | protected | 
| 
 | virtual | 
Checks if the specified replicate exists.
| replicate | Replicate number | 
| 
 | virtual | 
Pushes the diffusion model into the HDF5 file.
| diffusionModel | Memory from which to place the diffusionModel | 
| 
 | virtual | 
Pushes the diffusion lattice into the HDF5 file.
| diffusionModel | Memory from which to get the lattice | 
| lattice | Memory from which to place the lattice | 
| 
 | virtual | 
Pushes the diffusion lattice into the HDF5 file.
| diffusionModel | Memory from which to get the lattice | 
| lattice | Memory from which to place the lattice | 
| 
 | virtual | 
Pushes the diffusion lattice into the HDF5 file.
| diffusionModel | Memoryfrom which to get the lattice | 
| lattice | Memory from which to place the lattice - uint32_t particle lattice | 
| latticeSites | Memory from which to place lattice contents | 
| 
 | virtual | 
Pushes the diffusion lattice into the HDF5 file.
| diffusionModel | Memoryfrom which to get the lattice | 
| lattice | Memory from which to place the lattice - uint8_t particle lattice | 
| latticeSites | Memory from which to place lattice contents | 
| 
 | virtual | 
Adds all the first passage times to the replicate.
| replicate | Replicate number | 
| speciesCounts | Actual passage times to store | 
| 
 | virtual | 
Set the specified parameter to the value.
| 
 | virtual | 
Pushes the reaction model into the HDF5 file.
| reactionModel | Memory from which to place the reactionModel | 
| 
 | virtual | 
Pushes the spacial model (i.e. obstacles) into the HDF5 file.
| model | The model object | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | static | 
| 
 | protected | 
| 
 | protected | 
| 
 | static | 
| 
 | static | 
| 
 | static | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected |