120 std::vector<int> m_id_selection;
122 std::weak_ptr<CellSystem::CellSystem> m_cell_structure;
123 std::weak_ptr<Interactions::BondedInteractions> m_bonded_ias;
124 std::weak_ptr<::System::System> m_system;
127 std::set<std::string_view>
const m_special_parameters{
128 "pos",
"type",
"bonds",
129#ifdef ESPRESSO_ELECTROSTATICS
132#ifdef ESPRESSO_EXCLUSIONS
138 auto cell_structure_ptr = m_cell_structure.lock();
139 assert(cell_structure_ptr !=
nullptr);
140 auto &cell_structure = cell_structure_ptr->get_cell_structure();
141 return &cell_structure;
144 auto get_system()
const {
145 auto ptr = m_system.lock();
146 assert(ptr !=
nullptr);
153 {
"chunk_size", AutoParameter::read_only,
154 [
this]() {
return m_chunk_size; }},
155 {
"id_selection", AutoParameter::read_only,
156 [
this]() {
return m_id_selection; }},
160 void do_construct(
VariantMap const ¶ms)
override;
162 Variant do_call_method(std::string
const &name,
165 void attach(std::weak_ptr<::System::System> system) {
166 assert(m_system.expired());
Context of an object handle.
virtual std::shared_ptr< ObjectHandle > make_shared(std::string const &name, const VariantMap ¶meters)=0
Get a new reference counted instance of a script interface by name.
virtual bool is_head_node() const =0
virtual boost::mpi::communicator const & get_comm() const =0
void attach(std::weak_ptr<::System::System > system)
void set_from_vector_like(std::vector< int > const &pids, std::string const ¶m_name, Container const &values, Context *context, std::shared_ptr< CellSystem::CellSystem > cell_structure, std::shared_ptr< Interactions::BondedInteractions > bonded_ias)
auto get_particles_properties(std::vector< int > const &pids, std::function< T(Particle const &)> const &getter, Context *context, CellStructure const &cell_structure)
void gather_buffer(std::vector< T, Allocator > &buffer, boost::mpi::communicator const &comm, int root=0)
Gather buffer with different size on each node.
static auto & get_cell_structure()
Struct holding all information for one particle.