Skip to main content

Community Bonding Period

The first phase of the Google Summer of Code program is the Community Bonding Period, where students get to know their mentors, the codebase and the larger community. As we reach the end of this phase and move into the Coding Period, in this blog post, I summarize my progress in the project over the last three weeks and write a little bit about the plan for the coming weeks.

Community Bonding Period

I spent most of the Community Bonding Period (CBP) reading about the ecosystem I'm going to work in over the summer - this involved reading about SBML, learning numerical integration algorithms and learning the Rust programming language.

SBML

The project I'm working on deals with SBML models, so it was essential to gain familiarity with the SBML format. For this, I went through the SBML Specification [1].  

Next, I read about the systems biology simulation algorithm [2], which helped to develop an understanding of how various SBML components interact and work together. This also gave me a good idea about planning work on the simulator and the approach I'm going to take towards its implementation.

Numerical Integration Algorithms

Reactions in SBML models are mostly represented in terms of ODEs, so a simulator for these models would have to implement ODE solvers. For this project, I'm going to implement the Runge-Kutta solver, so I spent some time reading about it and watched some lectures on the subject.

The Boost C++ library was suggested by my mentors as a reference for the implementation of these algorithms. This library contains implementations of most ODE solvers and will be a valuable resource throughout the development of this project.

The Rust Programming Language

This is my first time working with the Rust language, and while I love the fundamentally different approach it takes, it's much harder to grasp than other languages (at least at first).

For learning Rust, one of the best resources is the book, The Rust Programming Language. Next, Rust By Example provides a set of examples that cover more or less the same features as the Rust book, and it's a great resource for referring to the implementation of a particular feature.

The most useful resources that I found, however, were recordings of live coding streams on YouTube. Ryan Levick and Jon Gjengset have hours and hours of live streams on their YouTube channels, where they build real-world projects and walk through their implementations. This is a great resource to see how features of the Rust language come together and how they prove useful in larger projects.

The SBML Test Suite

The SBML Test Suite is a comprehensive set of tests and examples which covers the SBML specification. It was suggested by Dr Matthias König on the SBML mailing list and has been very helpful. I spent some time going over the test cases to see how various components of SBML can be put together to build a model. 

In the last weekly meeting, we decided that for now, we wouldn't focus on AlgebraicRules and Events, so apart from those two, I developed a plan for implementing the rest of the components, and the componentTags and testTags in the test suite were immensely helpful for that.

Coding Period

The first task for the coding period is to develop a Rust parser for SBML models. There's actually already an existing crate for this, rust_sbml, written by carrascomj and jlricon. This parser supports various SBML components, like species, parameters, compartments and reactions; however, MathML support is not yet ready. In any case, rust_sbml is a great starting point for this project, and I'm going to start off by integrating MathML into it.

Last week, I spent some time gaining familiarity with the parser codebase and tried to integrate MathML, but I soon realized that this was going to take some time (as carrascomj had already pointed out in #7).

rust_sbml used to rely on mathml, which is a Rust crate for parsing MathML, earlier, but that had to be dropped when rust_sbml moved from roxmltree to quick-xml, as mathml doesn't implement Deserialize.

Upon discussion with carrascomjit seems like a good starting point would be to migrate MathML from roxmltree to quick-xml. (Thanks, @carrascomj, for your suggestions!) 

After this is complete, I can build support for KineticLaws and RateRules and all the other places where mathematical expressions are required. Following that, I'll start working on an RK solver for the ODEs.

That's all for this week; thanks for reading!


[1]: Michael Hucka, Frank T. Bergmann, Claudine Chaouiya, Andreas Dräger, Stefan Hoops, Sarah M. Keating, Matthias König, Nicolas Le Novère, Chris J. Myers, Brett G. Olivier, Sven Sahle, James C. Schaff, Rahuman Sheriff, Lucian P. Smith, Dagmar Waltemath, Darren J. Wilkinson, and Fengkai Zhang (2019). The Systems Biology Markup Language (SBML): Language Specification for Level 3 Version 2 Core Release 2. Journal of Integrative Bioinformatics, 16(2), 20190021.

[2]: Keller, R., Dörr, A., Tabira, A. et al. The systems biology simulation core algorithm. BMC Syst Biol 7, 55 (2013). https://doi.org/10.1186/1752-0509-7-55



Comments