ppap4lmp  0.7.2
AddGyrationRadius Class Reference

AddGyrationRadius adds gyration radius to an Element object. More...

#include <add_gyration_radius.h>

Inheritance diagram for AddGyrationRadius:
Collaboration diagram for AddGyrationRadius:

Public Member Functions

ShPtr< AddGyrationRadiuswith_sqrted (bool add_sqrted_=true)
 Enable to compute gyration radius (by default, only square of gyration radius is computed). More...
 
- Public Member Functions inherited from Adder
 Updater ()=default
 Constructor of Updater class. More...
 
- Public Member Functions inherited from Updater
 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...
 
- Protected Member Functions inherited from Adder
virtual void compute_body (const ElPtr &elem, Json &data) override
 Compute properties and add them to Element::data given as a mutable reference. More...
 
- Protected Member Functions inherited from Updater
virtual void compute_common (const ElPtr &elem, Json &data)
 Common part of compute_body. More...
 

Private Attributes

bool add_sqrted = false
 

Additional Inherited Members

- Protected Attributes inherited from Updater
ShPtr< Generatorext_generator
 

Detailed Description

AddGyrationRadius adds gyration radius to an Element object.

This class computes radius of gyration of an Element object (such as one containing data for molecules) from its inertia moment.

About usage in Python, please see pybind::py_add_gyration_radius.

Definition at line 23 of file add_gyration_radius.h.

Member Function Documentation

◆ compute_impl()

void AddGyrationRadius::compute_impl ( Json data,
JsonToVoidFunc  check_required_keys,
JsonToBoolFunc  check_optional_keys 
)
overrideprotectedvirtual

This method overrides Updater::compute_impl.

Property to be added
  • Rg^2 : float
  • Rg^2(y+z) : float
  • Rg^2(z+x) : float
  • Rg^2(x+y) : float
  • Rg^2(x) : float
  • Rg^2(y) : float
  • Rg^2(z) : float
  • Rg : float (optional)
  • Rg(y+z) : float (optional)
  • Rg(z+x) : float (optional)
  • Rg(x+y) : float (optional)
  • Rg(x) : float (optional)
  • Rg(y) : float (optional)
  • Rg(z) : float (optional)
Required property
  • mass : float
  • I_xx : float
  • I_yy : float
  • I_zz : float

Implements Updater.

Definition at line 13 of file add_gyration_radius.cpp.

◆ with_sqrted()

ShPtr< AddGyrationRadius > AddGyrationRadius::with_sqrted ( bool  add_sqrted_ = true)

Enable to compute gyration radius (by default, only square of gyration radius is computed).

Parameters
add_sqrted_A boolean, whether gyration radius is computed or not (default is true).
Returns
Shared pointer to this object.

Please be careful not to call this method in a multithreading context because it is thread-unsafe.

Definition at line 53 of file add_gyration_radius.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ add_sqrted

bool AddGyrationRadius::add_sqrted = false
private

Whether gyration radius (not squared) is computed (default is false). Note that an average gyration radius should be computed by square rooting an averaged square of the gyration radius, not averaging the gyration radius itself.

Definition at line 30 of file add_gyration_radius.h.


The documentation for this class was generated from the following files: