ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA > Class Template Referenceabstract

#include <NonBondedInteraction.hpp>

Inheritance diagram for ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >:
Collaboration diagram for ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >:

Public Types

using CoreInteraction = CoreIA
using CoreInteractionIAParamsPtr = CoreInteraction IA_parameters::*

Public Member Functions

Variant do_call_method (std::string const &name, VariantMap const &params) override
void do_construct (VariantMap const &params) final
void attach (std::weak_ptr< NonBondedInteractionHandle * > si_struct, std::weak_ptr<::IA_parameters > core_struct)
void update_core (bool notify=true)
Public Member Functions inherited from ScriptInterface::AutoParameters< InteractionPotentialInterface< CoreIA > >
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
std::string_view name () const
Context * context () const
 Responsible context.
void construct (VariantMap const &params)
 Construct the handled object.
VariantMap get_parameters () const
 Get current parameters.
void set_parameter (const std::string &name, const Variant &value)
 Set single parameter.
Variant call_method (const std::string &name, const VariantMap &params)
 Call a method on the object.
std::string serialize () const

Protected Types

using BaseClass = AutoParameters<InteractionPotentialInterface<CoreIA>>

Protected Member Functions

virtual CoreInteractionIAParamsPtr get_ptr_offset () const =0
 Pointer to the corresponding member in a handle.
virtual void make_new_instance (VariantMap const &params)=0
 Create a new instance using the constructor with range checks.
virtual std::string inactive_parameter () const
 Which parameter indicates whether the potential is inactive.
virtual double get_inactive_cutoff () const
 Which magic value indicates the potential is inactive.
template<typename T>
auto make_autoparameter (T CoreInteraction::*ptr, char const *name)
std::set< std::string > get_valid_parameters () const
std::vector< std::string_view > valid_parameters () const final
Protected Member Functions inherited from ScriptInterface::AutoParameters< InteractionPotentialInterface< CoreIA > >
 AutoParameters ()=default
 AutoParameters (std::vector< AutoParameter > &&params)
 ~AutoParameters () override=default
bool has_parameter (std::string const &name) const override
void add_parameters (std::vector< AutoParameter > &&params)
auto const & get_parameter_insertion_order () const

Protected Attributes

std::shared_ptr< CoreInteraction > m_handle
 Managed object.
std::weak_ptr<::IA_parameters > m_core_struct
 Handle to the container whose members have to be synchronized.
std::weak_ptr< NonBondedInteractionHandle * > m_si_struct
 Handle to the interface used to synchronize data members.
std::weak_ptr< std::function< void()> > m_notify_non_bonded_ia_change
 Callback to notify changes to the interaction range.

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.

Detailed Description

template<class CoreIA>
class ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >

Definition at line 53 of file NonBondedInteraction.hpp.

Member Typedef Documentation

◆ BaseClass

template<class CoreIA>
using ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::BaseClass = AutoParameters<InteractionPotentialInterface<CoreIA>>
protected

Definition at line 60 of file NonBondedInteraction.hpp.

◆ CoreInteraction

template<class CoreIA>
using ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::CoreInteraction = CoreIA

Definition at line 56 of file NonBondedInteraction.hpp.

◆ CoreInteractionIAParamsPtr

template<class CoreIA>
using ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::CoreInteractionIAParamsPtr = CoreInteraction IA_parameters::*

Definition at line 57 of file NonBondedInteraction.hpp.

Member Function Documentation

◆ attach()

template<class CoreIA>
void ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::attach ( std::weak_ptr< NonBondedInteractionHandle * > si_struct,
std::weak_ptr<::IA_parameters > core_struct )
inline

Definition at line 144 of file NonBondedInteraction.hpp.

References m_core_struct, and m_si_struct.

◆ do_call_method()

◆ do_construct()

◆ get_inactive_cutoff()

template<class CoreIA>
virtual double ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::get_inactive_cutoff ( ) const
inlineprotectedvirtual

Which magic value indicates the potential is inactive.

Reimplemented in ScriptInterface::Interactions::InteractionLJcos2, ScriptInterface::Interactions::InteractionThole, and ScriptInterface::Interactions::InteractionWCA.

Definition at line 79 of file NonBondedInteraction.hpp.

References inactive_cutoff.

Referenced by do_construct().

◆ get_ptr_offset()

◆ get_valid_parameters()

template<class CoreIA>
std::set< std::string > ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::get_valid_parameters ( ) const
inlineprotected

Definition at line 87 of file NonBondedInteraction.hpp.

References valid_parameters().

◆ inactive_parameter()

◆ make_autoparameter()

template<class CoreIA>
template<typename T>
auto ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::make_autoparameter ( T CoreInteraction::* ptr,
char const * name )
inlineprotected

◆ make_new_instance()

◆ update_core()

template<class CoreIA>
void ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::update_core ( bool notify = true)

Definition at line 900 of file NonBondedInteraction.hpp.

References get_ptr_offset(), m_core_struct, m_handle, and m_si_struct.

Referenced by do_call_method().

◆ valid_parameters()

template<class CoreIA>
std::vector< std::string_view > ScriptInterface::AutoParameters< InteractionPotentialInterface< CoreIA >, ObjectHandle >::valid_parameters ( ) const
inlinefinalprotectedvirtual

Member Data Documentation

◆ m_core_struct

template<class CoreIA>
std::weak_ptr<::IA_parameters> ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::m_core_struct
protected

Handle to the container whose members have to be synchronized.

Definition at line 67 of file NonBondedInteraction.hpp.

Referenced by attach(), and update_core().

◆ m_handle

template<class CoreIA>
std::shared_ptr<CoreInteraction> ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::m_handle
protected

Managed object.

Definition at line 65 of file NonBondedInteraction.hpp.

Referenced by do_call_method(), do_construct(), make_autoparameter(), and update_core().

◆ m_notify_non_bonded_ia_change

template<class CoreIA>
std::weak_ptr<std::function<void()> > ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::m_notify_non_bonded_ia_change
protected

Callback to notify changes to the interaction range.

Definition at line 71 of file NonBondedInteraction.hpp.

◆ m_si_struct

template<class CoreIA>
std::weak_ptr<NonBondedInteractionHandle *> ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::m_si_struct
protected

Handle to the interface used to synchronize data members.

Definition at line 69 of file NonBondedInteraction.hpp.

Referenced by attach(), and update_core().


The documentation for this class was generated from the following file: