Skip to main content

Posts

Showing posts from July, 2021

Week 7

   Progress this Week This week I worked on InitialAssignments, AssignmentRules and LocalParameters. All these features are supported by the simulator and parsers now and I have verified this with tests from the Core Semantic SBML test suites. Some of the tests fail because I didn't account for the fact that amounts and concentrations of species are optional, and can be defined by AssignmentRules instead of being specified while defining the species or through InitialAssignments. I'll work on this in the coming week. Progress so Far As per discussion with my project mentors, we have now diverged from the initially proposed timeline. The first half was completed as proposed and the last two weeks were spent in building support for more SBML features instead of the Runge-Kutta-Fehlberg integrator. Plan for the Coming Week Fix the issues with tests described above Implement the Runge-Kutta-Fehlberg Integrator

Week 6

  Progress this Week This week I fixed errors in my implementation of the Runge-Kutta method for the simulator, added support for FunctionDefinitions and ModifierSpeciesReferences in the SBML parser and lambda functions, piecewise functions, operators, constants and conditions in the MathML parser. Simulator After comparing results from the Rust simulator with the expected results in the SBML test suite, I realized there was an error in the way I had set up differential equations for the integrator. The models I had tested last week specified amounts for species, while differential equations needed concentrations . Last week's test comprised of models that had compartments with size = 1, which is why I didn't realize the error until I checked the results for model 00021.  Now the simulator evaluates the differential equations in terms of concentrations, but reports amounts in the result, just as the expected results in the SBML test suite do. SBML Parser The SBML parser now su

Week 5

   Progress this Week This week I implemented the Runge-Kutta 4th order method in the simulator. I have also added support for command-line arguments for model filename, duration and step size. The RK4 method is the default for now. Command-line argument support is built using the clap  library. Here's how the simulator can be run:      > cargo run -- -h SBML Simulator in Rust 1.0 Pranav Ballaney <ballaneypranav@gmail.com> A simulator for SBML models. USAGE: sbml-sim [FLAGS] <INPUT> <TIME> <STEPS> FLAGS: -h, --help Prints help information -v Sets the level of verbosity -V, --version Prints version information ARGS: <INPUT> Sets the input file to use <TIME> Simulation duration in seconds <STEPS> Number of steps for numerical integration To check my implementation, I compared the results with the standard results in

Week 4

  Progress this Week This week I worked implemented the Euler method in the simulator, along with some helper functions in the parsers.  The SBML parser now provides a  . assignments ()  method on an SBML model, which returns initial values of all parameters, species and compartments in a HashMap. This hashmap can then be passed to the MathML parser's  evaluate_node ()  function, in order to evaluate an AST node. The sbml-sim package then simulates the model using the  euler_integrator ()  method. The simulator can be executed as follows:           cargo run <path to model> And produces results like the following:       t S1 S2 S3      0.00 0.0001000 0.0002000 0.0001000      0.10 0.0001050 0.0002025 0.0000975      0.20 0.0001098 0.0002049 0.0000951      0.30 0.0001145 0.0002073 0.0000927      0.40 0.0001191 0.0002096 0.0000904 I have compared the results of the firs