ppap4lmp
0.7.2
|
AddChildPositions adds relative positions of a child Element object to a parent Element object. More...
#include <add_child_positions.h>
Public Member Functions | |
AddChildPositions (const ElPtr &elem, const Str &child_name_) | |
Constructor of AddChildPositions 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... | |
Private Attributes | |
Str | child_name |
Additional Inherited Members | |
![]() | |
ShPtr< Generator > | ext_generator |
AddChildPositions adds relative positions of a child Element object to a parent Element object.
An object of this class owns a child object as ext_generator, and is appended to a parent object using its Element::append_updater. The object of this class computes positions for the child object relative to a position for the parent object, and tehn appends them to an array belonging to the parent object. 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_child_positions.
Definition at line 34 of file add_child_positions.h.
Constructor of AddChildPositions class.
elem | A child Element object. This parameter is assigned to ext_generator.
|
child_name_ | A string for naming the child object. This parameter is assigned to child_name. |
Definition at line 17 of file add_child_positions.cpp.
|
overrideprotectedvirtual |
This method overrides Updater::compute_impl.
[child_name]-xs
: array of floats[child_name]-ys
: array of floats[child_name]-zs
: array of floats [child_name]-ids
: array of integersxu
: floatyu
: floatzu
: float Implements Updater.
Definition at line 27 of file add_child_positions.cpp.
|
private |
Name of child object stored as ext_generator. Key for property added to a parent object by this class is named as [child_name]-xs
, [child_name]-ys
and [child_name]-zs
. The parent object is also required to have [child_name]-ids
property.
Definition at line 42 of file add_child_positions.h.