ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
core/reaction_methods/utils.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19#ifndef REACTION_METHODS_UTILS_HPP
20#define REACTION_METHODS_UTILS_HPP
21
22#include "reaction_methods/SingleReaction.hpp"
23
24#include <unordered_map>
25
26namespace ReactionMethods {
27
28/**
29 * Calculates the whole product of factorial expressions which occur in the
30 * reaction ensemble acceptance probability.
31 *
32 * See @cite smith94c.
33 */
35 SingleReaction const &reaction,
36 std::unordered_map<int, int> const &particle_numbers);
37
38/**
39 * Calculates the factorial expression which occurs in the constant pH method
40 * with symmetric proposal probability.
41 *
42 * See @cite landsgesell17b for details.
43 * zeta = 1 (see @cite smith94c) since we only perform one reaction
44 * at one call of the function.
45 */
47 SingleReaction const &reaction,
48 std::unordered_map<int, int> const &particle_numbers);
49
50/**
51 * Calculates the factorial expression which occurs in the reaction ensemble
52 * acceptance probability
53 */
55
56} // namespace ReactionMethods
57#endif
double calculate_factorial_expression(SingleReaction const &reaction, std::unordered_map< int, int > const &particle_numbers)
Calculates the whole product of factorial expressions which occur in the reaction ensemble acceptance...
Definition utils.cpp:46
double factorial_Ni0_divided_by_factorial_Ni0_plus_nu_i(int Ni0, int nu_i)
Calculates the factorial expression which occurs in the reaction ensemble acceptance probability.
Definition utils.cpp:29
double calculate_factorial_expression_cpH(SingleReaction const &reaction, std::unordered_map< int, int > const &particle_numbers)
Calculates the factorial expression which occurs in the constant pH method with symmetric proposal pr...
Definition utils.cpp:65