set system_spec { geometry n_molslist }
The geometry should be specified as a
list with two elements. The first element should be a
string "geometry" identifying this list as a geometry.
The second element is a string containing the name of a
geometry type mygeometry followed by
arguments to be passed to the routine create_mygeometry.
The n_molslist should be specified as a list with two elements. The first element should be a string "n_molslist" identifying this list as an n_molslist. The second element is a list each element of which specifies a molecule type and the number of such molecules.
set moltypes [list { 0 lipid { 0 1 1 } { 0 1 } } { 1 lipid { 0 2 2 2 } { 0 2 } } ]
We then construct system specs for a flat bilayer and a
spherical bilayer and group these into a system_specs list
First the spherical system_spec
set geometry { geometry "sphere -shuffle -c \{ 0.0 0.0 15.0 \} " }
set n_molslist { n_molslist { { 0 1000 } } }
lappend spherespec $geometry
lappend spherespec $n_molslist
The flat system_spec
set geometry { geometry "flat -fixz" }
set n_molslist { n_molslist { { 1 3000 } } }
lappend bilayerspec $geometry
lappend bilayerspec $n_molslist
Now group together the system_specs into a master list
lappend system_specs $spherespec
lappend system_specs $bilayerspec
Make the call to setup_system
::mbtools::system_generation::setup_system $system_specs [setmd box_l] $moltypes
namespace eval ::mbtools::system_generation::mygeom {
namespace export create_mygeom
}
Import your new file into the system_generation
package by adding a line like the following to the
system_generation.tcl file.
source [file join [file dirname [info script]] mygeom.tcl]
You then need to implement the create_mygeom proceedure within your new namespace as follows;
In order to register your new molecule type to allow placement in any geometry you need to add a call to it in the function ::mbtools::system_generation::placemol. Make sure that all arguments to your place_mymolecule routine are included in this function call.