|
faunus
|
General properties of reactionsEnd of class. More...
#include <molecule.h>
Public Types | |
| enum | Direction : char { LEFT = 0, RIGHT = 1 } |
| using | StoichiometryMap = std::map< int, int > |
| key = id; value = stoichiometic coeff. | |
| using | AtomicAndMolecularPair = std::pair< const StoichiometryMap &, const StoichiometryMap & > |
| using | StoichiometryPair = StoichiometryMap::value_type |
| first = id; second = stoichiometic coeff. | |
| using | MapFilter = std::function< bool(const ReactionData::StoichiometryPair &)> |
Public Member Functions | |
| void | setDirection (Direction) |
| Set directions of the process. | |
| void | setRandomDirection (Random &random) |
| Set random direction (left or right) | |
| Direction | getDirection () const |
| Get direction of the process. | |
| void | reverseDirection () |
| Reverse direction of reaction. | |
| AtomicAndMolecularPair | getProducts () const |
| Pair with atomic and molecular products. | |
| AtomicAndMolecularPair | getReactants () const |
| Pair with atomic and molecular reactants. | |
| double | freeEnergy () const |
| Free energy of reaction in current direction (kT) More... | |
| bool | containsAtomicSwap () const |
| True if a swap move is detected, i.e. atom_a <-> atom_b. | |
| const std::string & | getReactionString () const |
| Reaction string. | |
| std::pair< std::set< int >, std::set< int > > | participatingAtomsAndMolecules () const |
| Atom and molecule id's affected. More... | |
Public Attributes | |
| bool | only_neutral_molecules = false |
| Only neutral molecules are involved in the reaction. | |
Friends | |
| void | from_json (const json &, ReactionData &) |
| void | to_json (json &, const ReactionData &) |
General properties of reactionsEnd of class.
Placeholder for chemical reactions used in the RCMC move. A reaction has two sides, left and right, each contained one or more atomic / molecular reactants and products. The reaction is associated with an equilibrium constant, lnK or pK. If the direction is RIGHT, the right-hand side species are products and the left-hand side are reactants. Vice versa if the direction is LEFT. The direction can be changed with setDirection() which also handles sign changes of lnK and pK. The functions getProducts() and getReactants() returns a pair with atomic and molecular reactants/products, always reflecting the current direction.
canonic and reservoir_sizereservoir_size should ideally be associated with an implicit moleculedirection should be a member of ReactionData due to possible data races | double Faunus::ReactionData::freeEnergy | ( | ) | const |
Free energy of reaction in current direction (kT)
| std::pair< std::set< int >, std::set< int > > Faunus::ReactionData::participatingAtomsAndMolecules | ( | ) | const |
Atom and molecule id's affected.
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.13