Model specification
暂无分享,去创建一个
Incorporating the on-lattice model into existing Smoldyn simulations can be done with only small changes to the configuration file, allowing users to effectively re-use existing Smoldyn models. To construct a multiscale simulation, the user first defines a port surface to connect the two models. For example, the configuration file extract shown in Listing 1 creates a rectangle port surface normal to the x-axis at x = 50. This port will allow molecules to cross from the off-lattice region to the lattice region, and vice versa. Of course, it is also possible to setup purely off-lattice or on-lattice simulation, in which case no ports are needed. Listing 1: specify port surface start_surface port_surface action front all port panel rect-0 50 0 0 100 100 end_surface start_port my_port surface port_surface face front end_port Listing 2: setup on-lattice model start_lattice my_lattice type nsv port my_port boundaries 0 47 100 boundaries 1 0 100 p boundaries 2 0 100 p lengthscale 3 3 3 species all reactions all surfaces all end_lattice Listing 2 shows how to create the lattice domain and setup the parameters, including which species, reactions and surfaces to include. These items are assumed to be previously specified using the standard Smoldyn input file format. The listing shown here creates a lattice (periodic in the x and y axis directions) over the domain (47, 0, 0) ≤ (x, y, z) < (100, 100, 100) with an isotropic lattice spacing h = 3. In this case, Smoldyn will attempt to add all the species, reactions and surfaces previously defined to the on-lattice model. All reactions that occur in solution are supported by the on-lattice model. All surface actions that occur across the surface (i.e. reflection, absorption, transmission) are also supported. Surface-bound species that diffuse and react along the surface geometry are only supported by the off-lattice model. 2 Output The user can generate output data using Smoldyn's command system, or see the current state of the simulation in Smoldyn's OpenGL visualisation window. Alternatively, the full state of the molecules can be written out using the standard VTK file format (vtk.org) for later post-processing and visualisation. For example, all the rendered figures in this paper were generated from VTK files using Paraview (www.paraview.org).