24#ifdef ESPRESSO_COLLISION_DETECTION
43 std::weak_ptr<BondedInteractionsMap> m_bonded_ias;
44 std::weak_ptr<Interactions::BondedInteractions> m_so_bonded_ias;
45 std::unique_ptr<VariantMap> m_params;
48 virtual std::shared_ptr<::CollisionDetection::ActiveProtocol>
protocol() = 0;
50 std::weak_ptr<BondedInteractionsMap> bonded_ias,
51 std::weak_ptr<Interactions::BondedInteractions>
so_bonded_ias) {
52 m_bonded_ias = std::move(bonded_ias);
61 m_params = std::make_unique<VariantMap>(
params);
66 auto bonded_ias = m_bonded_ias.lock();
67 assert(bonded_ias &&
"This protocol is not bound to a system");
68 std::optional<int>
retval = std::nullopt;
71 if (bonded_ias->contains(bond_id)) {
76 retval = bonded_ias->find_bond_id(
obj->bonded_ia());
79 throw std::invalid_argument(
"Bond in parameter list was "
80 "not added to the system");
87 return so_bonded_ias->do_call_method(
"get", {{
"key", bond_id}});
Data structures for bonded interactions.
Bind parameters in the script interface.
virtual std::shared_ptr<::CollisionDetection::ActiveProtocol > protocol()=0
auto find_bond_id(Variant const &v) const
void do_construct(VariantMap const ¶ms) override
void bind_bonded_ias(std::weak_ptr< BondedInteractionsMap > bonded_ias, std::weak_ptr< Interactions::BondedInteractions > so_bonded_ias)
auto get_bond_variant_by_id(int bond_id)
virtual void do_initialize(VariantMap const ¶ms)=0
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
std::unordered_map< std::string, Variant > VariantMap
static SteepestDescentParameters params
Currently active steepest descent instance.
Recursive variant implementation.