A CME simulation that contains reactions and species.
More...
A CME simulation that contains reactions and species.
def pyLM.CME.CMESimulation.__init__ |
( |
|
self, |
|
|
|
volume = None , |
|
|
|
name = "unnamed" |
|
) |
| |
A constructor fo the CMESimulation.
- Parameters
-
volume | The reaction vessel volume (in Litres). Specifying 'None' signifies that the user has already accounted for volume in rate constants. |
name | The name of the CME simulation; Default: "unnamed" |
- Returns
- self
def pyLM.CME.CMESimulation.addConcentration |
( |
|
self, |
|
|
|
species = 'unknown' , |
|
|
|
conc = 0.0 |
|
) |
| |
Add a concentration of particles of the specified type to the simulation.
- Parameters
-
self | |
species | The name of the specie to add |
concentration | The concentration of the species (Molar). Particle count is rounded to nearest integer. |
- Exceptions
-
An | error if the volume is not specified |
def pyLM.CME.CMESimulation.addParticles |
( |
|
self, |
|
|
|
species = 'unknown' , |
|
|
|
count = 1 |
|
) |
| |
Add a specified number of particles of the specified type to the specified region.
- Parameters
-
self | |
species | The name of the specie to add particles to |
count | The number of that particle to start with (default 1) |
def pyLM.CME.CMESimulation.addReaction |
( |
|
self, |
|
|
|
reactant, |
|
|
|
product, |
|
|
|
rate |
|
) |
| |
Adds a 0th, 1st or 2nd order reaction.
- Parameters
-
self | |
reactant | The list or reactants |
product | The list of products |
rate | The rate of reaction |
def pyLM.CME.CMESimulation.buildReactionModel |
( |
|
self | ) |
|
Return the Lattice Microbes ReactionModel object for fine-tuning.
- Parameters
-
- Returns
- The reaction model for the simulation
def pyLM.CME.CMESimulation.defineSpecies |
( |
|
self, |
|
|
|
species |
|
) |
| |
Define a specie/s of particles that exist in the simulation.
- Parameters
-
self | |
species | A list of species to add to the simulation |
def pyLM.CME.CMESimulation.run |
( |
|
self, |
|
|
|
filename, |
|
|
|
method, |
|
|
|
replicates = 1 , |
|
|
|
seed = None |
|
) |
| |
Run the simulation using the specified solver the specified amount of time.
- Parameters
-
self | |
filename | The HDF file to write to |
method | The class name for the solver to use (e.g., lm::cme::GillespieDSolver") |
replicates | The number of replicates to serially run |
seed | A seed for the random number generator to use when running the simulation; None indicates default |
def pyLM.CME.CMESimulation.runMPI |
( |
|
self, |
|
|
|
filename, |
|
|
|
method, |
|
|
|
replicates = 1 , |
|
|
|
driver = "mpirun" , |
|
|
|
ppe = 1 , |
|
|
|
seed = None |
|
) |
| |
Run the simulation using a call to mpirun with the given options.
- Parameters
-
self | |
filename | The HDF file to write to |
method | The class name for the solver to use (e.g., lm::cme::GillespieDSolver") |
replicates | The number of replicates to serially run |
driver | The program to execute the parallel run, e.g. "mpirun", "aprun", "ibrun", etc. |
ppe | The number of processing elements to use |
seed | A seed for the random number generator to use when running the simulation; None indicates default |
def pyLM.CME.CMESimulation.runSolver |
( |
|
self, |
|
|
|
filename, |
|
|
|
solver, |
|
|
|
replicates = 1 |
|
) |
| |
def pyLM.CME.CMESimulation.save |
( |
|
self, |
|
|
|
filename |
|
) |
| |
Create an HDF5 version of the simulation amenable for later running or stand-alone running.
- Parameters
-
self | |
filename | The filename to save the simulation setup in |
def pyLM.CME.CMESimulation.setRandomSeed |
( |
|
self, |
|
|
|
seed |
|
) |
| |
def pyLM.CME.CMESimulation.setSimulationTime |
( |
|
self, |
|
|
|
time |
|
) |
| |
Set the total simulation time.
- Parameters
-
self | |
time | Time length of the simulation |
def pyLM.CME.CMESimulation.setTimestep |
( |
|
self, |
|
|
|
time |
|
) |
| |
def pyLM.CME.CMESimulation.setWriteInterval |
( |
|
self, |
|
|
|
time |
|
) |
| |
Set the simulation state write-to-disk interval.
- Parameters
-
self | |
time | Time length between writes |
pyLM.CME.CMESimulation.filename |
pyLM.CME.CMESimulation.initial_counts |
pyLM.CME.CMESimulation.name |
pyLM.CME.CMESimulation.parameters |
pyLM.CME.CMESimulation.particleMap |
pyLM.CME.CMESimulation.reactions |
pyLM.CME.CMESimulation.replicates |
pyLM.CME.CMESimulation.species_id |
pyLM.CME.CMESimulation.volume |
The documentation for this class was generated from the following file: