38 if (
name ==
"draw_polymer_positions") {
43 get_value<int>(parameters,
"beads_per_chain"),
44 get_value<double>(parameters,
"bond_length"),
45 get_value<std::vector<Utils::Vector3d>>(parameters,
47 get_value<double>(parameters,
"min_distance"),
48 get_value<int>(parameters,
"max_tries"),
49 get_value<bool>(parameters,
"use_bond_angle"),
50 get_value_or<double>(parameters,
"bond_angle", 0.),
51 get_value<bool>(parameters,
"respect_constraints"),
52 get_value<int>(parameters,
"seed"));
53 std::vector<Variant>
pack;
54 for (
auto const &chain : positions) {
Vector implementation and trait types for boost qvm interoperability.
virtual void parallel_try_catch(std::function< void()> const &cb) const =0
boost::string_ref name() const
Context * context() const
Responsible context.
Variant do_call_method(std::string const &name, VariantMap const ¶meters) override
PackedVariant pack(const Variant &v)
Transform a Variant to a PackedVariant.
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
std::unordered_map< std::string, Variant > VariantMap
auto make_vector_of_variants(std::vector< T > const &v)
boost::make_recursive_variant< None, bool, int, std::size_t, double, std::string, ObjectRef, Utils::Vector3b, Utils::Vector3i, Utils::Vector2d, Utils::Vector3d, Utils::Vector4d, std::vector< int >, std::vector< double >, std::vector< boost::recursive_variant_ >, std::unordered_map< int, boost::recursive_variant_ >, std::unordered_map< std::string, boost::recursive_variant_ > >::type Variant
Possible types for parameters.
std::vector< std::vector< Utils::Vector3d > > draw_polymer_positions(System::System const &system, int const n_polymers, int const beads_per_chain, double const bond_length, std::vector< Utils::Vector3d > const &start_positions, double const min_distance, int const max_tries, int const use_bond_angle, double const bond_angle, int const respect_constraints, int const seed)
Determines valid polymer positions and returns them.
This file contains everything needed to create a start-up configuration of polymer chains which may r...