32#include <unordered_map>
40 AutoParameters<ObjectMap<BreakageSpec, System::Leaf>, System::Leaf>> {
41 using container_type = std::unordered_map<int, std::shared_ptr<BreakageSpec>>;
44 using key_type =
typename container_type::key_type;
48 std::shared_ptr<::BondBreakage::BondBreakage> m_bond_breakage;
51 m_bond_breakage = std::make_shared<::BondBreakage::BondBreakage>();
56 system.bond_breakage = m_bond_breakage;
60 if (context()->is_head_node()) {
61 throw std::runtime_error(
62 "Inserting breakage spec without a bond type is not permitted.");
68 m_bond_breakage->breakage_specs.emplace(
key,
obj_ptr->breakage_spec());
71 m_bond_breakage->breakage_specs.erase(
key);
typename container_type::mapped_type mapped_type
void insert_in_core(key_type const &key, mapped_type const &obj_ptr) override
typename container_type::key_type key_type
key_type insert_in_core(mapped_type const &) override
void do_construct(VariantMap const ¶ms) override
void erase_in_core(key_type const &key) override
void on_bind_system(::System::System &system) override
Owning map of ObjectHandles.
void restore_from_checkpoint(VariantMap const ¶ms)
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
std::unordered_map< std::string, Variant > VariantMap
static SteepestDescentParameters params
Currently active steepest descent instance.