ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <ReactionAlgorithm.hpp>
Public Member Functions | |
virtual std::shared_ptr<::ReactionMethods::ReactionAlgorithm > | RE ()=0 |
virtual std::shared_ptr<::ReactionMethods::ReactionAlgorithm > const | RE () const =0 |
ReactionAlgorithm () | |
Variant | do_call_method (std::string const &name, VariantMap const ¶ms) override |
Public Member Functions inherited from ScriptInterface::AutoParameters< ReactionAlgorithm > | |
std::span< const boost::string_ref > | valid_parameters () const final |
Variant | get_parameter (const std::string &name) const final |
void | do_set_parameter (const std::string &name, const Variant &value) final |
std::vector< std::pair< std::string, Variant > > | serialize_parameters () const final |
Public Member Functions inherited from ScriptInterface::ObjectHandle | |
ObjectHandle ()=default | |
ObjectHandle (ObjectHandle const &)=delete | |
ObjectHandle & | operator= (ObjectHandle const &)=delete |
virtual | ~ObjectHandle ()=default |
boost::string_ref | name () const |
Context * | context () const |
Responsible context. | |
void | construct (VariantMap const ¶ms) |
Construct the handled object. | |
virtual void | do_construct (VariantMap const ¶ms) |
VariantMap | get_parameters () const |
Get current parameters. | |
auto | get_valid_parameters () const |
void | set_parameter (const std::string &name, const Variant &value) |
Set single parameter. | |
Variant | call_method (const std::string &name, const VariantMap ¶ms) |
Call a method on the object. | |
std::string | serialize () const |
Protected Member Functions | |
int | get_reaction_index (int reaction_id) const |
Check reaction id is within the reaction container bounds. | |
virtual double | calculate_factorial_expression (::ReactionMethods::SingleReaction const &reaction, std::unordered_map< int, int > const &particle_numbers) const |
Protected Member Functions inherited from ScriptInterface::AutoParameters< ReactionAlgorithm > | |
AutoParameters ()=default | |
AutoParameters (std::vector< AutoParameter > &¶ms) | |
void | add_parameters (std::vector< AutoParameter > &¶ms) |
auto const & | get_parameter_insertion_order () const |
Protected Attributes | |
std::vector< std::shared_ptr< SingleReaction > > | m_reactions |
Keep track of the script interface pointer of each reaction. | |
Private Member Functions | |
std::string | get_internal_state () const override |
Additional Inherited Members | |
Static Public Member Functions inherited from ScriptInterface::ObjectHandle | |
static ObjectRef | deserialize (const std::string &state, Context &ctx) |
Make object from serialized state. | |
Definition at line 40 of file script_interface/reaction_methods/ReactionAlgorithm.hpp.
ScriptInterface::ReactionMethods::ReactionAlgorithm::ReactionAlgorithm | ( | ) |
Definition at line 50 of file script_interface/reaction_methods/ReactionAlgorithm.cpp.
References ScriptInterface::AutoParameters< ReactionAlgorithm >::add_parameters(), ScriptInterface::ObjectHandle::context(), ScriptInterface::get_value(), m_reactions, ScriptInterface::make_unordered_map_of_variants(), ScriptInterface::Context::parallel_try_catch(), RE(), and ScriptInterface::AutoParameter::read_only.
|
inlineprotectedvirtual |
Reimplemented in ScriptInterface::ReactionMethods::ConstantpHEnsemble.
Definition at line 72 of file script_interface/reaction_methods/ReactionAlgorithm.hpp.
Referenced by do_call_method().
|
overridevirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Reimplemented in ScriptInterface::ReactionMethods::WidomInsertion.
Definition at line 105 of file script_interface/reaction_methods/ReactionAlgorithm.cpp.
References calculate_factorial_expression(), ScriptInterface::ObjectHandle::context(), get_reaction_index(), init_type_map(), ScriptInterface::Context::is_head_node(), m_reactions, ScriptInterface::ObjectHandle::name(), ScriptInterface::Context::parallel_try_catch(), params, and RE().
Referenced by ScriptInterface::ReactionMethods::WidomInsertion::do_call_method().
|
inlineoverrideprivatevirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Definition at line 85 of file script_interface/reaction_methods/ReactionAlgorithm.hpp.
References RE().
|
inlineprotected |
Check reaction id is within the reaction container bounds.
Since each reaction has a corresponding backward reaction, the total number of reactions is doubled. Return the corresponding index for ReactionAlgorithm::m_reactions.
Definition at line 50 of file script_interface/reaction_methods/ReactionAlgorithm.hpp.
References ScriptInterface::ObjectHandle::context(), m_reactions, and ScriptInterface::Context::parallel_try_catch().
Referenced by do_call_method(), and ScriptInterface::ReactionMethods::WidomInsertion::do_call_method().
|
pure virtual |
|
pure virtual |
|
protected |
Keep track of the script interface pointer of each reaction.
Definition at line 43 of file script_interface/reaction_methods/ReactionAlgorithm.hpp.
Referenced by do_call_method(), get_reaction_index(), and ReactionAlgorithm().