Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
jLM.RDMEExtended.SimExtended Class Reference
Inheritance diagram for jLM.RDMEExtended.SimExtended:
[legend]
Collaboration diagram for jLM.RDMEExtended.SimExtended:
[legend]

Public Member Functions

 __init__ (self, *, name, filename, dimensions, latticeSpacing, regionName, latticeType=None, dt=None, enable_size_checking=True)
 species (self, name, particle_size=1, **kwargs)
 set_verbosity (self, verbosity)
 distributeConcentration (self, sp, reg, conc)
 distributeNumber (self, sp, reg, count)
 construct (self)
 run (self, solver=None, replicate=1, seed=None, cudaDevices=None, checkpointInterval=0, sample_frame=False, max_frames=100)
 get_site_analysis (self, x, y, z)
 analyze_occupancy_distribution (self)
 print_occupancy_stats (self)
Public Member Functions inherited from jLM.ParticleSizeSupport.ParticleSizeMixin
 __init__ (self, *args, **kwargs)
ParticleSizeValidator size_validator (self)
 enable_particle_sizes (self, bool enable=True)
 set_particle_size (self, species, int size)
int get_particle_size (self, species)
dict get_all_particle_sizes (self)
 distribute_concentration_safe (self, species, region, float concentration)
 distribute_number_safe (self, species, region, int count)
Dict get_capacity_summary (self)
 validate_all_species (self)
 print_capacity_summary (self)
Public Member Functions inherited from jLM.RDME.Sim
 particleStatistics (self, particleLattice=None, siteLattice=None)
 __init__ (self, name, filename, dimensions, latticeSpacing, regionName, latticeType=None, dt=None)
Public Member Functions inherited from jLM.RDME.SpatialModel
 simulationTime (self)
 simulationTime (self, val)
 speciesWriteInterval (self)
 speciesWriteInterval (self, val)
 latticeWriteInterval (self)
 latticeWriteInterval (self, val)
 perfPrintInterval (self)
 perfPrintInterval (self, val)
 hookInterval (self)
 hookInterval (self, val)
 __init__ (self, name, filename, dimensions, latticeSpacing, latticeType=None)
 resizeLattice (self, dimensions, latticeSpacing, latticeType=None)
 placeNumber (self, sp, x, y, z, n)
 transitionRate (self, sp, rFrom, rTo, rate, value=None)
 assignReaction (self, reaction, region)
 region (self, name, **kwargs)
 reaction (self, reactants, products, rate, value=None, regions=None, **kwargs)
 rateConst (self, rate, value, order, **kwargs)
 diffusionConst (self, rate, value, **kwargs)
 diffusionZero (self)
 maxDiffusionRate (self, latticeSpacing=None, dt=None)
 diffusionFast (self)
 setMaximumTimestep (self)

Public Attributes

bool particle_sizes_passed = False
 verbosity = verbosity
Public Attributes inherited from jLM.ParticleSizeSupport.ParticleSizeMixin
 lattice
 siteLattice = self.lattice.getSiteLatticeView()
 particleLattice = self.lattice.getParticleLatticeView()
 speciesList
Public Attributes inherited from jLM.RDME.Sim
 speciesList = BT.SimObjs(self, T.BuilderSpecies, idbase=1)
 regionList = BT.SimObjs(self, T.BuilderRegion)
 reactionList = BT.SimObjs(self, T.BuilderReaction)
 rxnRateList = BT.SimObjs(self, T.RateConst)
 sp = self.speciesList.getAutoNamespace()
 reg = self.regionList.getAutoNamespace()
 rc = self.rxnRateList.getAutoNamespace()
 dc = self.diffRateList.getAutoNamespace()
int bytesPerParticle = 4
 timestep = dt
Public Attributes inherited from jLM.RDME.SpatialModel
 name = name
 filename = filename
 latticeType = latticeType
float NA = 6.02214085774e23
int siteV = 1000 * latticeSpacing**3
int siteNAV = self.siteV * self.NA
 shape = nz,ny,nx
 latticeSpacing = latticeSpacing
 pps = lm.getCompiledLatticeMaxOccupancy()
 lattice = lm.IntLattice(nz,ny,nx, latticeSpacing, self.pps)
 siteLattice = self.lattice.getSiteLatticeView()
 particleLattice = self.lattice.getParticleLatticeView()
int maxConcentration = self.pps/self.siteNAV
 diffRateList

Protected Member Functions

 _configure_solver_particle_sizes (self, solver)
Protected Member Functions inherited from jLM.ParticleSizeSupport.ParticleSizeMixin
 _upgrade_to_extended_lattice (self)
 _copy_lattice_data (self, source, dest)

Additional Inherited Members

Protected Attributes inherited from jLM.ParticleSizeSupport.ParticleSizeMixin
 _size_validator = None
