ppap4lmp
0.7.2
|
AddCoMPosition adds center of mass to an Element object as its unwrapped position. More...
#include <add_com_position.h>
Public Member Functions | |
AddCoMPosition (const ElPtr &elem) | |
Constructor of AddCoMPosition class. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
void | compute (const ElPtr &elem, const int elementid, Json &data) |
Managing computation to update Element::data. More... | |
void | remove_from_skippable_elementids (const int elementid) |
Remove Element::elementid from skippable_elementids. More... | |
const ShPtr< Generator > & | get_ext_generator () |
Get ext_generator of this object. More... | |
Protected Member Functions | |
virtual void | compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override |
This method overrides Updater::compute_impl. More... | |
![]() | |
virtual void | compute_body (const ElPtr &elem, Json &data) override |
Compute properties and add them to Element::data given as a mutable reference. More... | |
![]() | |
virtual void | compute_common (const ElPtr &elem, Json &data) |
Common part of compute_body. More... | |
Additional Inherited Members | |
![]() | |
ShPtr< Generator > | ext_generator |
AddCoMPosition adds center of mass to an Element object as its unwrapped position.
An object of this class computes center of mass of a parent Element object from unwrapped positions for a child Element object, and adds it to the parent object as its unwrapped position. The object of this class owns the child object as ext_generator, and is appended to the parent object using its Element::append_updater. An example of child is an Element object containing data for atoms, and an example of parent is an Element object containing data for molecules.
The terms child and parent are used because a parent object consists of a child object. In terms of time series, however, the child is created earlier than the parent.
About usage in Python, please see pybind::py_add_com_position.
Definition at line 35 of file add_com_position.h.
AddCoMPosition::AddCoMPosition | ( | const ElPtr & | elem | ) |
Constructor of AddCoMPosition class.
elem | A child Element object. This parameter is assigned to ext_generator.
|
Definition at line 16 of file add_com_position.cpp.
|
overrideprotectedvirtual |
This method overrides Updater::compute_impl.
mass
: floatxu
: floatyu
: floatzu
: float atom-ids
: array of integersatom-weights
: array of floats (optional) Implements Updater.
Definition at line 24 of file add_com_position.cpp.