a unified framework for modeling chemically reactive systems
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake Pybind11 is now (temporarily) located in thirdparty dir (#40) Dec 21, 2018
docs Integrate sphinx and doxygen to generate Reaktoro's website (#50) Feb 12, 2019
notes Merge branch 'master' into improve-CONTRIBUTING-file Oct 4, 2018
tests const on chemical system inside chemical state (#44) Jan 10, 2019
utilities We can now use `find_package(Reaktoro)` to create C++ Reaktoro applic… Dec 14, 2018
CMakeLists.txt We can now use `find_package(Reaktoro)` to create C++ Reaktoro applic… Dec 14, 2018
CONTRIBUTING.rst Direct users to GitHub's contributor page instead of a CONTRIBUTORS file Oct 8, 2018
README.rst [WIP] Writing Reaktoro guide using sphinx and enabling readthedocs fo… Dec 17, 2018
appveyor.yml Use conda-devenv newly introduced preprocessing selectors to simplify… Feb 21, 2019
environment.devenv.yml Use conda-devenv newly introduced preprocessing selectors to simplify… Feb 21, 2019
tasks.py Improvement in CMAKE and conda integration in Linux (#32) Nov 26, 2018



Travis Status AppVeyor Status Documentation Status

Reaktoro is a unified framework for modeling chemically reactive systems. It provides methods for chemical equilibrium and kinetic calculations for multiphase systems. Reaktoro is mainly developed in C++ for performance reasons. A Python interface is available for a more convenient and simpler use. Currently, Reaktoro can interface with two widely used geochemical software: PHREEQC and GEMS.

Quick example

Here is a simple C++ code using Reaktoro to perform a multiphase chemical equilibrium calculation:

#include <Reaktoro/Reaktoro.hpp>

using namespace Reaktoro;

int main()
    ChemicalEditor editor;
    editor.addAqueousPhase("H2O NaCl CaCO3 CO2");

    ChemicalSystem system(editor);

    EquilibriumProblem problem(system);
    problem.add("H2O", 1, "kg");
    problem.add("CO2", 1, "mol");
    problem.add("NaCl", 0.7, "mol");
    problem.add("CaCO3", 1, "g");

    ChemicalState state = equilibrate(problem);


This calculation could also be performed using Reaktoro's Python interface:

from reaktoro import *

editor = ChemicalEditor()
editor.addAqueousPhase("H2O NaCl CaCO3 CO2")

system = ChemicalSystem(editor)

problem = EquilibriumProblem(system)
problem.add("H2O", 1, "kg")
problem.add("CO2", 1, "mol")
problem.add("NaCl", 0.7, "mol")
problem.add("CaCO3", 1, "g")

state = equilibrate(problem)


Installation and Tutorials

For installation instructions, tutorials, and list of publications related to this project, please access reaktoro.org. This web site describes how to download and install Reaktoro, and demonstrate some basic usage.


How do I ask a question about Reaktoro?

If you have questions about using or installing Reaktoro, please go to Reaktoro's GitHub Issues and let us know. Please select the question label on the right side of the issue pages. We'll do our best to answer your question as soon as possible.

How can I report a bug?

You got a bug and this is frustrating, we understand you. But don't worry — we'll be happy to fix it for you (provided it is indeed a bug!).

Before you report a bug, please check first if someone else has already reported the same issue. If not, go to Reaktoro's GitHub Issues and enter a descriptive title and write your issue with enough details. Please select the label bug on the right side of the page.

Please provide a Minimum Reproducible Example? Please provide such an example so that we can be more efficient in identifying the bug and fixing it for you.

Have you heard about Markdown? Please use Markdown syntax when reporting your issues.

How can I contribute to Reaktoro?

First, thanks for your interest in contributing to Reaktoro! You can do so in many ways, from reporting bugs and writing tutorials to helping us with code development. You might also consider financially supporting Reaktoro's development by helping us extending the development team if you plan to make Reaktoro an essential software component in your company or academic group.

Read more on how to contribute to Reaktoro here.


You can see the list of awesome people who has contributed code to Reaktoro in the contributors page.

We would love to have you as a contributor too, see CONTRIBUTING for more information.

Developing Quick-Start

In order to start developing, you'll need to build Reaktoro from sources. There are two ways: install the dependencies manually, as described here, or using Conda. Conda is a tool for managing packages, dependencies and environments for multiple languages, including Python and C++, and supporting multiple platforms: Windows, Linux and macOS. In order to start developing Reaktoro using Conda, these are the steps:

  1. Install Miniconda, pick the 64-bit installer that uses the latest Python version from: conda.io/miniconda.html.
  2. Add conda-forge as a channel: conda config --append channels conda-forge
  3. Install conda-devenv: conda install -n base conda-devenv
  4. Create an environment for Reaktoro, from the repository root directory: conda devenv
  5. Activate the environment: source activate reaktoro from Linux/macOS or activate reaktoro from Windows
  6. Create a build directory and call cmake from it (for now check the .travis.yml file for an example on CMake parameters), OR, on Windows, call the inv msvc task to generate a project under build\msvc directory, open it in the IDE and build the INSTALL project. (inv is short for invoke, from the Invoke tool.)

Note: an inv compile task will be added in the future in order to simplify compilation in all platforms.


LGPL v2.1

Copyright (C) 2014-2018 Allan Leal

Reaktoro is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Reaktoro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.