dict _particle_sizes = {}
Protected Attributes inherited from jLM.RDME.Sim
bool _particlesPlaced = False
Protected Attributes inherited from jLM.RDME.SpatialModel
int _perfPrintInterval = 60
list _particlePlacement = []
list _particleDistCount = []
list _particleDistConc = []
list _transitionRates = []
list _reactionLocations = []

Detailed Description

Extended Sim class with particle size support.

Constructor & Destructor Documentation

◆ __init__()

jLM.RDMEExtended.SimExtended.__init__ ( self,
* ,
name,
filename,
dimensions,
latticeSpacing,
regionName,
latticeType = None,
dt = None,
enable_size_checking = True )
Create new RDME simulation with particle size support.

Args:
    name (str): Simulation name
    filename (str): LM data filename
    dimensions (tuple): Lattice dimensions (nx, ny, nz)
    latticeSpacing (float): Lattice spacing in meters
    regionName (str): Name of the default region
    latticeType (str): "Byte" / "Int" (default: "Byte")
    dt (float): Timestep
    enable_size_checking (bool): Enable particle size validation

Example:
    >>> sim = jLM.RDMEExtended.SimExtended(
    ...     "test", "test.lm", (50, 50, 50), 1e-6, "cytoplasm",
    ...     enable_size_checking=True
    ... )
    >>> # Set particle sizes
    >>> sim.set_particle_size("SmallProtein", 1)
    >>> sim.set_particle_size("LargeComplex", 4)
    >>> # Distribute with validation
    >>> sim.distribute_concentration_safe("SmallProtein", "cytoplasm", 1e-6)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ _configure_solver_particle_sizes()

jLM.RDMEExtended.SimExtended._configure_solver_particle_sizes ( self,
solver )
protected
Helper method to configure solver with particle sizes.

Args:
    solver: The solver instance to configure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ analyze_occupancy_distribution()

jLM.RDMEExtended.SimExtended.analyze_occupancy_distribution ( self)
Analyze the distribution of site occupancies.

Returns:
    Dictionary with occupancy statistics
Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct()

jLM.RDMEExtended.SimExtended.construct ( self)
Construct the simulation with particle size validation.

Raises:
    ParticleSizeError: If any species violates size constraints
Here is the call graph for this function:
Here is the caller graph for this function:

◆ distributeConcentration()

jLM.RDMEExtended.SimExtended.distributeConcentration ( self,
sp,
reg,
conc )
Override to add size validation by default.

For unsafe distribution (bypassing validation), use:
super().distributeConcentration(sp, reg, conc)

Reimplemented from jLM.RDME.SpatialModel.

Here is the call graph for this function:

◆ distributeNumber()

jLM.RDMEExtended.SimExtended.distributeNumber ( self,
sp,
reg,
count )
Override to add size validation by default.

For unsafe distribution (bypassing validation), use:
super().distributeNumber(sp, reg, count)

Reimplemented from jLM.RDME.SpatialModel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_site_analysis()

jLM.RDMEExtended.SimExtended.get_site_analysis ( self,
x,
y,
z )
Get detailed analysis of a specific site.

Args:
    x, y, z: Site coordinates

Returns:
    Dictionary with site information including size data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_occupancy_stats()

jLM.RDMEExtended.SimExtended.print_occupancy_stats ( self)
Print occupancy distribution statistics.
Here is the call graph for this function:

◆ run()

jLM.RDMEExtended.SimExtended.run ( self,
solver = None,
replicate = 1,
seed = None,
cudaDevices = None,
checkpointInterval = 0,
sample_frame = False,
max_frames = 100 )
Run the RDME simulation with particle size support.

This override configures the solver with particle sizes before running.

Args:
    solver: RDME solver (auto-configures if IntMpdRdmeSolverExtended)
    replicate (int): Index of replicate
    seed (int): RNG seed
    cudaDevices ([int]): List of CUDA device indexes
    checkpointInterval (int): Number of seconds between checkpoints
    sample_frame (bool): Sample frames or not
    max_frames (int): Number of frames after sampling

Reimplemented from jLM.RDME.SpatialModel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_verbosity()

jLM.RDMEExtended.SimExtended.set_verbosity ( self,
verbosity )
Set the verbosity level.

◆ species()

jLM.RDMEExtended.SimExtended.species ( self,
name,
particle_size = 1,
** kwargs )
Create/lookup species with optional particle size.

Args:
    name (str): Species name
    particle_size (int): Size of particles (default: 1)
    **kwargs: Additional arguments

Returns:
    Species object with size configured

Reimplemented from jLM.RDME.SpatialModel.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ particle_sizes_passed

bool jLM.RDMEExtended.SimExtended.particle_sizes_passed = False

◆ verbosity

jLM.RDMEExtended.SimExtended.verbosity = verbosity

The documentation for this class was generated from the following file: