115 std::vector<int> m_id_selection;
117 std::weak_ptr<CellSystem::CellSystem> m_cell_structure;
118 std::weak_ptr<Interactions::BondedInteractions> m_bonded_ias;
119 std::weak_ptr<::System::System> m_system;
122 std::set<std::string_view>
const m_special_parameters{
123 "pos",
"type",
"bonds",
124#ifdef ESPRESSO_ELECTROSTATICS
127#ifdef ESPRESSO_EXCLUSIONS
133 auto cell_structure_ptr = m_cell_structure.lock();
134 assert(cell_structure_ptr !=
nullptr);
135 auto &cell_structure = cell_structure_ptr->get_cell_structure();
136 return &cell_structure;
139 auto get_system()
const {
140 auto ptr = m_system.lock();
141 assert(ptr !=
nullptr);
148 {
"chunk_size", AutoParameter::read_only,
149 [
this]() {
return m_chunk_size; }},
150 {
"id_selection", AutoParameter::read_only,
151 [
this]() {
return m_id_selection; }},
155 void do_construct(
VariantMap const ¶ms)
override;
157 Variant do_call_method(std::string
const &name,
160 void attach(std::weak_ptr<::System::System> system) {
161 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)
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.
void operator()(std::vector< int > const &, std::string const &, auto const &values, Context *, std::shared_ptr< CellSystem::CellSystem >, std::shared_ptr< Interactions::BondedInteractions >) const
void operator()(std::vector< int > const &pids, std::string const ¶m_name, std::vector< T > const &values, Context *context, std::shared_ptr< CellSystem::CellSystem > cell_structure, std::shared_ptr< Interactions::BondedInteractions > bonded_ias) const