# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
"""Lattice Microbes Python Bindings"""
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise RuntimeError("Python 2.7 or later required")
# Import the low-level C/C++ module
if __package__ or "." in __name__:
from . import _lm
else:
import _lm
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
def _swig_setattr_nondynamic_instance_variable(set):
def set_instance_attr(self, name, value):
if name == "thisown":
self.this.own(value)
elif name == "this":
set(self, name, value)
elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
set(self, name, value)
else:
raise AttributeError("You cannot add instance attributes to %s" % self)
return set_instance_attr
def _swig_setattr_nondynamic_class_variable(set):
def set_class_attr(cls, name, value):
if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
set(cls, name, value)
else:
raise AttributeError("You cannot add class attributes to %s" % cls)
return set_class_attr
def _swig_add_metaclass(metaclass):
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
def wrapper(cls):
return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
return wrapper
class _SwigNonDynamicMeta(type):
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
import weakref
[docs]
class SwigPyIterator(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _lm.delete_SwigPyIterator
[docs]
def value(self):
return _lm.SwigPyIterator_value(self)
[docs]
def incr(self, n=1):
return _lm.SwigPyIterator_incr(self, n)
[docs]
def decr(self, n=1):
return _lm.SwigPyIterator_decr(self, n)
[docs]
def distance(self, x):
return _lm.SwigPyIterator_distance(self, x)
[docs]
def equal(self, x):
return _lm.SwigPyIterator_equal(self, x)
[docs]
def copy(self):
return _lm.SwigPyIterator_copy(self)
[docs]
def next(self):
return _lm.SwigPyIterator_next(self)
def __next__(self):
return _lm.SwigPyIterator___next__(self)
[docs]
def previous(self):
return _lm.SwigPyIterator_previous(self)
[docs]
def advance(self, n):
return _lm.SwigPyIterator_advance(self, n)
def __eq__(self, x):
return _lm.SwigPyIterator___eq__(self, x)
def __ne__(self, x):
return _lm.SwigPyIterator___ne__(self, x)
def __iadd__(self, n):
return _lm.SwigPyIterator___iadd__(self, n)
def __isub__(self, n):
return _lm.SwigPyIterator___isub__(self, n)
def __add__(self, n):
return _lm.SwigPyIterator___add__(self, n)
def __sub__(self, *args):
return _lm.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
# Register SwigPyIterator in _lm:
_lm.SwigPyIterator_swigregister(SwigPyIterator)
COPYRIGHT_DATE = _lm.COPYRIGHT_DATE
BUILD_CONFIGURATION = _lm.BUILD_CONFIGURATION
MPD_LATTICE_MAX_OCCUPANCY = _lm.MPD_LATTICE_MAX_OCCUPANCY
LKCUDA_MAX_PARTICLE_OVERFLOWS = _lm.LKCUDA_MAX_PARTICLE_OVERFLOWS
RNG_TUNE_XORWOW_BLOCK_SIZE = _lm.RNG_TUNE_XORWOW_BLOCK_SIZE
RNG_TUNE_XORWOW_GRID_SIZE = _lm.RNG_TUNE_XORWOW_GRID_SIZE
RNG_TUNE_XORWOW_THREAD_ITERATIONS = _lm.RNG_TUNE_XORWOW_THREAD_ITERATIONS
LM_VERSION_STRING = _lm.LM_VERSION_STRING
MPD_BOUNDARY_PERIODIC = _lm.MPD_BOUNDARY_PERIODIC
MPD_MAX_REACTION_TABLE_ENTRIES = _lm.MPD_MAX_REACTION_TABLE_ENTRIES
MPD_MAX_RL_MATRIX_ENTRIES = _lm.MPD_MAX_RL_MATRIX_ENTRIES
MPD_MAX_S_MATRIX_ENTRIES = _lm.MPD_MAX_S_MATRIX_ENTRIES
MPD_MAX_TRANSITION_TABLE_ENTRIES = _lm.MPD_MAX_TRANSITION_TABLE_ENTRIES
PROF_CUDA_ENABLE = _lm.PROF_CUDA_ENABLE
PROF_MAX_EVENTS = _lm.PROF_MAX_EVENTS
PROF_MAX_THREADS = _lm.PROF_MAX_THREADS
PROF_OUT_FILE = _lm.PROF_OUT_FILE
TUNE_FIRST_PASSAGE_TIME_BUFFER_SIZE = _lm.TUNE_FIRST_PASSAGE_TIME_BUFFER_SIZE
TUNE_LATTICE_BUILDER_WRITE_BUFFER_SIZE = _lm.TUNE_LATTICE_BUILDER_WRITE_BUFFER_SIZE
TUNE_LATTICE_GZIP_CHUNK_SIZE = _lm.TUNE_LATTICE_GZIP_CHUNK_SIZE
TUNE_LATTICE_GZIP_COMPRESSION_LEVEL = _lm.TUNE_LATTICE_GZIP_COMPRESSION_LEVEL
TUNE_LOCAL_RNG_CACHE_SIZE = _lm.TUNE_LOCAL_RNG_CACHE_SIZE
TUNE_MPD_MAX_OVERFLOW_REPLACEMENT_DIST = _lm.TUNE_MPD_MAX_OVERFLOW_REPLACEMENT_DIST
TUNE_MPD_MAX_PARTICLE_OVERFLOWS = _lm.TUNE_MPD_MAX_PARTICLE_OVERFLOWS
TUNE_MPD_REACTION_BLOCK_X_SIZE = _lm.TUNE_MPD_REACTION_BLOCK_X_SIZE
TUNE_MPD_REACTION_BLOCK_Y_SIZE = _lm.TUNE_MPD_REACTION_BLOCK_Y_SIZE
TUNE_MPD_X_BLOCK_MAX_X_SIZE = _lm.TUNE_MPD_X_BLOCK_MAX_X_SIZE
TUNE_MPD_Y_BLOCK_X_SIZE = _lm.TUNE_MPD_Y_BLOCK_X_SIZE
TUNE_MPD_Y_BLOCK_Y_SIZE = _lm.TUNE_MPD_Y_BLOCK_Y_SIZE
TUNE_MPD_Z_BLOCK_X_SIZE = _lm.TUNE_MPD_Z_BLOCK_X_SIZE
TUNE_MPD_Z_BLOCK_Z_SIZE = _lm.TUNE_MPD_Z_BLOCK_Z_SIZE
TUNE_NRM_REUSE_PROPENSITIES = _lm.TUNE_NRM_REUSE_PROPENSITIES
TUNE_PARAMETER_VALUES_BUFFER_SIZE = _lm.TUNE_PARAMETER_VALUES_BUFFER_SIZE
TUNE_SPATIAL_MODEL_OBJECT_READ_BUFFER_SIZE = _lm.TUNE_SPATIAL_MODEL_OBJECT_READ_BUFFER_SIZE
TUNE_SPECIES_COUNTS_BUFFER_SIZE = _lm.TUNE_SPECIES_COUNTS_BUFFER_SIZE
VERSION_NUM_MAJOR = _lm.VERSION_NUM_MAJOR
VERSION_NUM_MINOR = _lm.VERSION_NUM_MINOR
VERSION_NUM_MICRO = _lm.VERSION_NUM_MICRO
[docs]
def setVerbosityLevel(x):
return _lm.setVerbosityLevel(x)
[docs]
class stdVectorInt(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
[docs]
def iterator(self):
return _lm.stdVectorInt_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _lm.stdVectorInt___nonzero__(self)
def __bool__(self):
return _lm.stdVectorInt___bool__(self)
def __len__(self):
return _lm.stdVectorInt___len__(self)
def __getslice__(self, i, j):
return _lm.stdVectorInt___getslice__(self, i, j)
def __setslice__(self, *args):
return _lm.stdVectorInt___setslice__(self, *args)
def __delslice__(self, i, j):
return _lm.stdVectorInt___delslice__(self, i, j)
def __delitem__(self, *args):
return _lm.stdVectorInt___delitem__(self, *args)
def __getitem__(self, *args):
return _lm.stdVectorInt___getitem__(self, *args)
def __setitem__(self, *args):
return _lm.stdVectorInt___setitem__(self, *args)
[docs]
def pop(self):
return _lm.stdVectorInt_pop(self)
[docs]
def append(self, x):
return _lm.stdVectorInt_append(self, x)
[docs]
def empty(self):
return _lm.stdVectorInt_empty(self)
[docs]
def size(self):
return _lm.stdVectorInt_size(self)
[docs]
def swap(self, v):
return _lm.stdVectorInt_swap(self, v)
[docs]
def begin(self):
return _lm.stdVectorInt_begin(self)
[docs]
def end(self):
return _lm.stdVectorInt_end(self)
[docs]
def rbegin(self):
return _lm.stdVectorInt_rbegin(self)
[docs]
def rend(self):
return _lm.stdVectorInt_rend(self)
[docs]
def clear(self):
return _lm.stdVectorInt_clear(self)
[docs]
def get_allocator(self):
return _lm.stdVectorInt_get_allocator(self)
[docs]
def pop_back(self):
return _lm.stdVectorInt_pop_back(self)
[docs]
def erase(self, *args):
return _lm.stdVectorInt_erase(self, *args)
def __init__(self, *args):
_lm.stdVectorInt_swiginit(self, _lm.new_stdVectorInt(*args))
[docs]
def push_back(self, x):
return _lm.stdVectorInt_push_back(self, x)
[docs]
def front(self):
return _lm.stdVectorInt_front(self)
[docs]
def back(self):
return _lm.stdVectorInt_back(self)
[docs]
def assign(self, n, x):
return _lm.stdVectorInt_assign(self, n, x)
[docs]
def resize(self, *args):
return _lm.stdVectorInt_resize(self, *args)
[docs]
def insert(self, *args):
return _lm.stdVectorInt_insert(self, *args)
[docs]
def reserve(self, n):
return _lm.stdVectorInt_reserve(self, n)
[docs]
def capacity(self):
return _lm.stdVectorInt_capacity(self)
__swig_destroy__ = _lm.delete_stdVectorInt
# Register stdVectorInt in _lm:
_lm.stdVectorInt_swigregister(stdVectorInt)
[docs]
class MESolver(object):
r"""
An abstract base class for all Master Equation solvers, this is essentially a representation of "the simulation instance".
C++ includes: MESolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
# Register MESolver in _lm:
_lm.MESolver_swigregister(MESolver)
[docs]
class point(object):
r"""
Type to store a position in space.
C++ includes: Shape.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, x=0.0, y=0.0, z=0.0):
r"""
`point(p2)`
Create a point from another point.
Parameters
----------
* `p2` :
The point to copy
"""
_lm.point_swiginit(self, _lm.new_point(x, y, z))
x = property(_lm.point_x_get, _lm.point_x_set)
y = property(_lm.point_y_get, _lm.point_y_set)
z = property(_lm.point_z_get, _lm.point_z_set)
[docs]
def distanceSquared(self, p2):
r"""
`distanceSquared(p2) -> si_dist_t`
Determine the distance squared between two points.
Parameters
----------
* `p2` :
Second point
Returns
-------
scalar distance squared
"""
return _lm.point_distanceSquared(self, p2)
[docs]
def distance(self, p2):
r"""
`distance(p2) -> si_dist_t`
Determine the distance to another point.
Parameters
----------
* `p2` :
Second point
Returns
-------
scalar distance
"""
return _lm.point_distance(self, p2)
__swig_destroy__ = _lm.delete_point
# Register point in _lm:
_lm.point_swigregister(point)
[docs]
class bounding_box(object):
r"""
The bounds for a shape represented as a rectangular box.
C++ includes: Shape.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`bounding_box(min, max)`
Create a bounding box from points.
Parameters
----------
* `min` :
Minimum coordinate
* `max` :
Maximum coordinate
"""
_lm.bounding_box_swiginit(self, _lm.new_bounding_box(*args))
min = property(_lm.bounding_box_min_get, _lm.bounding_box_min_set)
max = property(_lm.bounding_box_max_get, _lm.bounding_box_max_set)
[docs]
def joinWith(self, j):
r"""
`joinWith(j) -> bounding_box`
Return a bounding box spanning the two bounding boxes.
Parameters
----------
* `j` :
Other bounding box
Returns
-------
new bounding box
"""
return _lm.bounding_box_joinWith(self, j)
__swig_destroy__ = _lm.delete_bounding_box
# Register bounding_box in _lm:
_lm.bounding_box_swigregister(bounding_box)
[docs]
class vector(object):
r"""
A vector which points in a direction.
C++ includes: Shape.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, x=0.0, y=0.0, z=0.0):
r"""
`vector(p)`
Construct a vector from a point.
Parameters
----------
* `p` :
The point to cast
"""
_lm.vector_swiginit(self, _lm.new_vector(x, y, z))
x = property(_lm.vector_x_get, _lm.vector_x_set)
y = property(_lm.vector_y_get, _lm.vector_y_set)
z = property(_lm.vector_z_get, _lm.vector_z_set)
__swig_destroy__ = _lm.delete_vector
# Register vector in _lm:
_lm.vector_swigregister(vector)
[docs]
class Shape(object):
r"""
Abstract base class for all the shapes in Lattice Microbes simulation builder.
C++ includes: Shape.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
[docs]
def boundingBoxesIntersect(self, query):
r"""
`boundingBoxesIntersect(query) -> bool`
Checks if another shape's bounding box interstects with this shape's bounding box.
Parameters
----------
* `query` :
The other shape to test
Returns
-------
true/false
"""
return _lm.Shape_boundingBoxesIntersect(self, query)
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Shape_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Shape_contains(self, query)
[docs]
def getBoundingBox(self):
r"""
`getBoundingBox() -> bounding_box`
Get the bounding box.
"""
return _lm.Shape_getBoundingBox(self)
[docs]
def getType(self):
r"""
`getType() -> site_t`
Get the site type associated with the shape.
"""
return _lm.Shape_getType(self)
[docs]
def getVolume(self):
r"""
`getVolume() -> double`
Get the total internal volume of the shape.
"""
return _lm.Shape_getVolume(self)
__swig_destroy__ = _lm.delete_Shape
# Register Shape in _lm:
_lm.Shape_swigregister(Shape)
[docs]
class Sphere(Shape):
r"""
A Shape that represents a Sphere.
C++ includes: Sphere.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, center, radius, type):
r"""
`Sphere(center, radius, type)`
Create a Sphere.
Parameters
----------
* `center` :
Point center of the circle of the slice plane through the sphere
* `radius` :
Radius of the sphere
* `type` :
The type of the sites within the sphere
"""
_lm.Sphere_swiginit(self, _lm.new_Sphere(center, radius, type))
__swig_destroy__ = _lm.delete_Sphere
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Sphere_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Sphere_contains(self, query)
[docs]
def setCenter(self, center):
r"""
`setCenter(center)`
Set the center of the sphere.
Parameters
----------
* `center` :
Point of the center
"""
return _lm.Sphere_setCenter(self, center)
[docs]
def getCenter(self):
r"""
`getCenter() -> point`
Get the center of the sphere.
"""
return _lm.Sphere_getCenter(self)
[docs]
def getRadius(self):
r"""
`getRadius() -> si_dist_t`
Get the radius of the sphere.
"""
return _lm.Sphere_getRadius(self)
# Register Sphere in _lm:
_lm.Sphere_swigregister(Sphere)
[docs]
class Hemisphere(Shape):
r"""
A hemisphere Shape.
C++ includes: Hemisphere.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, center, radius, orientation, type):
r"""
`Hemisphere(center, radius, orientation, type)`
Create a Hemisphere.
Parameters
----------
* `center` :
Point center of the circle of the slice plane through the Hemisphere
* `radius` :
Radius of the Hemisphere
* `orientation` :
Orientation normal to the center point of the center point in the direction of the curved part of the hemisphere
* `type` :
The type of the sites within the hemisphere
"""
_lm.Hemisphere_swiginit(self, _lm.new_Hemisphere(center, radius, orientation, type))
__swig_destroy__ = _lm.delete_Hemisphere
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Hemisphere_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Hemisphere_contains(self, query)
[docs]
def getCenter(self):
r"""
`getCenter() -> point`
Get the center of the Hemisphere.
"""
return _lm.Hemisphere_getCenter(self)
[docs]
def getRadius(self):
r"""
`getRadius() -> si_dist_t`
Get the radius of the Hemisphere.
"""
return _lm.Hemisphere_getRadius(self)
[docs]
def getOrientation(self):
r"""
`getOrientation() -> vector`
Get the orientation vector of the Hemisphere.
"""
return _lm.Hemisphere_getOrientation(self)
# Register Hemisphere in _lm:
_lm.Hemisphere_swigregister(Hemisphere)
[docs]
class Capsule(Shape):
r"""
A Shape representing a cylinder with hemispherical ends.
C++ includes: Capsule.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, p1, p2, radius, type):
r"""
`Capsule(p1, p2, radius, type)`
Create a Capsule.
Parameters
----------
* `p1` :
Point of first end of cylinder
* `p2` :
Point of second end of cylinder
* `radius` :
Radius of the capsule cylinder/hemispheres ends
* `type` :
Site type of the capsule
"""
_lm.Capsule_swiginit(self, _lm.new_Capsule(p1, p2, radius, type))
__swig_destroy__ = _lm.delete_Capsule
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Capsule_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Capsule_contains(self, query)
[docs]
def getP1(self):
r"""
`getP1() -> point`
Get point of first end of cylinder.
"""
return _lm.Capsule_getP1(self)
[docs]
def getP2(self):
r"""
`getP2() -> point`
Get point of second end of cylinder.
"""
return _lm.Capsule_getP2(self)
[docs]
def getRadius(self):
r"""
`getRadius() -> si_dist_t`
Get the radius of the cylinder/hemisphere ends.
"""
return _lm.Capsule_getRadius(self)
# Register Capsule in _lm:
_lm.Capsule_swigregister(Capsule)
[docs]
class Cylinder(Shape):
r"""
A Shape representing a cylinder.
C++ includes: Cylinder.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, p1, p2, radius, type):
r"""
`Cylinder(p1, p2, radius, type)`
Create a Cylinder.
Parameters
----------
* `p1` :
Point of first end of cylinder
* `p2` :
Point of second end of cylinder
* `radius` :
Radius of the capsule cylinder/hemispheres ends
* `type` :
Site type of the capsule
"""
_lm.Cylinder_swiginit(self, _lm.new_Cylinder(p1, p2, radius, type))
__swig_destroy__ = _lm.delete_Cylinder
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Cylinder_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Cylinder_contains(self, query)
[docs]
def getP1(self):
r"""
`getP1() -> point`
Get point of first end of cylinder.
"""
return _lm.Cylinder_getP1(self)
[docs]
def getP2(self):
r"""
`getP2() -> point`
Get point of second end of cylinder.
"""
return _lm.Cylinder_getP2(self)
[docs]
def getRadius(self):
r"""
`getRadius() -> si_dist_t`
Get the radius of the cylinder/hemisphere ends.
"""
return _lm.Cylinder_getRadius(self)
# Register Cylinder in _lm:
_lm.Cylinder_swigregister(Cylinder)
[docs]
class Cone(Shape):
r"""
A Shape that represents a Cone.
C++ includes: Cone.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`Cone(center, radius, height, type, normal=vector(1.0, 0.0, 0.0))`
Create a Cone.
Parameters
----------
* `center` :
Point center of the circle of the base
* `radius` :
Radius of the base
* `height` :
Height of the cone
* `type` :
The type of the sites within the cone
* `normal` :
Normal to the center of the cone base
"""
_lm.Cone_swiginit(self, _lm.new_Cone(*args))
__swig_destroy__ = _lm.delete_Cone
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Cone_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Cone_contains(self, query)
[docs]
def getCenter(self):
r"""
`getCenter() -> point`
Get the center of the cone.
"""
return _lm.Cone_getCenter(self)
[docs]
def getRadius(self):
r"""
`getRadius() -> si_dist_t`
Get the radius of the cone.
"""
return _lm.Cone_getRadius(self)
[docs]
def getHeight(self):
r"""
`getHeight() -> si_dist_t`
Get the height of the cone.
"""
return _lm.Cone_getHeight(self)
# Register Cone in _lm:
_lm.Cone_swigregister(Cone)
[docs]
class CapsuleShell(Shape):
r"""
A capsule shell Shape with a hollow inside.
C++ includes: CapsuleShell.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, p1, p2, innerRadius, outerRadius, type):
r"""
`CapsuleShell(p1, p2, innerRadius, outerRadius, type)`
Create a Capsule.
Parameters
----------
* `p1` :
Point of first end of cylinder
* `p2` :
Point of second end of cylinder
* `innerRadius` :
Inner radius of the capsule shell
* `outerRadius` :
Outer radius of the capsule shell
* `type` :
Type of the sites in the capsule shell
"""
_lm.CapsuleShell_swiginit(self, _lm.new_CapsuleShell(p1, p2, innerRadius, outerRadius, type))
__swig_destroy__ = _lm.delete_CapsuleShell
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.CapsuleShell_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.CapsuleShell_contains(self, query)
[docs]
def getP1(self):
r"""
`getP1() -> point`
Get point of first end of cylinder.
"""
return _lm.CapsuleShell_getP1(self)
[docs]
def getP2(self):
r"""
`getP2() -> point`
Get point of second end of cylinder.
"""
return _lm.CapsuleShell_getP2(self)
[docs]
def getInnerRadius(self):
r"""
`getInnerRadius() -> si_dist_t`
Get the inner radius of the cylinder.
"""
return _lm.CapsuleShell_getInnerRadius(self)
[docs]
def getOuterRadius(self):
r"""
`getOuterRadius() -> si_dist_t`
Get the outer radius of the cylinder.
"""
return _lm.CapsuleShell_getOuterRadius(self)
# Register CapsuleShell in _lm:
_lm.CapsuleShell_swigregister(CapsuleShell)
[docs]
class Cuboid(Shape):
r"""
A cube-like Shape.
C++ includes: Cuboid.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`Cuboid(center, w, h, d, type, at=vector(1.0, 0.0, 0.0), up=vector(0.0, 1.0, 0.0))`
Create a Cuboid based on two orientations, and a width, height, depth.
center The definition of the center of the cuboid
Parameters
----------
* `w` :
Width (along x axis when unrotated)
* `h` :
Height (along y axis when unrotated)
* `d` :
Depth (along z axis when unrotated)
* `at` :
A vector representing where the cuboid is pointing (default along x axis)
* `at` :
A vector representing where the cuboid up is (default along y axis)
"""
_lm.Cuboid_swiginit(self, _lm.new_Cuboid(*args))
__swig_destroy__ = _lm.delete_Cuboid
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Cuboid_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Cuboid_contains(self, query)
[docs]
def getP1(self):
r"""
`getP1() -> point`
Get the lower point.
"""
return _lm.Cuboid_getP1(self)
[docs]
def getP2(self):
r"""
`getP2() -> point`
Get the upper point.
"""
return _lm.Cuboid_getP2(self)
# Register Cuboid in _lm:
_lm.Cuboid_swigregister(Cuboid)
[docs]
class Union(Shape):
r"""
A Shape that represents a Union between two shapes.
C++ includes: Union.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, s1, s2, type):
r"""
`Union(s1, s2, type)`
Create a Union.
Parameters
----------
* `s1` :
The first shape to Union
* `s2` :
The second shape to Union
* `type` :
The type of the sites within the union
"""
_lm.Union_swiginit(self, _lm.new_Union(s1, s2, type))
__swig_destroy__ = _lm.delete_Union
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Union_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Union_contains(self, query)
# Register Union in _lm:
_lm.Union_swigregister(Union)
[docs]
class UnionSet(Shape):
r"""
A Shape that represents a Union of many shapes.
C++ includes: UnionSet.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, type):
r"""
`UnionSet(type)`
Create a UnionSet.
Parameters
----------
* `type` :
The type of the sites within the union
"""
_lm.UnionSet_swiginit(self, _lm.new_UnionSet(type))
__swig_destroy__ = _lm.delete_UnionSet
[docs]
def addShape(self, s):
r"""
`addShape(s)`
Add a shape to the union.
Parameters
----------
* `shape` :
A Shape object
"""
return _lm.UnionSet_addShape(self, s)
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.UnionSet_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.UnionSet_contains(self, query)
# Register UnionSet in _lm:
_lm.UnionSet_swigregister(UnionSet)
[docs]
class Difference(Shape):
r"""
A Shape that represents a Difference between the first and second object.
C++ includes: Difference.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, s1, s2, type, symmetric=False):
r"""
`Difference(s1, s2, type, symmetric=false)`
Create a Difference.
Parameters
----------
* `s1` :
The first shape to Difference
* `s2` :
The second shape to Difference
* `type` :
The type of the sites within the difference
* `symmetric` :
Determine if the difference is symmetric. If false, difference is the 1st shape minus the second shape
"""
_lm.Difference_swiginit(self, _lm.new_Difference(s1, s2, type, symmetric))
__swig_destroy__ = _lm.delete_Difference
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Difference_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Difference_contains(self, query)
# Register Difference in _lm:
_lm.Difference_swigregister(Difference)
[docs]
class Intersection(Shape):
r"""
A Shape that represents a Intersection of two shapes.
C++ includes: Intersection.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, s1, s2, type):
r"""
`Intersection(s1, s2, type)`
Create a Intersection.
Parameters
----------
* `s1` :
The first shape to Intersection
* `s2` :
The second shape to Intersection
* `type` :
The type of the sites within the intersection
"""
_lm.Intersection_swiginit(self, _lm.new_Intersection(s1, s2, type))
__swig_destroy__ = _lm.delete_Intersection
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Intersection_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Intersection_contains(self, query)
# Register Intersection in _lm:
_lm.Intersection_swigregister(Intersection)
[docs]
class Torus(Shape):
r"""
A Shape that represents a Torus.
C++ includes: Torus.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`Torus(center, r1, r2, type, orientation=vector(0.0, 0.0, 1.0), up=vector(0.0, 1.0, 0.0))`
Create a Torus.
Parameters
----------
* `center` :
Point center of the circle of the slice plane through the sphere
* `r1` :
Large radius of the Torus
* `r2` :
Small radius of the Torus
* `type` :
The type of the sites within the sphere
* `orientation` :
The direction vector around which the ring is made, default: (0,0,1)
* `up` :
A vector to define the y axis of the object's coordinate system , default: (0,1,0)
"""
_lm.Torus_swiginit(self, _lm.new_Torus(*args))
__swig_destroy__ = _lm.delete_Torus
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Torus_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Torus_contains(self, query)
[docs]
def setCenter(self, center):
r"""
`setCenter(center)`
Set the center of the sphere.
Parameters
----------
* `center` :
Point of the center
"""
return _lm.Torus_setCenter(self, center)
[docs]
def getCenter(self):
r"""
`getCenter() -> point`
Get the center of the sphere.
"""
return _lm.Torus_getCenter(self)
[docs]
def getRadius1(self):
r"""
`getRadius1() -> si_dist_t`
Get the large radius of the sphere.
"""
return _lm.Torus_getRadius1(self)
[docs]
def getRadius2(self):
r"""
`getRadius2() -> si_dist_t`
Get the small radius of the sphere.
"""
return _lm.Torus_getRadius2(self)
# Register Torus in _lm:
_lm.Torus_swigregister(Torus)
[docs]
class Ellipse(Shape):
r"""
C++ includes: Ellipse.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`Ellipse(center, r1, r2, r3, type, orientation1=vector(0.0, 0.0, 1.0), orientation2=vector(0.0, 1.0, 0.0))`
Create a Ellipse.
Parameters
----------
* `center` :
Point center of the circle of the slice plane through the sphere
* `r1` :
First axis radius of the Ellipse
* `r2` :
Second axis radius of the Ellipse
* `r3` :
Third axis radius of the Ellipse
* `type` :
The type of the sites within the sphere
* `orientation1` :
The direction along which to lay the first axis, default: along the z-axis
* `orientation2` :
The direction along which to lay the second axis, default: along the y-axis
"""
_lm.Ellipse_swiginit(self, _lm.new_Ellipse(*args))
__swig_destroy__ = _lm.delete_Ellipse
[docs]
def intersects(self, query):
r"""
`intersects(query) -> bool`
Check if two shapes intersect.
Parameters
----------
* `query` :
The other shape to check
Returns
-------
true/false
"""
return _lm.Ellipse_intersects(self, query)
[docs]
def contains(self, query):
r"""
`contains(query) -> bool`
Determine if the shape contains the specified shape.
Parameters
----------
* `query` :
Shape to test
Returns
-------
true/false
"""
return _lm.Ellipse_contains(self, query)
[docs]
def setCenter(self, center):
r"""
`setCenter(center)`
Set the center of the sphere.
Parameters
----------
* `center` :
Point of the center
"""
return _lm.Ellipse_setCenter(self, center)
[docs]
def getCenter(self):
r"""
`getCenter() -> point`
Get the center of the sphere.
"""
return _lm.Ellipse_getCenter(self)
[docs]
def getRadius1(self):
r"""
`getRadius1() -> si_dist_t`
Get the first radius of the sphere.
"""
return _lm.Ellipse_getRadius1(self)
[docs]
def getRadius2(self):
r"""
`getRadius2() -> si_dist_t`
Get the second radius of the sphere.
"""
return _lm.Ellipse_getRadius2(self)
[docs]
def getRadius3(self):
r"""
`getRadius3() -> si_dist_t`
Get the third radius of the sphere.
"""
return _lm.Ellipse_getRadius3(self)
# Register Ellipse in _lm:
_lm.Ellipse_swigregister(Ellipse)
[docs]
class LatticeBuilder(object):
r"""
A class that defines regions of a lattice based on a set of geometries defined by shapes. It also allows packing different types of particles into different regions.
C++ includes: LatticeBuilder.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, xLen, yLen, zLen, collisionGridSpacing, seedTop, seedBottom):
r"""
`LatticeBuilder(xLen, yLen, zLen, collisionGridSpacing, seedTop, seedBottom=0)`
Create a Lattice Builder.
Parameters
----------
* `xLen` :
Length of the domain along x-axis
* `yLen` :
Length of the domain along y-axis
* `zLen` :
Length of the domain along z-axis
* `collisionGridSpacing` :
The spacing for collision objects
* `seedTop` :
High 32 bits of the seed (allows a constant seed for debugging)
* `seedBottom` :
Low 32 bits of the seed
"""
_lm.LatticeBuilder_swiginit(self, _lm.new_LatticeBuilder(xLen, yLen, zLen, collisionGridSpacing, seedTop, seedBottom))
__swig_destroy__ = _lm.delete_LatticeBuilder
[docs]
def addRegion(self, shape):
r"""
`addRegion(shape)`
Add a region to the lattice.
Parameters
----------
* `shape` :
A Shape object to add as a region
"""
return _lm.LatticeBuilder_addRegion(self, shape)
[docs]
def placeSphere(self, position, radius, type):
r"""
`placeSphere(center, radius, type) -> bool`
Place a sphere in the lattice (for obstacles)
Parameters
----------
* `center` :
The center point of sphere obstacle
* `radius` :
Radius of the sphere obstacle
* `type` :
The type of site in which to place sphere
Returns
-------
true if the sphere did not intersect
"""
return _lm.LatticeBuilder_placeSphere(self, position, radius, type)
[docs]
def removeSphere(self, position, radius, type):
r"""
`removeSphere(center, radius, type)`
Remove a sphere in the lattice (for obstacles)
Parameters
----------
* `center` :
The center point of sphere obstacle
* `radius` :
Radius of the sphere obstacle
* `type` :
The type of site in which to place sphere
"""
return _lm.LatticeBuilder_removeSphere(self, position, radius, type)
[docs]
def placeRandomSphere(self, radius, type, region):
r"""
`placeRandomSphere(radius, type, region) -> uint`
Place a sphere randomly in the lattice (for obstacles)
Parameters
----------
* `radius` :
Radius of the sphere obstacle
* `type` :
The type of site in which to place sphere
* `region` :
The region in which to place obstacle randomly
Returns
-------
number of times a placement operation occured
"""
return _lm.LatticeBuilder_placeRandomSphere(self, radius, type, region)
[docs]
def placeRandomSpheres(self, count, radius, type, region):
r"""
`placeRandomSpheres(count, radius, type, region)`
Place many spheres randomly in the lattice (for obstacles)
Parameters
----------
* `radius` :
Radius of the sphere obstacle
* `type` :
The type of site in which to place sphere
* `region` :
The region in which to place obstacle randomly
Returns
-------
number of times a placement operation occured
"""
return _lm.LatticeBuilder_placeRandomSpheres(self, count, radius, type, region)
[docs]
def fillWithRandomSpheres(self, volumeFraction, radius, type, region):
r"""
`fillWithRandomSpheres(volumeFraction, radius, type, region)`
Fill a region with random spheres to a specified volume fraction.
Parameters
----------
* `volumeFraction` :
Total fraction of volume that should be filled with spheres
* `radius` :
Radius of spheres
* `type` :
The type of site to fill (i.e. the type of site to exclude other objects from)
* `region` :
The region of the lattice to place spheres into
"""
return _lm.LatticeBuilder_fillWithRandomSpheres(self, volumeFraction, radius, type, region)
[docs]
def getSpatialModel(self, model):
r"""
`getSpatialModel(spatialModel)`
Gets a spatial model of the lattice for interface with python. NOTE: this operation clears the object passed in from python.
Parameters
----------
* `spatialModel` :
An object of a spatial model for interaction in python or HDF5. The model will be filled with the current lattice
"""
return _lm.LatticeBuilder_getSpatialModel(self, model)
[docs]
def addParticles(self, particleType, siteType, count):
r"""
`addParticles(particleType, siteType, count)`
Add particles of a given type.
Parameters
----------
* `particleType` :
The type of particles to randomly place in the lattice
* `siteType` :
Type of lattice site into which to place
* `count` :
Number of particles to place
"""
return _lm.LatticeBuilder_addParticles(self, particleType, siteType, count)
[docs]
def discretizeTo(self, lattice, obstacleSiteType, fractionObstacleSitesOccupied):
r"""
`discretizeTo(lattice, obstacleSiteType, fractionObstacleSitesOccupied)`
Discretizes the regions to a square lattice.
Parameters
----------
* `lattice` :
Lattice object into which to place
* `obstacleSiteType` :
An identifier for obstacle sites in the lattice
* `fractionObstacleSitesOccupied` :
Percentage of obstacle sites to be filled
"""
return _lm.LatticeBuilder_discretizeTo(self, lattice, obstacleSiteType, fractionObstacleSitesOccupied)
# Register LatticeBuilder in _lm:
_lm.LatticeBuilder_swigregister(LatticeBuilder)
[docs]
class DiffusionModel(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
_lm.DiffusionModel_swiginit(self, _lm.new_DiffusionModel())
[docs]
def number_species(self):
return _lm.DiffusionModel_number_species(self)
[docs]
def number_site_types(self):
return _lm.DiffusionModel_number_site_types(self)
[docs]
def lattice_spacing(self):
return _lm.DiffusionModel_lattice_spacing(self)
[docs]
def lattice_x_size(self):
return _lm.DiffusionModel_lattice_x_size(self)
[docs]
def lattice_y_size(self):
return _lm.DiffusionModel_lattice_y_size(self)
[docs]
def lattice_z_size(self):
return _lm.DiffusionModel_lattice_z_size(self)
[docs]
def particles_per_site(self):
return _lm.DiffusionModel_particles_per_site(self)
[docs]
def bytes_per_particle(self):
return _lm.DiffusionModel_bytes_per_particle(self)
[docs]
def set_lattice_spacing(self, arg2):
return _lm.DiffusionModel_set_lattice_spacing(self, arg2)
[docs]
def set_lattice_x_size(self, arg2):
return _lm.DiffusionModel_set_lattice_x_size(self, arg2)
[docs]
def set_lattice_y_size(self, arg2):
return _lm.DiffusionModel_set_lattice_y_size(self, arg2)
[docs]
def set_lattice_z_size(self, arg2):
return _lm.DiffusionModel_set_lattice_z_size(self, arg2)
[docs]
def set_particles_per_site(self, arg2):
return _lm.DiffusionModel_set_particles_per_site(self, arg2)
[docs]
def set_number_reactions(self, arg2):
return _lm.DiffusionModel_set_number_reactions(self, arg2)
[docs]
def set_number_species(self, arg2):
return _lm.DiffusionModel_set_number_species(self, arg2)
[docs]
def set_number_site_types(self, arg2):
return _lm.DiffusionModel_set_number_site_types(self, arg2)
[docs]
def set_bytes_per_particle(self, arg2):
return _lm.DiffusionModel_set_bytes_per_particle(self, arg2)
[docs]
def diffusion_matrix(self, arg2):
return _lm.DiffusionModel_diffusion_matrix(self, arg2)
[docs]
def add_diffusion_matrix(self, arg2):
return _lm.DiffusionModel_add_diffusion_matrix(self, arg2)
[docs]
def set_diffusion_matrix(self, arg2, arg3):
return _lm.DiffusionModel_set_diffusion_matrix(self, arg2, arg3)
[docs]
def reaction_location_matrix(self, arg2):
return _lm.DiffusionModel_reaction_location_matrix(self, arg2)
[docs]
def add_reaction_location_matrix(self, arg2):
return _lm.DiffusionModel_add_reaction_location_matrix(self, arg2)
[docs]
def set_reaction_location_matrix(self, arg2, arg3):
return _lm.DiffusionModel_set_reaction_location_matrix(self, arg2, arg3)
__swig_destroy__ = _lm.delete_DiffusionModel
# Register DiffusionModel in _lm:
_lm.DiffusionModel_swigregister(DiffusionModel)
[docs]
class ReactionModel_Reaction(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
_lm.ReactionModel_Reaction_swiginit(self, _lm.new_ReactionModel_Reaction())
[docs]
def type(self):
return _lm.ReactionModel_Reaction_type(self)
[docs]
def set_type(self, arg2):
return _lm.ReactionModel_Reaction_set_type(self, arg2)
[docs]
def rate_constant_size(self):
return _lm.ReactionModel_Reaction_rate_constant_size(self)
[docs]
def add_rate_constant(self, arg2):
return _lm.ReactionModel_Reaction_add_rate_constant(self, arg2)
[docs]
def set_rate_constant(self, arg2, arg3):
return _lm.ReactionModel_Reaction_set_rate_constant(self, arg2, arg3)
__swig_destroy__ = _lm.delete_ReactionModel_Reaction
# Register ReactionModel_Reaction in _lm:
_lm.ReactionModel_Reaction_swigregister(ReactionModel_Reaction)
[docs]
class ReactionModel(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
_lm.ReactionModel_swiginit(self, _lm.new_ReactionModel())
[docs]
def number_species(self):
return _lm.ReactionModel_number_species(self)
[docs]
def set_number_species(self, arg2):
return _lm.ReactionModel_set_number_species(self, arg2)
[docs]
def number_reactions(self):
return _lm.ReactionModel_number_reactions(self)
[docs]
def set_number_reactions(self, arg2):
return _lm.ReactionModel_set_number_reactions(self, arg2)
[docs]
def initial_species_count_size(self):
return _lm.ReactionModel_initial_species_count_size(self)
[docs]
def add_initial_species_count(self, arg2):
return _lm.ReactionModel_add_initial_species_count(self, arg2)
[docs]
def set_initial_species_count(self, arg2, arg3):
return _lm.ReactionModel_set_initial_species_count(self, arg2, arg3)
[docs]
def reaction_size(self):
return _lm.ReactionModel_reaction_size(self)
[docs]
def add_reaction(self):
return _lm.ReactionModel_add_reaction(self)
[docs]
def reaction(self, arg2):
return _lm.ReactionModel_reaction(self, arg2)
[docs]
def mutable_reaction(self, arg2):
return _lm.ReactionModel_mutable_reaction(self, arg2)
[docs]
def add_stoichiometric_matrix(self, arg2):
return _lm.ReactionModel_add_stoichiometric_matrix(self, arg2)
[docs]
def add_dependency_matrix(self, arg2):
return _lm.ReactionModel_add_dependency_matrix(self, arg2)
__swig_destroy__ = _lm.delete_ReactionModel
# Register ReactionModel in _lm:
_lm.ReactionModel_swigregister(ReactionModel)
[docs]
class SpatialModel(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
_lm.SpatialModel_swiginit(self, _lm.new_SpatialModel())
__swig_destroy__ = _lm.delete_SpatialModel
# Register SpatialModel in _lm:
_lm.SpatialModel_swigregister(SpatialModel)
[docs]
class SimulationFile(object):
r"""
A representation of the simulation that is used to input or output from an HDF5 file.
C++ includes: SimulationFile.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
[docs]
@staticmethod
def isValidFile(filename):
r"""
`isValidFile(filename) -> bool`
Check that the HDF5 file is valid.
"""
return _lm.SimulationFile_isValidFile(filename)
[docs]
@staticmethod
def create(filename):
r"""
`create(filename, initializeModel, numberSpecies=0)`
Create an HDF5 file and initialize the model with an optional number of species.
"""
return _lm.SimulationFile_create(filename)
def __init__(self, filename):
r"""
`SimulationFile(filename)`
Create a SimulationFile with the specified filename.
"""
_lm.SimulationFile_swiginit(self, _lm.new_SimulationFile(filename))
__swig_destroy__ = _lm.delete_SimulationFile
[docs]
def close(self):
r"""
`close()`
Close the file.
"""
return _lm.SimulationFile_close(self)
[docs]
def getDiffusionModel(self, model):
r"""
`getDiffusionModel(diffusionModel)`
Pops the diffusion model from the HDF5 file.
Parameters
----------
* `diffusionModel` :
Memory at which to place the diffusionModel
"""
return _lm.SimulationFile_getDiffusionModel(self, model)
[docs]
def setDiffusionModel(self, diffusionModel):
r"""
`setDiffusionModel(diffusionModel)`
Pushes the diffusion model into the HDF5 file.
Parameters
----------
* `diffusionModel` :
Memory from which to place the diffusionModel
"""
return _lm.SimulationFile_setDiffusionModel(self, diffusionModel)
[docs]
def getReactionModel(self, model):
r"""
`getReactionModel(reactionModel)`
Pops the reaction model from the HDF5 file.
Parameters
----------
* `reactionModel` :
Memory at which to place the reactionModel
"""
return _lm.SimulationFile_getReactionModel(self, model)
[docs]
def setReactionModel(self, reactionModel):
r"""
`setReactionModel(reactionModel)`
Pushes the reaction model into the HDF5 file.
Parameters
----------
* `reactionModel` :
Memory from which to place the reactionModel
"""
return _lm.SimulationFile_setReactionModel(self, reactionModel)
[docs]
def getDiffusionModelLattice(self, m, lattice):
r"""
`getDiffusionModelLattice(diffusionModel, lattice)`
Pops the diffusion lattice from the HDF5 file.
Parameters
----------
* `diffusionModel` :
Memoryfrom which to get the lattice
* `lattice` :
Memory at which to place the lattice
"""
return _lm.SimulationFile_getDiffusionModelLattice(self, m, lattice)
[docs]
def setDiffusionModelLattice(self, *args):
r"""
`setDiffusionModelLattice(m, lattice)`
Pushes the diffusion lattice into the HDF5 file.
Parameters
----------
* `diffusionModel` :
Memory from which to get the lattice
* `lattice` :
Memory from which to place the lattice
"""
return _lm.SimulationFile_setDiffusionModelLattice(self, *args)
[docs]
def getSpatialModel(self, model):
r"""
`getSpatialModel(model)`
Pops the spacial model (i.e. obstacles) from the HDF5 file.
Parameters
----------
* `model` :
The model in which to store the object
"""
return _lm.SimulationFile_getSpatialModel(self, model)
[docs]
def setSpatialModel(self, model):
r"""
`setSpatialModel(model)`
Pushes the spacial model (i.e. obstacles) into the HDF5 file.
Parameters
----------
* `model` :
The model object
"""
return _lm.SimulationFile_setSpatialModel(self, model)
[docs]
def getLatticeTimes(self, replicate):
r"""
`getLatticeTimes(replicate) -> vector< double >`
Get the timestep times for the replicate.
Parameters
----------
* `replicate` :
Replicate number
Returns
-------
A set of timestep times
"""
return _lm.SimulationFile_getLatticeTimes(self, replicate)
[docs]
def getLattice(self, replicate, latticeIndex, lattice):
r"""
`getLattice(replicate, latticeIndex, lattice)`
Get the lattice for the replicate.
Parameters
----------
* `replicate` :
Replicate number
* `latticeIndex` :
Seems to be unused...
* `lattice` :
The lattice object in which to store the data
"""
return _lm.SimulationFile_getLattice(self, replicate, latticeIndex, lattice)
[docs]
def getParameter(self, key):
r"""
`getParameter(key, defaultValue="") -> string`
Get the specified parameter from the current replicate.
"""
return _lm.SimulationFile_getParameter(self, key)
[docs]
def setParameter(self, k, v):
r"""
`setParameter(key, value)`
Set the specified parameter to the value.
"""
return _lm.SimulationFile_setParameter(self, k, v)
[docs]
def getSpeciesCountTimes(self, replicate):
r"""
`getSpeciesCountTimes(replicate) -> vector< double >`
"""
return _lm.SimulationFile_getSpeciesCountTimes(self, replicate)
[docs]
def getSpeciesCounts(self, replicate):
r"""
`getSpeciesCounts(replicate) -> std::map< double, vector< int > >`
"""
return _lm.SimulationFile_getSpeciesCounts(self, replicate)
[docs]
def getSpeciesNames(self):
r"""
`getSpeciesNames() -> std::map< uint, string >`
"""
return _lm.SimulationFile_getSpeciesNames(self)
# Register SimulationFile in _lm:
_lm.SimulationFile_swigregister(SimulationFile)
[docs]
def SimulationFile_isValidFile(filename):
r"""
`isValidFile(filename) -> bool`
Check that the HDF5 file is valid.
"""
return _lm.SimulationFile_isValidFile(filename)
[docs]
def SimulationFile_create(filename):
r"""
`create(filename, initializeModel, numberSpecies=0)`
Create an HDF5 file and initialize the model with an optional number of species.
"""
return _lm.SimulationFile_create(filename)
[docs]
class CMESolver(MESolver):
r"""
C++ includes: CMESolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _lm.delete_CMESolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.CMESolver_initialize(self, replicate, parameters, resources)
[docs]
def getSpeciesCountView(self):
r"""
`getSpeciesCountView(counts, number)`
"""
return _lm.CMESolver_getSpeciesCountView(self)
[docs]
def getReactionRateConstantsView(self, reactionNumber):
r"""
`getReactionRateConstantsView(reactionNumber, rates, rateConstantCount)`
"""
return _lm.CMESolver_getReactionRateConstantsView(self, reactionNumber)
# Register CMESolver in _lm:
_lm.CMESolver_swigregister(CMESolver)
[docs]
class GillespieDSolver(CMESolver):
r"""
C++ includes: GillespieDSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
r"""
`GillespieDSolver()`
"""
if self.__class__ == GillespieDSolver:
_self = None
else:
_self = self
_lm.GillespieDSolver_swiginit(self, _lm.new_GillespieDSolver(_self, ))
__swig_destroy__ = _lm.delete_GillespieDSolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.GillespieDSolver_initialize(self, replicate, parameters, resources)
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.GillespieDSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.GillespieDSolver_needsDiffusionModel(self)
[docs]
def getSpeciesCountView(self):
r"""
`getSpeciesCountView(counts, number)`
"""
return _lm.GillespieDSolver_getSpeciesCountView(self)
[docs]
def getReactionRateConstantsView(self, reactionNumber):
r"""
`getReactionRateConstantsView(reactionNumber, rates, rateConstantCount)`
"""
return _lm.GillespieDSolver_getReactionRateConstantsView(self, reactionNumber)
[docs]
def hookSimulation(self, time):
return _lm.GillespieDSolver_hookSimulation(self, time)
[docs]
def onBeginTrajectory(self):
return _lm.GillespieDSolver_onBeginTrajectory(self)
[docs]
def onEndTrajectory(self):
return _lm.GillespieDSolver_onEndTrajectory(self)
def __disown__(self):
self.this.disown()
_lm.disown_GillespieDSolver(self)
return weakref.proxy(self)
# Register GillespieDSolver in _lm:
_lm.GillespieDSolver_swigregister(GillespieDSolver)
[docs]
class NextReactionSolver(CMESolver):
r"""
C++ includes: NextReactionSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`NextReactionSolver(neededDists)`
"""
if self.__class__ == NextReactionSolver:
_self = None
else:
_self = self
_lm.NextReactionSolver_swiginit(self, _lm.new_NextReactionSolver(_self, *args))
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.NextReactionSolver_initialize(self, replicate, parameters, resources)
__swig_destroy__ = _lm.delete_NextReactionSolver
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.NextReactionSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.NextReactionSolver_needsDiffusionModel(self)
[docs]
def getSpeciesCountView(self):
r"""
`getSpeciesCountView(counts, number)`
"""
return _lm.NextReactionSolver_getSpeciesCountView(self)
[docs]
def getReactionRateConstantsView(self, reactionNumber):
r"""
`getReactionRateConstantsView(reactionNumber, rates, rateConstantCount)`
"""
return _lm.NextReactionSolver_getReactionRateConstantsView(self, reactionNumber)
[docs]
def hookSimulation(self, time):
return _lm.NextReactionSolver_hookSimulation(self, time)
def __disown__(self):
self.this.disown()
_lm.disown_NextReactionSolver(self)
return weakref.proxy(self)
[docs]
def onBeginTrajectory(self):
return _lm.NextReactionSolver_onBeginTrajectory(self)
[docs]
def onEndTrajectory(self):
return _lm.NextReactionSolver_onEndTrajectory(self)
# Register NextReactionSolver in _lm:
_lm.NextReactionSolver_swigregister(NextReactionSolver)
[docs]
def getCompiledLatticeMaxOccupancy():
return _lm.getCompiledLatticeMaxOccupancy()
[docs]
class Lattice(object):
r"""
Base class for lattice type objects.
C++ includes: Lattice.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
[docs]
def getMaxOccupancy(self):
r"""
`getMaxOccupancy() -> site_size_t`
Get the maximum number of particles that can live in a site.
"""
return _lm.Lattice_getMaxOccupancy(self)
[docs]
def getSize(self):
r"""
`getSize() -> lattice_coord_t`
Get size of the Lattice.
"""
return _lm.Lattice_getSize(self)
[docs]
def getXSize(self):
r"""
`getXSize() -> lattice_size_t`
Get x dimension of the Lattice.
"""
return _lm.Lattice_getXSize(self)
[docs]
def getYSize(self):
r"""
`getYSize() -> lattice_size_t`
Get y dimension of the Lattice.
"""
return _lm.Lattice_getYSize(self)
[docs]
def getZSize(self):
r"""
`getZSize() -> lattice_size_t`
Get z dimension of the Lattice.
"""
return _lm.Lattice_getZSize(self)
[docs]
def getNumberSites(self):
r"""
`getNumberSites() -> lattice_size_t`
Get total number of sites in the Lattice.
"""
return _lm.Lattice_getNumberSites(self)
[docs]
def getSpacing(self):
r"""
`getSpacing() -> si_dist_t`
Get spacing between lattice sites.
"""
return _lm.Lattice_getSpacing(self)
[docs]
def getSiteType(self, x, y, z):
r"""
`getSiteType(index) -> site_t`
Get the site type at the specified location.
"""
return _lm.Lattice_getSiteType(self, x, y, z)
[docs]
def setSiteType(self, x, y, z, siteType):
r"""
`setSiteType(index, site)`
Set the site type at the specified location.
"""
return _lm.Lattice_setSiteType(self, x, y, z, siteType)
[docs]
def getOccupancy(self, x, y, z):
r"""
`getOccupancy(index) -> site_size_t`
Get the number of particles in the specified lattice site.
"""
return _lm.Lattice_getOccupancy(self, x, y, z)
[docs]
def getParticle(self, x, y, z, particleIndex):
r"""
`getParticle(index, particleIndex) -> particle_t`
Get the particle at the specified site with at the specified number in the particle list.
"""
return _lm.Lattice_getParticle(self, x, y, z, particleIndex)
[docs]
def findParticles(self, minParticleType, maxParticleType):
r"""
`findParticles(minParticleType, maxParticleType) -> std::vector< particle_loc_t >`
Get the number of the specified particles types in the lattice.
"""
return _lm.Lattice_findParticles(self, minParticleType, maxParticleType)
[docs]
def addParticle(self, x, y, z, particle):
r"""
`addParticle(index, particle)`
Add a particle to the specified site.
"""
return _lm.Lattice_addParticle(self, x, y, z, particle)
[docs]
def removeParticles(self, x, y, z):
r"""
`removeParticles(index)`
Remove a particle to the specified site.
"""
return _lm.Lattice_removeParticles(self, x, y, z)
[docs]
def getParticleCounts(self):
r"""
`getParticleCounts() -> std::map< particle_t, uint >`
Get the number of each particle type in the lattice.
Particle searching methods.
"""
return _lm.Lattice_getParticleCounts(self)
__swig_destroy__ = _lm.delete_Lattice
# Register Lattice in _lm:
_lm.Lattice_swigregister(Lattice)
[docs]
class ByteLattice(Lattice):
r"""
A Lattice that is based on packed bytes of memory, i.e. one byte per lattice site to hold particles.
C++ includes: ByteLattice.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`ByteLattice(xSize, ySize, zSize, spacing, particlesPerSite)`
"""
_lm.ByteLattice_swiginit(self, _lm.new_ByteLattice(*args))
__swig_destroy__ = _lm.delete_ByteLattice
[docs]
def getSiteType(self, x, y, z):
r"""
`getSiteType(index) -> site_t`
Get the site type at the specified location.
"""
return _lm.ByteLattice_getSiteType(self, x, y, z)
[docs]
def setSiteType(self, x, y, z, siteType):
r"""
`setSiteType(index, site)`
Set the site type at the specified location.
"""
return _lm.ByteLattice_setSiteType(self, x, y, z, siteType)
[docs]
def getOccupancy(self, x, y, z):
r"""
`getOccupancy(index) -> site_size_t`
Get the number of particles in the specified lattice site.
"""
return _lm.ByteLattice_getOccupancy(self, x, y, z)
[docs]
def getParticle(self, x, y, z, particleIndex):
r"""
`getParticle(index, particleIndex) -> particle_t`
Get the particle at the specified site with at the specified number in the particle list.
"""
return _lm.ByteLattice_getParticle(self, x, y, z, particleIndex)
[docs]
def findParticles(self, minParticleType, maxParticleType):
r"""
`findParticles(minParticleType, maxParticleType) -> std::vector< particle_loc_t >`
Get the number of the specified particles types in the lattice.
"""
return _lm.ByteLattice_findParticles(self, minParticleType, maxParticleType)
[docs]
def addParticle(self, x, y, z, particle):
r"""
`addParticle(index, particle)`
Add a particle to the specified site.
"""
return _lm.ByteLattice_addParticle(self, x, y, z, particle)
[docs]
def removeParticles(self, x, y, z):
r"""
`removeParticles(index)`
Remove a particle to the specified site.
"""
return _lm.ByteLattice_removeParticles(self, x, y, z)
[docs]
def getParticleCounts(self):
r"""
`getParticleCounts() -> std::map< particle_t, uint >`
Get the number of each particle type in the lattice.
Particle searching methods.
"""
return _lm.ByteLattice_getParticleCounts(self)
[docs]
def getSiteLatticeView(self):
r"""
`getSiteLatticeView(siteLattice, Nz, Ny, Nx)`
"""
return _lm.ByteLattice_getSiteLatticeView(self)
[docs]
def getParticleLatticeView(self):
r"""
`getParticleLatticeView(particleLattice, Nw, Nz, Ny, Nx, Np)`
"""
return _lm.ByteLattice_getParticleLatticeView(self)
# Register ByteLattice in _lm:
_lm.ByteLattice_swigregister(ByteLattice)
[docs]
class IntLattice(Lattice):
r"""
A Lattice that is based on one particle per word, with sites strided per particle.
C++ includes: IntLattice.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`IntLattice(xSize, ySize, zSize, spacing, particlesPerSite)`
"""
_lm.IntLattice_swiginit(self, _lm.new_IntLattice(*args))
__swig_destroy__ = _lm.delete_IntLattice
[docs]
def getSiteType(self, x, y, z):
r"""
`getSiteType(index) -> site_t`
Get the site type at the specified location.
"""
return _lm.IntLattice_getSiteType(self, x, y, z)
[docs]
def setSiteType(self, x, y, z, siteType):
r"""
`setSiteType(index, site)`
Set the site type at the specified location.
"""
return _lm.IntLattice_setSiteType(self, x, y, z, siteType)
[docs]
def getOccupancy(self, x, y, z):
r"""
`getOccupancy(index) -> site_size_t`
Get the number of particles in the specified lattice site.
"""
return _lm.IntLattice_getOccupancy(self, x, y, z)
[docs]
def getParticle(self, x, y, z, particleIndex):
r"""
`getParticle(index, particleIndex) -> particle_t`
Get the particle at the specified site with at the specified number in the particle list.
"""
return _lm.IntLattice_getParticle(self, x, y, z, particleIndex)
[docs]
def findParticles(self, minParticleType, maxParticleType):
r"""
`findParticles(minParticleType, maxParticleType) -> std::vector< particle_loc_t >`
Get the number of the specified particles types in the lattice.
"""
return _lm.IntLattice_findParticles(self, minParticleType, maxParticleType)
[docs]
def addParticle(self, x, y, z, particle):
r"""
`addParticle(index, particle)`
Add a particle to the specified site.
"""
return _lm.IntLattice_addParticle(self, x, y, z, particle)
[docs]
def removeParticles(self, x, y, z):
r"""
`removeParticles(index)`
Remove a particle to the specified site.
"""
return _lm.IntLattice_removeParticles(self, x, y, z)
[docs]
def getParticleCounts(self):
r"""
`getParticleCounts() -> std::map< particle_t, uint >`
Get the number of each particle type in the lattice.
Particle searching methods.
"""
return _lm.IntLattice_getParticleCounts(self)
[docs]
def getSiteLatticeView(self):
r"""
`getSiteLatticeView(siteLattice, Nz, Ny, Nx)`
"""
return _lm.IntLattice_getSiteLatticeView(self)
[docs]
def getParticleLatticeView(self):
r"""
`getParticleLatticeView(particleLattice, Nw, Nz, Ny, Nx, Np)`
"""
return _lm.IntLattice_getParticleLatticeView(self)
# Register IntLattice in _lm:
_lm.IntLattice_swigregister(IntLattice)
[docs]
class CudaByteLattice(ByteLattice):
r"""
C++ includes: CudaByteLattice.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`CudaByteLattice(xSize, ySize, zSize, spacing, particlesPerSite)`
"""
_lm.CudaByteLattice_swiginit(self, _lm.new_CudaByteLattice(*args))
__swig_destroy__ = _lm.delete_CudaByteLattice
[docs]
def getParticleCounts(self):
r"""
`getParticleCounts() -> std::map< particle_t, uint >`
Get the number of each particle type in the lattice.
Particle searching methods.
"""
return _lm.CudaByteLattice_getParticleCounts(self)
[docs]
def getGPUMemorySrc(self):
r"""
`getGPUMemorySrc() -> void *`
"""
return _lm.CudaByteLattice_getGPUMemorySrc(self)
[docs]
def getGPUMemoryDest(self):
r"""
`getGPUMemoryDest() -> void *`
"""
return _lm.CudaByteLattice_getGPUMemoryDest(self)
[docs]
def swapSrcDest(self):
r"""
`swapSrcDest()`
"""
return _lm.CudaByteLattice_swapSrcDest(self)
[docs]
def getGPUMemorySiteTypes(self):
r"""
`getGPUMemorySiteTypes() -> void *`
"""
return _lm.CudaByteLattice_getGPUMemorySiteTypes(self)
# Register CudaByteLattice in _lm:
_lm.CudaByteLattice_swigregister(CudaByteLattice)
[docs]
class CudaIntLattice(IntLattice):
r"""
C++ includes: CudaIntLattice.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
r"""
`CudaIntLattice(xSize, ySize, zSize, spacing, particlesPerSite)`
"""
_lm.CudaIntLattice_swiginit(self, _lm.new_CudaIntLattice(*args))
__swig_destroy__ = _lm.delete_CudaIntLattice
[docs]
def getGPUMemorySrc(self):
r"""
`getGPUMemorySrc() -> void *`
"""
return _lm.CudaIntLattice_getGPUMemorySrc(self)
[docs]
def getGPUMemoryDest(self):
r"""
`getGPUMemoryDest() -> void *`
"""
return _lm.CudaIntLattice_getGPUMemoryDest(self)
[docs]
def swapSrcDest(self):
r"""
`swapSrcDest()`
"""
return _lm.CudaIntLattice_swapSrcDest(self)
[docs]
def getGPUMemorySiteTypes(self):
r"""
`getGPUMemorySiteTypes() -> void *`
"""
return _lm.CudaIntLattice_getGPUMemorySiteTypes(self)
# Register CudaIntLattice in _lm:
_lm.CudaIntLattice_swigregister(CudaIntLattice)
[docs]
class MpdRdmeSolver(MESolver):
r"""
C++ includes: MpdRdmeSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
r"""
`MpdRdmeSolver()`
"""
if self.__class__ == MpdRdmeSolver:
_self = None
else:
_self = self
_lm.MpdRdmeSolver_swiginit(self, _lm.new_MpdRdmeSolver(_self, ))
__swig_destroy__ = _lm.delete_MpdRdmeSolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.MpdRdmeSolver_initialize(self, replicate, parameters, resources)
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MpdRdmeSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MpdRdmeSolver_needsDiffusionModel(self)
[docs]
def setReactionRate(self, rxid, rate):
r"""
`setReactionRate(rxid, rate)`
"""
return _lm.MpdRdmeSolver_setReactionRate(self, rxid, rate)
[docs]
def hookSimulation(self, time, lattice):
return _lm.MpdRdmeSolver_hookSimulation(self, time, lattice)
[docs]
def onWriteLattice(self, time, lattice):
return _lm.MpdRdmeSolver_onWriteLattice(self, time, lattice)
[docs]
def onBeginTrajectory(self, lattice):
return _lm.MpdRdmeSolver_onBeginTrajectory(self, lattice)
[docs]
def onEndTrajectory(self, lattice):
return _lm.MpdRdmeSolver_onEndTrajectory(self, lattice)
[docs]
def writeLatticeSites(self, time, lattice):
return _lm.MpdRdmeSolver_writeLatticeSites(self, time, lattice)
def __disown__(self):
self.this.disown()
_lm.disown_MpdRdmeSolver(self)
return weakref.proxy(self)
# Register MpdRdmeSolver in _lm:
_lm.MpdRdmeSolver_swigregister(MpdRdmeSolver)
[docs]
class MGPUMpdRdmeSolver(MESolver):
r"""
C++ includes: MGPUMpdRdmeSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
r"""
`MGPUMpdRdmeSolver()`
"""
if self.__class__ == MGPUMpdRdmeSolver:
_self = None
else:
_self = self
_lm.MGPUMpdRdmeSolver_swiginit(self, _lm.new_MGPUMpdRdmeSolver(_self, ))
__swig_destroy__ = _lm.delete_MGPUMpdRdmeSolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.MGPUMpdRdmeSolver_initialize(self, replicate, parameters, resources)
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MGPUMpdRdmeSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MGPUMpdRdmeSolver_needsDiffusionModel(self)
[docs]
def setReactionRate(self, rxid, rate):
r"""
`setReactionRate(rxid, rate)`
"""
return _lm.MGPUMpdRdmeSolver_setReactionRate(self, rxid, rate)
[docs]
def hookSimulation(self, time, lattice):
return _lm.MGPUMpdRdmeSolver_hookSimulation(self, time, lattice)
def __disown__(self):
self.this.disown()
_lm.disown_MGPUMpdRdmeSolver(self)
return weakref.proxy(self)
# Register MGPUMpdRdmeSolver in _lm:
_lm.MGPUMpdRdmeSolver_swigregister(MGPUMpdRdmeSolver)
[docs]
class MGPUIntMpdRdmeSolver(MESolver):
r"""
C++ includes: MGPUIntMpdRdmeSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
r"""
`MGPUIntMpdRdmeSolver()`
"""
if self.__class__ == MGPUIntMpdRdmeSolver:
_self = None
else:
_self = self
_lm.MGPUIntMpdRdmeSolver_swiginit(self, _lm.new_MGPUIntMpdRdmeSolver(_self, ))
__swig_destroy__ = _lm.delete_MGPUIntMpdRdmeSolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.MGPUIntMpdRdmeSolver_initialize(self, replicate, parameters, resources)
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MGPUIntMpdRdmeSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.MGPUIntMpdRdmeSolver_needsDiffusionModel(self)
[docs]
def setReactionRate(self, rxid, rate):
r"""
`setReactionRate(rxid, rate)`
"""
return _lm.MGPUIntMpdRdmeSolver_setReactionRate(self, rxid, rate)
[docs]
def hookSimulation(self, time, lattice):
return _lm.MGPUIntMpdRdmeSolver_hookSimulation(self, time, lattice)
def __disown__(self):
self.this.disown()
_lm.disown_MGPUIntMpdRdmeSolver(self)
return weakref.proxy(self)
# Register MGPUIntMpdRdmeSolver in _lm:
_lm.MGPUIntMpdRdmeSolver_swigregister(MGPUIntMpdRdmeSolver)
[docs]
class IntMpdRdmeSolver(MESolver):
r"""
C++ includes: IntMpdRdmeSolver.h
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self):
r"""
`IntMpdRdmeSolver()`
"""
if self.__class__ == IntMpdRdmeSolver:
_self = None
else:
_self = self
_lm.IntMpdRdmeSolver_swiginit(self, _lm.new_IntMpdRdmeSolver(_self, ))
__swig_destroy__ = _lm.delete_IntMpdRdmeSolver
[docs]
def initialize(self, replicate, parameters, resources):
r"""
`initialize(replicate, parameters, resources)`
Initialize the simulation.
Parameters
----------
* `replicate` :
Replicate number out of total replicates
* `parameters` :
A map of all the parameters for the simulation
* `A` :
list of resources assigned to the simulation
"""
return _lm.IntMpdRdmeSolver_initialize(self, replicate, parameters, resources)
[docs]
def needsReactionModel(self):
r"""
`needsReactionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.IntMpdRdmeSolver_needsReactionModel(self)
[docs]
def needsDiffusionModel(self):
r"""
`needsDiffusionModel() -> bool`
Tells whether the solver needs a reaction model.
"""
return _lm.IntMpdRdmeSolver_needsDiffusionModel(self)
[docs]
def setReactionRate(self, rxid, rate):
r"""
`setReactionRate(rxid, rate)`
"""
return _lm.IntMpdRdmeSolver_setReactionRate(self, rxid, rate)
[docs]
def hookSimulation(self, time, lattice):
return _lm.IntMpdRdmeSolver_hookSimulation(self, time, lattice)
def __disown__(self):
self.this.disown()
_lm.disown_IntMpdRdmeSolver(self)
return weakref.proxy(self)
# Register IntMpdRdmeSolver in _lm:
_lm.IntMpdRdmeSolver_swigregister(IntMpdRdmeSolver)
[docs]
def runSimulation(simulationFilename, replicate, solverClass, cudaDevices, checkpointInterval):
r"""
`runSimulation(simulationFilename, replicate, solverClass, cudaDevices, checkpointInterval)`
"""
return _lm.runSimulation(simulationFilename, replicate, solverClass, cudaDevices, checkpointInterval)
[docs]
def runSolver(simulationFilename, replicate, solver, cudaDevices, checkpointInterval):
r"""
`runSolver(simulationFilename, replicate, solver, cudaDevices, checkpointInterval)`
"""
return _lm.runSolver(simulationFilename, replicate, solver, cudaDevices, checkpointInterval)