nrnb / GoogleSummerOfCode

Main documentation site for NRNB GSoC project ideas and resources
120 stars 40 forks source link

Implement an SBML simulator in pure Rust #190

Closed funasoul closed 1 year ago

funasoul commented 2 years ago

Background

The programming language Rust has been used in various fields for its robust memory management while boasting execution speed comparable to the C/C++ language. It is now being applied to the development of bioinformatics tools. In the future, these tools will be increasingly used via the Web, and implementation in the Rust language is expected to ensure the safety of these tools. Against this background, we would like to confirm its effectiveness in the simulator development area.

Last year, as a part of a GSoC project, an SBML simulator was developed using Rust (sbml-sim). To support SBML and MathML parsing, two other tools (mathml-rs and sbml-rs) were also developed. The SBML test suite was used to verify working and compare performance with existing simulators. A detailed description of the implementation is available in the final report.

Goal

The goal this time is to extend the implementation from last year. Good starting points are failing test cases. We would aim to support more SBML features, such as ConversionFactors, CSymbols and Events without delays.

Project Details

Size: 175 hours (medium) Length: 12 weeks Difficulty: Medium

Skills

Essential: Rust Preferred: numerical simulation algorithms, tree data structure, Rust procedural macros

Resources

Rust:

  1. Let's Get Rusty on YouTube
  2. The Rust Programming Language book
  3. Jon Gjengset's YouTube channel
  4. Ryan Levick's YouTube channel

SBML: This is an XML format that describes biological systems, with chemical species, reactions, rate laws, etc. First, learn about XML, then refer to the SBML L3V2 specification.

Application Task

Write a Rust program to parse the SBML model in section 7.2 of the SBML L3V2 specification. Print each species and compartment along with its value in default model units. Also print values in units associated to each species/compartment if a corresponding conversionFactor is defined. No need to deal with any other SBML components for this task.

Public Repository

Potential Mentors

Akito Tabira Akira Funahashi Kaito Ii Takahiro Yamada Yuta Tokuoka Pranav Ballaney

Contact

Akito Tabira Akira Funahashi Kaito Ii Takahiro Yamada Yuta Tokuoka Pranav Ballaney

ShashwatSingh1999 commented 2 years ago

Hi I am shashwat,I would like to contribute to this project,could u please point me to the resources to get started.

TakahiroYamada commented 2 years ago

Hi @EMUL8ER

I'm Takahiro, one of the potential mentor of this project.

Could you please introduce yourself first? If you can tell us about your programming experience, your activities in the Open Source Community, and whether or not you have participated in GSoC before and etc, it will help us to facilitate and provide you with important reference material for this project.

Best.

Takahiro

ShashwatSingh1999 commented 2 years ago

Hi @TakahiroYamada I am a student at IIPE and currently in 4th year and have experience with C++,Python, and data structures and algorithms and also built curriculum projects in Machine Learning, am also familiar with git, github, HTML,CSS, JS and I will learn rust and Numerical simulation algorithms as required, I am fairly new to the open source communtiy and never participated in gsoc, and wish to be part of it. would Really appreciate ur help :) Thank you

TakahiroYamada commented 2 years ago

Thanks for immediate response, @EMUL8ER .

OK. Since knowledge of Rust is essential to proceed this project, I think it is first necessary for you to understand Rust by referring to the contents of the following URLs and others. https://doc.rust-lang.org/book/title-page.html

If you have any other good reference information about Rust, could you please add it? >> @ballaneypranav

As for numerical integration, I suppose it is better for you to understand the method first by referring to the following URL (Euler method is the easiest and most basic method, so I think the best way to do this is to understand the theory behind it).

http://faculty.olin.edu/bstorey/Notes/DiffEq.pdf

@EMUL8ER , do you have any experience with SBML?

Takahiro

ShashwatSingh1999 commented 2 years ago

@TakahiroYamada Thanks for pointing to resources, I took a university course on Numerical methods(euler,newton raphson, runge kutta, simpsons rule etc) but have no prior experience related to SBML, but I am willing to learn and invest time in this project. Thank you

ballaneypranav commented 2 years ago

Hi @EMUL8ER, thanks for your interest in this project. Here are some resources I found helpful last year.

Rust:

  1. Let's Get Rusty on YouTube: Beginner videos here should be sufficient for starting out, check out the other two later if interested.
  2. The Rust Programming Language book: The book is an excellent resource, as @TakahiroYamada pointed out.
  3. Jon Gjengset's YouTube channel
  4. Ryan Levick's YouTube channel

SBML: This is an XML format that describes biological systems, with chemical species, reactions, rate laws, etc. First, learn about XML if not already familiar, then refer to the SBML L3V2 specification.

ShashwatSingh1999 commented 2 years ago

@ballaneypranav Thanks for the resources :)

TakahiroYamada commented 2 years ago

Thanks @ballaneypranav ! Yes, Understanding the SBML specification is also very important for this project! Please study this as well so that your future implementation to the simulator can be made to comply with this specification exactly. >> @EMUL8ER

And, I understand you have the basic knowledge about theory and direction of numerical integration. As you know, various methods have been proposed for numerical integration to enable accurate calculations depending on the differential equation of interest. As for which methods you should understand, including the theory, it would be good if you study the methods implemented in libSBMLsim (https://github.com/libsbmlsim/libsbmlsim), since many of them are useful (but studying Rust and the SBML specification is more important than these).

In order to start a project at GSoC, the first step is to put together an Application for this project, submit it to Google, and have it approved (Timeline is in https://developers.google.com/open-source/gsoc/timeline ).

Before putting together an application, it would be better if you can add some code to the current code, after studying Rust, numerical integration, and SBML specifications as mentioned so far.

Can you please prepare some point to add about the Rust simulator? >> @ballaneypranav

Once @EMUL8ER distinguishes that you completed your study of these contents sufficiently, please contact us again. We can then discuss which of the things @ballaneypranav has outlined for us to do you might be able to do before submitting the application, and it would be great if you could actually make a few additions to the code and do some testing.

If you have any comments on this process, I would be happy to hear from you and other potential mentors.

Best.

Takahiro

ShashwatSingh1999 commented 2 years ago

Thanks @TakahiroYamada @ballaneypranav,I have started learning these and will try my best to contribute to this codebase. Thanks :) Shashwat

ballaneypranav commented 2 years ago

Sure, I'll try to create an application task over the weekend.

khanspers commented 2 years ago

NRNB has officially been accepted as a mentoring organization for GSoC 2022! Here are some useful links:

khanspers commented 2 years ago

A reminder that the application period opens on Monday April 4. Proposals to NRNB must be submitted on the official GSoC Site (https://summerofcode.withgoogle.com/) before April 19, 18:00 UTC to be considered, and contributors are encouraged to submit proposals in draft format early, so that mentors can give feedback directly at the GSoC site.

AlexanderPico commented 2 years ago

IMPORTANT REMINDER: GSoC 2022 is for new “beginners” to open source.

Applicants are expected to review eligibility requirements prior to applying. We can not accept applications from contributors with prior open source development experience. From the GSoC FAQ https://developers.google.com/open-source/gsoc/faq:

Can someone already participating in open source be a GSoC Contributor?

The goal of GSoC is to bring new contributors into open source organizations. GSoC can also help beginner contributors learn the ins and outs of open source while being mentored by experienced community members. GSoC is for new and beginner contributors to open source, it is not for experienced contributors to open source.

khanspers commented 1 year ago

Closing in preparation for GSoC 2023.