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

Public Member Functions

 __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 Attributes

 lattice
 siteLattice = self.lattice.getSiteLatticeView()
 particleLattice = self.lattice.getParticleLatticeView()
 speciesList

Protected Member Functions

 _upgrade_to_extended_lattice (self)
 _copy_lattice_data (self, source, dest)

Protected Attributes

 _size_validator = None
dict _particle_sizes = {}

Detailed Description

Mixin class to add particle size support to RDME classes.

Constructor & Destructor Documentation

◆ __init__()

jLM.ParticleSizeSupport.ParticleSizeMixin.__init__ ( self,
* args,
** kwargs )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ _copy_lattice_data()

jLM.ParticleSizeSupport.ParticleSizeMixin._copy_lattice_data ( self,
source,
dest )
protected
Copy lattice data from source to destination.
Here is the caller graph for this function:

◆ _upgrade_to_extended_lattice()

jLM.ParticleSizeSupport.ParticleSizeMixin._upgrade_to_extended_lattice ( self)
protected
Upgrade to ByteLatticeExtended for size support.
Here is the call graph for this function:

◆ distribute_concentration_safe()

jLM.ParticleSizeSupport.ParticleSizeMixin.distribute_concentration_safe ( self,
species,
region,
float concentration )
Distribute concentration with size validation.

Args:
    species: Species object or name
    region: Region object or name
    concentration: Concentration in M

Raises:
    ParticleSizeError: If concentration exceeds capacity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ distribute_number_safe()

jLM.ParticleSizeSupport.ParticleSizeMixin.distribute_number_safe ( self,
species,
region,
int count )
Distribute particle count with size validation.

Args:
    species: Species object or name
    region: Region object or name
    count: Number of particles

Raises:
    ParticleSizeError: If count exceeds capacity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable_particle_sizes()

jLM.ParticleSizeSupport.ParticleSizeMixin.enable_particle_sizes ( self,
bool enable = True )
Enable or disable particle size checking.

Args:
    enable: Whether to enable size checking
Here is the caller graph for this function:

◆ get_all_particle_sizes()

dict jLM.ParticleSizeSupport.ParticleSizeMixin.get_all_particle_sizes ( self)
Get all particle sizes as a dictionary mapping species ID to size.

Returns:
    dict: Dictionary mapping species ID (int) to particle size (int)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_capacity_summary()

Dict jLM.ParticleSizeSupport.ParticleSizeMixin.get_capacity_summary ( self)
Get a summary of capacity information for all species.

Returns:
    Dictionary with capacity information for each species
Here is the caller graph for this function:

◆ get_particle_size()

int jLM.ParticleSizeSupport.ParticleSizeMixin.get_particle_size ( self,
species )
Get the size for a species.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_capacity_summary()

jLM.ParticleSizeSupport.ParticleSizeMixin.print_capacity_summary ( self)
Print a formatted capacity summary.
Here is the call graph for this function:

◆ set_particle_size()

jLM.ParticleSizeSupport.ParticleSizeMixin.set_particle_size ( self,
species,
int size )
Set the size for a species.

Args:
    species: Species object or name
    size: Size of the particle

Example:
    sim.set_particle_size(sim.sp.Protein, 2)
    sim.set_particle_size("LargeComplex", 4)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_validator()

ParticleSizeValidator jLM.ParticleSizeSupport.ParticleSizeMixin.size_validator ( self)
Get the particle size validator.
Here is the caller graph for this function:

◆ validate_all_species()

jLM.ParticleSizeSupport.ParticleSizeMixin.validate_all_species ( self)
Validate all species against size constraints.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _particle_sizes

dict jLM.ParticleSizeSupport.ParticleSizeMixin._particle_sizes = {}
protected

◆ _size_validator

jLM.ParticleSizeSupport.ParticleSizeMixin._size_validator = None
protected

◆ lattice

jLM.ParticleSizeSupport.ParticleSizeMixin.lattice

◆ particleLattice

jLM.ParticleSizeSupport.ParticleSizeMixin.particleLattice = self.lattice.getParticleLatticeView()

◆ siteLattice

jLM.ParticleSizeSupport.ParticleSizeMixin.siteLattice = self.lattice.getSiteLatticeView()

◆ speciesList

jLM.ParticleSizeSupport.ParticleSizeMixin.speciesList

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