ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
core/reaction_methods/ConstantpHEnsemble.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_CONSTANT_PH_ENSEMBLE_HPP
20#define REACTION_METHODS_CONSTANT_PH_ENSEMBLE_HPP
21
22#include "reaction_methods/ReactionAlgorithm.hpp"
23
24#include <map>
25
26namespace ReactionMethods {
27
28/**
29 * Constant-pH Ensemble, for derivation see @cite reed92a.
30 * For the constant pH reactions you need to provide the deprotonation and
31 * afterwards the corresponding protonation reaction (in this order). If you
32 * want to deal with multiple reactions do it multiple times. Note that there is
33 * a difference in the usecase of the constant pH reactions and the above
34 * reaction ensemble. For the constant pH simulation directily the
35 * **apparent equilibrium constant which carries a unit** needs to be provided
36 * -- this is equivalent to the gamma of the reaction ensemble above, where the
37 * dimensionless reaction constant needs to be provided. Again: For the
38 * constant-pH algorithm not the dimensionless reaction constant needs to be
39 * provided here, but the apparent reaction constant.
40 */
42public:
44 boost::mpi::communicator const &comm, int seed, double kT,
45 double exclusion_range, double constant_pH,
46 const std::unordered_map<int, double> &exclusion_radius_per_type)
49 m_constant_pH(constant_pH) {}
51};
52
53} // namespace ReactionMethods
54#endif
ConstantpHEnsemble(boost::mpi::communicator const &comm, int seed, double kT, double exclusion_range, double constant_pH, const std::unordered_map< int, double > &exclusion_radius_per_type)