| Lattice Microbes 2.5
    This is for whole cell modeling | 
A CME simulation that contains reactions and species. More...
| Public Member Functions | |
| __init__ (self, volume=None, name="unnamed") | |
| defineSpecies (self, species) | |
| addParticles (self, species='unknown', count=1) | |
| addConcentration (self, species='unknown', conc=0.0) | |
| addReaction (self, reactant, product, rate, name=None) | |
| buildReactionModel (self) | |
| setRandomSeed (self, seed) | |
| setWriteInterval (self, time) | |
| setHookInterval (self, time) | |
| setSimulationTime (self, time) | |
| setTimestep (self, time) | |
| save (self, filename) | |
| run (self, filename, method, replicates=1, seed=None, cudaDevices=[], checkpointInterval=0) | |
| runMPI (self, filename, method, replicates=1, driver="mpirun", ppe=1, seed=None) | |
| runSolver (self, filename, solver, replicates=1, cudaDevices=None, checkpointInterval=0) | |
| Public Attributes | |
| dict | particleMap = {} | 
| list | species_id = [] | 
| dict | initial_counts = {} | 
| list | reactions = [] | 
| dict | parameters = {} | 
| dict | reaction_map = {} | 
| dict | reverse_reaction_map = {} | 
| volume = volume | |
| name = name | |
| list | replicates = [] | 
| filename = None | |
| Protected Member Functions | |
| _repr_html_ (self) | |
A CME simulation that contains reactions and species.
A constructor for the CMESimulation
Args:
    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: 
    CMESimulation
 | jLM.CME.CMESimulation.__init__ | ( | self, | |
| volume = None, | |||
| name = "unnamed" ) | 
| 
 | protected | 
| jLM.CME.CMESimulation.addConcentration | ( | self, | |
| species = 'unknown', | |||
| conc = 0.0 ) | 
Add a concentration of particles of the specified type to the simulation
Args:
    species: 
        The name of the specie to add
    concentration: 
        The concentration of the species (Molar).  Particle count is rounded to nearest integer.
 
| jLM.CME.CMESimulation.addParticles | ( | self, | |
| species = 'unknown', | |||
| count = 1 ) | 
Add a specified number of particles of the specified type to the  specified region
Args:
    species: 
        The name of the specie to add particles to
    count:
        The number of that particle to start with (default 1)
 
| jLM.CME.CMESimulation.addReaction | ( | self, | |
| reactant, | |||
| product, | |||
| rate, | |||
| name = None ) | 
Adds a 0th, 1st or 2nd order reaction
        Reaction rates are specified as *stochastic* rates: i.e. in units of
        :math:`1/\mathrm{s}`.
        Args:
            reactant: 
                The list or reactants
            product:
                The list of products
            rate:
                The *stochastic* rate of reaction
            name:
                Optional name to identify the reaction
 
| jLM.CME.CMESimulation.buildReactionModel | ( | self | ) | 
Return the Lattice Microbes ReactionModel object for fine-tuning
Returns:
    The reaction model for the simulation
 | jLM.CME.CMESimulation.defineSpecies | ( | self, | |
| species ) | 
Define a species of particles that exist in the simulation
Args:
    species: 
        A list of species to add to the simulation, 
        or string, if only one species is being added
 
| jLM.CME.CMESimulation.run | ( | self, | |
| filename, | |||
| method, | |||
| replicates = 1, | |||
| seed = None, | |||
| cudaDevices = [], | |||
| checkpointInterval = 0 ) | 
Run the simulation using the specified solver the specified amount of time
Args:
    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
            cudaDevices:
                The index list of CUDA devices
            checkpointInterval:
                The time interval between check points
 | jLM.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
Args:
    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 (e.g. number of nodes)
    seed:
        A seed for the random number generator to use when running the simulation; None indicates default
 
| jLM.CME.CMESimulation.runSolver | ( | self, | |
| filename, | |||
| solver, | |||
| replicates = 1, | |||
| cudaDevices = None, | |||
| checkpointInterval = 0 ) | 
Run a simulation with a given solver
Args:
    filename:
        The HDF file to write to
    solver:
        An MESolver object
    replicates:
        The number of replicates to serially run
 | jLM.CME.CMESimulation.save | ( | self, | |
| filename ) | 
Create an HDF5 version of the simulation amenable for later running or stand-alone running
Args:
    filename:
        The filename to save the simulation setup in
 | jLM.CME.CMESimulation.setHookInterval | ( | self, | |
| time ) | 
Set the simulation hook interval
Args:
    time: 
        Time length between hook calls
 
| jLM.CME.CMESimulation.setRandomSeed | ( | self, | |
| seed ) | 
Set a known random seed
Args:
    seed:
        Random seed
 
| jLM.CME.CMESimulation.setSimulationTime | ( | self, | |
| time ) | 
Set the total simulation time
Args:
    time:
        Time length of the simulation
 
| jLM.CME.CMESimulation.setTimestep | ( | self, | |
| time ) | 
set the simulation time step
Args:
    time:
        The length of simulation timestep for CME
 
| jLM.CME.CMESimulation.setWriteInterval | ( | self, | |
| time ) | 
Set the simulation state write-to-disk interval 
Args:
    time :
        Time length between writes
 
| jLM.CME.CMESimulation.filename = None | 
| dict jLM.CME.CMESimulation.initial_counts = {} | 
| jLM.CME.CMESimulation.name = name | 
| jLM.CME.CMESimulation.parameters = {} | 
| dict jLM.CME.CMESimulation.particleMap = {} | 
| dict jLM.CME.CMESimulation.reaction_map = {} | 
| jLM.CME.CMESimulation.reactions = [] | 
| jLM.CME.CMESimulation.replicates = [] | 
| dict jLM.CME.CMESimulation.reverse_reaction_map = {} | 
| jLM.CME.CMESimulation.species_id = [] | 
| jLM.CME.CMESimulation.volume = volume |