The simulation software of E-Cell 3 is actually a set of extension modules for Python language interpreter, written in C++ and Python. It consists of libecs cell modeling toolkit, E-Cell Micro Core (EMC) layer, a python language binding (PyECS) and other peripheral python modules (figure 1).
Libecs, of which code name is Koyurugi, is a generic object-oriented C++ class library for constructing various object-based cell models. One of the distinct features of Koyurugi is that the constructed cell models themselves work as simulation engines.
E-Cell Micro Core (EMC) defines interfaces and implementations of Simulator class, which provides a simple API of the Koyurugi class library (figure 2). Being isolated from each other by employing Bridge design pattern[4] (gray box), the interface and the implementation are coded as two abstract classes, Simulator and SimulatorImplementation, respectively. By wrapping the interface class various API and language bindings can be developed (e.g. PyECS for Python). Similarly, a subclass of SimulatorImplementation can form a Facade design pattern class of the Koyurugi in the same thread, or a network proxy of a EMC in a different thread which would be running on a remote computation node. For example, by wrapping it with a CORBA skeleton, the EMC can perform as a distributed CORBA object. The virtue of this design is that the behavior of the frontend side and the backend side can be determined individually at runtime.
PyECS is basically a Python binding of the EMC. Python language is a popular, interpreted, object-oriented, very high-level programming language which shows prominent productivity even with non-professional programmers. PyECS can be viewed as an adepter for the EMC to make it act as an extension module of the Python language interpreter. Upon the PyECS layer, various peripheral software components such as graphical and script-based frontends, simulation session managers, analysis modules, data management modules, cell model editors/processors and other user-level scripts can easily be developed, used and reused.
Libecs, EMC and a main portion of PyECS are written in C++ language. The rest of PyECS and user-level scripts are written in Python language. C++ is used for the components in which runtime efficiency, coding strictness and flexibility are critical. Python is an ideal language for the other user-side components, where productivity and readability are demanded.