Skip to content

Commit

Permalink
Minor fixups (#801)
Browse files Browse the repository at this point in the history
* CMake: Set include directory for template files

* README: fix typos, formatting, update

* Fix python package description

* Fix formatting

* Update README, remove obsolete type hint issues

* Remove superfluous const from declaration

* Update doc

* Don't move returned value
  • Loading branch information
dweindl authored Sep 7, 2019
1 parent 64352e1 commit 6d14388
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 38 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ add_custom_target(
swig/CMakeLists_model.cmake
swig/modelname.template.i
)
set_target_properties(fileTemplates
PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/include/")


if($ENV{ENABLE_GCOV_COVERAGE})
Expand Down
42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ AMICI provides a multi-language (Python, C++, Matlab) interface for the
[IDAS](https://computing.llnl.gov/projects/sundials/idas)
(for algebraic differential equations). AMICI allows the user to read
differential equation models specified as [SBML](http://sbml.org/)
and automatically compiles such models as `.mex` simulation files
or [PySB](http://pysb.org/)
and automatically compiles such models into `.mex` simulation files
(Matlab), C++ executables or Python modules.

In contrast to the (no longer maintained)
Expand All @@ -17,7 +18,7 @@ C++ code, which allows for a significantly faster simulation.

Beyond forward integration, the compiled simulation file also allows for
forward sensitivity analysis, steady state sensitivity analysis and
adjoint sensitivity analysis for likelihood based output functions.
adjoint sensitivity analysis for likelihood-based output functions.

The interface was designed to provide routines for efficient gradient
computation in parameter estimation of biochemical reaction models but
Expand All @@ -28,6 +29,7 @@ constrained optimization problems.
## Features

* SBML import (see details below)
* PySB import
* Generation of C++ code for model simulation and sensitivity
computation
* Access to and high customizability of CVODES and IDAS solver
Expand All @@ -40,7 +42,7 @@ constrained optimization problems.
* Pre-equilibration and pre-simulation conditions
* Support for
[discrete events and logical operations](https://academic.oup.com/bioinformatics/article/33/7/1049/2769435)

(Matlab-only)

## Interfaces & workflow

Expand All @@ -55,21 +57,21 @@ is then used for model simulation.

## Getting started

AMICI installation instructions are provided
[here](http://icb-dcm.github.io/AMICI/md__i_n_s_t_a_l_l.html).
The AMICI source code is available at https://github.com/ICB-DCM/AMICI/.
To install AMICI, first read the
[installation instructions](http://icb-dcm.github.io/AMICI/md__i_n_s_t_a_l_l.html).

To get you started with Python-AMICI the best way might be this
To get you started with Python-AMICI, the best way might be checking out this
[Jupyter notebook](https://github.com/ICB-DCM/AMICI/blob/master/python/examples/example_steadystate/ExampleSteadystate.ipynb).

For Matlab, various examples are available
[here](https://github.com/ICB-DCM/AMICI/tree/master/matlab/examples).

To get started with Matlab-AMICI, various examples are available
in [matlab/examples/](https://github.com/ICB-DCM/AMICI/tree/master/matlab/examples).

Comprehensive documentation on installation and usage of AMICI is available
online at [http://icb-dcm.github.io/AMICI/](http://icb-dcm.github.io/AMICI/).

Any contributions to AMICI are welcome, read more contributing
[here](http://icb-dcm.github.io/AMICI/md__c_o_n_t_r_i_b_u_t_i_n_g.html).
Any [contributions](http://icb-dcm.github.io/AMICI/md__c_o_n_t_r_i_b_u_t_i_n_g.html)
to AMICI are welcome (code, bug reports, suggestions for improvements, ...).


### Getting help
Expand All @@ -88,18 +90,25 @@ If you used AMICI in your work, we are happy to include
your project, please let us know via a Github issue.

When using AMICI in your project, please cite
* [Fröhlich, F., Kaltenbacher, B., Theis, F. J., & Hasenauer, J. (2017). Scalable Parameter Estimation for Genome-Scale Biochemical Reaction Networks. Plos Computational Biology, 13(1), e1005331. doi: 10.1371/journal.pcbi.1005331](https://doi.org/10.1371/journal.pcbi.1005331)
* Fröhlich, F., Kaltenbacher, B., Theis, F. J., & Hasenauer, J. (2017).
Scalable Parameter Estimation for Genome-Scale Biochemical Reaction Networks.
Plos Computational Biology, 13(1), e1005331.
doi:[10.1371/journal.pcbi.1005331](https://doi.org/10.1371/journal.pcbi.1005331)
and/or
* [Fröhlich, F., Theis, F. J., Rädler, J. O., & Hasenauer, J. (2017). Parameter estimation for dynamical systems with discrete events and logical operations. Bioinformatics, 33(7), 1049-1056. doi: 10.1093/bioinformatics/btw764](https://doi.org/10.1093/bioinformatics/btw764)
* Fröhlich, F., Theis, F. J., Rädler, J. O., & Hasenauer, J. (2017).
Parameter estimation for dynamical systems with discrete events and logical
operations. Bioinformatics, 33(7), 1049-1056.
doi:[10.1093/bioinformatics/btw764](https://doi.org/10.1093/bioinformatics/btw764)


## Status of SBML support in Python-AMICI

Python-AMICI currently passes 494 out of the 1780 (~28%) test cases from
Python-AMICI currently passes 500 out of the 1780 (~28%) test cases from
the semantic
[SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite/).
[SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite/)
([current status](https://github.com/ICB-DCM/AMICI/actions)).

In additional, we currently plan to add support for the following features
In addition, we currently plan to add support for the following features
(see corresponding issues for details and progress):

- Events (currently Matlab-only)
Expand All @@ -108,7 +117,6 @@ In additional, we currently plan to add support for the following features
- Species assignment rules
- Compartment assignment rules
- Models without species
- Logical operators

contributions are welcome.

Expand Down
9 changes: 3 additions & 6 deletions documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ This is configured in `matlab/mtoc/config`.

## Python documentation

Python documentation is processed by doxygen using the script and filters
in `scripts/`.

**NOTE:** Unfortunately, the current doxygen Python filter is unable to deal
with Python type hints (https://github.com/ICB-DCM/AMICI/issues/613).
Python documentation is processed by doxygen and doxypypy using the script and
filters in `scripts/`.


## Out-of-source documentation
Expand All @@ -60,7 +57,7 @@ Some guidelines:

* Please stick to the limit of 80 characters per line for readability of raw
Markdown files where possible.

However, note that some Markdown interpreters can handle line breaks within
links and headings, whereas others cannot. Here, compatibility is preferred
over linebreaks.
Expand Down
5 changes: 4 additions & 1 deletion documentation/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and deploy a new release on [PyPI](https://pypi.org/project/amici/).

We try to keep a clean git history. Therefore, feature pull requests are
squash-merged to `develop`. Merging of release branches to master is done via
merge commits.
merge commits.


## When starting to work on some issue
Expand Down Expand Up @@ -127,6 +127,9 @@ described below:

* We want to maintain compatibility with g++, clang and the Intel C++ compiler

* For code formatting, we use the settings from `.clang-format` in the root
directory

* *Details to be defined*


Expand Down
8 changes: 4 additions & 4 deletions include/amici/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <gsl/gsl-lite.hpp>

namespace amici {

/**
* @brief creates a slice from existing data
*
Expand All @@ -20,9 +20,9 @@ namespace amici {
* @param size slice size
* @return span of the slice
*/
gsl::span<realtype> slice(std::vector<realtype> &data, const int index,
const unsigned size);

gsl::span<realtype> slice(std::vector<realtype> &data, int index,
unsigned size);

/**
* @brief Checks the values in an array for NaNs and Infs
Expand Down
2 changes: 1 addition & 1 deletion include/amici/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class Model : public AbstractModel {
* @param it time index
* @return t timepoint
*/
realtype getTimepoint(const int it) const;
realtype getTimepoint(int it) const;

/**
* @brief Set the timepoint vector
Expand Down
2 changes: 1 addition & 1 deletion python/sdist/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def main():
'develop': my_develop,
},
version=__version__,
description='Advanced multi-language Interface to CVODES and IDAS (%s)',
description='Advanced multi-language Interface to CVODES and IDAS',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/ICB-DCM/AMICI',
Expand Down
11 changes: 5 additions & 6 deletions src/interface_matlab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file interface_matlab.cpp
* @brief core routines for mex interface
*
* This file defines the fuction mexFunction which is executed upon calling the
* mex file from matlab
* This file defines the function `mexFunction` which is executed upon calling
* the `.mex` file from Matlab.
*/

#include "amici/interface_matlab.h"
Expand All @@ -23,7 +23,7 @@ namespace amici {
int dbl2int(const double x);

/**
* @brief The mexFunctionArguments enum takes care of the ordering of mex file
* @brief The mexRhsArguments enum takes care of the ordering of mex file
* arguments (indexing in prhs)
*/
enum mexRhsArguments {
Expand All @@ -41,8 +41,7 @@ enum mexRhsArguments {


/*!
* amici_blasCBlasTransToBlasTrans translates AMICI_BLAS_TRANSPOSE values to
* CBlas readable strings
* Translates AMICI_BLAS_TRANSPOSE values to CBLAS readable strings
*
* @param trans flag indicating transposition and complex conjugation
*
Expand Down Expand Up @@ -480,7 +479,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
std::unique_ptr<amici::ExpData> edata;
if (nrhs > amici::RHS_DATA && mxGetPr(prhs[amici::RHS_DATA])) {
try {
edata = std::move(amici::expDataFromMatlabCall(prhs, *model));
edata = amici::expDataFromMatlabCall(prhs, *model);
} catch (amici::AmiException const& ex) {
amici::errMsgIdAndTxt("AMICI:mex:setup","Failed to read experimental data:\n%s",ex.what());
}
Expand Down
3 changes: 1 addition & 2 deletions src/main.template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include "wrapfunctions.h" /* model-provided functions */

/* This is a scaffold for a stand-alone AMICI simulation executable
* demonstrating
* use of the AMICI C++ API.
* demonstrating the use of the AMICI C++ API.
*
* This program reads AMICI options from an HDF5 file, prints some results
* and writes additional results to an HDF5 file. The name of the HDF5 file
Expand Down

0 comments on commit 6d14388

Please sign in to comment.