# WARNING: This is an automatically generated file and will be overwritten
#          by CellBlender on the next model export.

import os
import shared
import mcell as m

from parameters import *
from subsystem import *
from geometry import *
MODEL_PATH = os.path.dirname(os.path.abspath(__file__))


# ---- instantiation ----

# ---- release sites ----

# ---- surface classes assignment ----

# ---- compartments assignment ----

IMS.is_bngl_compartment = True
IMS.surface_compartment_name = 'OM_SA'

Cube.is_bngl_compartment = True

M.is_bngl_compartment = True
M.surface_compartment_name = 'IM_SA'

Release_Site_1 = m.ReleaseSite(
    name = 'Release_Site_1',
    complex = m.Complex('V'),
    region = IMS,
    number_to_release = 1000
)

Release_Site_2 = m.ReleaseSite(
    name = 'Release_Site_2',
    complex = m.Complex('S', orientation = m.Orientation.UP),
    region = M_IM_SA,
    number_to_release = 1000
)

# ---- create instantiation object and add components ----

instantiation = m.Instantiation()
instantiation.add_geometry_object(IMS)
instantiation.add_geometry_object(Cube)
instantiation.add_geometry_object(M)
instantiation.add_release_site(Release_Site_1)
instantiation.add_release_site(Release_Site_2)

# load seed species information from bngl file
instantiation.load_bngl_compartments_and_seed_species(os.path.join(MODEL_PATH, 'model.bngl'), None, shared.parameter_overrides)

