ppap4lmp  0.7.2
add_gyration_radius.h
Go to the documentation of this file.
1 
9 #ifndef ADD_GYRATION_RADIUS_H
10 #define ADD_GYRATION_RADIUS_H
11 
12 #include <adders/adder.h>
13 
23 class AddGyrationRadius : public Adder {
30  bool add_sqrted = false;
31  protected:
65  virtual void compute_impl(
66  Json &data,
67  JsonToVoidFunc check_required_keys,
68  JsonToBoolFunc check_optional_keys) override;
69  public:
70  using Adder::Adder;
71  virtual ~AddGyrationRadius() = default;
88  bool add_sqrted_ = true);
89 };
90 
91 #endif
virtual void compute_impl(Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
This method overrides Updater::compute_impl.
Adder adds new properties to a non-empty Element object.
Definition: adder.h:24
std::function< bool(const Json &)> JsonToBoolFunc
An alias for a function accepts a Json object and returns a bool.
Definition: updater.h:20
ShPtr< AddGyrationRadius > with_sqrted(bool add_sqrted_=true)
Enable to compute gyration radius (by default, only square of gyration radius is computed).
nlohmann::json Json
Json is an alias for nlohmann::json.
Definition: json.h:22
AddGyrationRadius adds gyration radius to an Element object.
This file has a definition of Adder class, which is a subclass of Updater class.
std::function< void(const Json &)> JsonToVoidFunc
An alias for a function accepts a Json object.
Definition: updater.h:18
std::shared_ptr< T > ShPtr
ShPtr is an alias for shared pointer.
Definition: std.h:16