38 if (
name ==
"draw_polymer_positions") {
45 get_value<std::vector<Utils::Vector3d>>(parameters,
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
Context * context() const
Responsible context.
std::string_view name() const
Variant do_call_method(std::string const &name, VariantMap const ¶meters) override
make_recursive_variant< ObjectRef > Variant
Possible types for parameters.
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.
T get_value_or(VariantMap const &vals, std::string const &name, T const &default_)
Get a value from a VariantMap by name, or return a default value if it does not exist.
auto make_vector_of_variants(std::vector< T > const &v)
std::unordered_map< std::string, Variant > VariantMap
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...