ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Constant-pH Ensemble, for derivation see [35]. More...
#include <ConstantpHEnsemble.hpp>
Public Member Functions | |
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) | |
Public Member Functions inherited from ReactionMethods::ReactionAlgorithm | |
ReactionAlgorithm (boost::mpi::communicator const &comm, int seed, double kT, double exclusion_range, std::unordered_map< int, double > const &exclusion_radius_per_type) | |
virtual | ~ReactionAlgorithm ()=default |
double | get_acceptance_rate_configurational_moves () const |
auto | get_kT () const |
auto | get_exclusion_range () const |
auto | get_volume () const |
void | set_volume (double new_volume) |
void | update_volume () |
Automatically sets the volume which is used by the reaction ensemble to the volume of a cuboid box. | |
void | set_exclusion_radius_per_type (std::unordered_map< int, double > const &map) |
void | remove_constraint () |
void | set_cyl_constraint (double center_x, double center_y, double radius) |
void | set_slab_constraint (double slab_start_z, double slab_end_z) |
Utils::Vector2d | get_slab_constraint_parameters () const |
void | setup_bookkeeping_of_empty_pids () |
Cleans the list of empty pids and searches for empty pid in the system. | |
void | delete_particle (int p_id) |
Deletes the particle with the given p_id and stores the id if the deletion created a hole in the particle id range. | |
void | add_reaction (std::shared_ptr< SingleReaction > const &new_reaction) |
Adds a reaction to the reaction system. | |
void | delete_reaction (int reaction_id) |
bool | is_reaction_under_way () const |
auto const & | get_old_system_state () const |
std::optional< double > | create_new_trial_state (int reaction_id) |
Carry out a reaction MC move and calculate the new potential energy. | |
double | make_reaction_mc_move_attempt (int reaction_id, double bf, double E_pot_old, double E_pot_new) |
Accept or reject a reaction MC move made by create_new_trial_state based on a probability acceptance bf . | |
bool | make_displacement_mc_move_attempt (int type, int n_particles) |
Attempt displacement MC moves for particles of a given type. | |
double | calculate_potential_energy () const |
Compute the system potential energy. | |
int | i_random (int maxint) |
draws a random integer from the uniform distribution in the range [0,maxint-1] | |
Public Attributes | |
double | m_constant_pH |
Public Attributes inherited from ReactionMethods::ReactionAlgorithm | |
std::vector< std::shared_ptr< SingleReaction > > | reactions |
std::unordered_map< int, double > | charges_of_types |
double | kT |
double | exclusion_range |
Hard sphere radius. | |
std::unordered_map< int, double > | exclusion_radius_per_type |
double | volume |
int | non_interacting_type = 100 |
int | m_accepted_configurational_MC_moves = 0 |
int | m_tried_configurational_MC_moves = 0 |
bool | particle_inside_exclusion_range_touched = false |
bool | neighbor_search_order_n = true |
Additional Inherited Members | |
Protected Member Functions inherited from ReactionMethods::ReactionAlgorithm | |
void | restore_old_system_state () |
Restore last valid system state. | |
void | clear_old_system_state () |
Clear last valid system state. | |
auto & | make_new_system_state () |
Open new handle for system state tracking. | |
void | displacement_mc_move (int type, int n_particles) |
Carry out displacement MC moves for particles of a given type. | |
void | make_reaction_attempt (::ReactionMethods::SingleReaction const &reaction, ParticleChanges &bookkeeping) |
Carry out a chemical reaction and save the old system state. | |
bool | all_reactant_particles_exist (SingleReaction const ¤t_reaction) const |
Checks whether all particles exist for the provided reaction. | |
Utils::Vector3d | get_random_position_in_box () |
Writes a random position inside the central box into the provided array. | |
Protected Attributes inherited from ReactionMethods::ReactionAlgorithm | |
std::vector< int > | m_empty_p_ids_smaller_than_max_seen_particle |
std::shared_ptr< ParticleChanges > | m_system_changes |
Constant-pH Ensemble, for derivation see [35].
For the constant pH reactions you need to provide the deprotonation and afterwards the corresponding protonation reaction (in this order). If you want to deal with multiple reactions do it multiple times. Note that there is a difference in the usecase of the constant pH reactions and the above reaction ensemble. For the constant pH simulation directily the apparent equilibrium constant which carries a unit needs to be provided – this is equivalent to the gamma of the reaction ensemble above, where the dimensionless reaction constant needs to be provided. Again: For the constant-pH algorithm not the dimensionless reaction constant needs to be provided here, but the apparent reaction constant.
Definition at line 41 of file core/reaction_methods/ConstantpHEnsemble.hpp.
|
inline |
Definition at line 43 of file core/reaction_methods/ConstantpHEnsemble.hpp.
double ReactionMethods::ConstantpHEnsemble::m_constant_pH |
Definition at line 50 of file core/reaction_methods/ConstantpHEnsemble.hpp.