ppap4lmp  0.7.2
pro_mean_square_displacement.h
Go to the documentation of this file.
1 
9 #ifndef PRO_MEAN_SQUARE_DISPLACEMENT_H
10 #define PRO_MEAN_SQUARE_DISPLACEMENT_H
11 
12 #include <processors/processor.h>
13 
38  bool drift_correction = true;
46  Vec<bool> dimension = {true, true, true};
84  void extract_positions(
85  ArrayXXd &positions,
86  const ElPtr &elem);
87  protected:
94  virtual void run_impl(
95  const int index) override;
96  public:
121  const Vec<ElPtr> &elems);
122  virtual ~ProMeanSquareDisplacement() = default;
127  virtual void prepare() override;
138  virtual void finish() override;
168  void set_dimension(
169  bool include_x,
170  bool include_y,
171  bool include_z);
185  bool without_drift_correction_ = true);
203 };
204 
205 #endif
virtual void run_impl(const int index) override
Implementation of analysis using an element of generators.
void without_drift_correction(bool without_drift_correction_=true)
Disable to correct a drift of center of mass of the simulation system.
void extract_positions(ArrayXXd &positions, const ElPtr &elem)
Extract position vectors from an Element object.
ShPtr< Element > ElPtr
An alias for a shared pointer of Element class.
Definition: element.h:378
ProMeanSquareDisplacement(const Vec< ElPtr > &elems)
Constructor of ProMeanSquareDisplacement class.
Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > ArrayXXd
ArrayXXd is an alias for a two-dimensional array of float numbers.
Definition: eigen.h:32
const ArrayXd & get_mean_square_displacement()
Get time series of the mean square displacement as a one-dimensional array. Each element of the array...
virtual void finish() override
Fill displacement2_array with values of displacement2_traj, and calculate mean_square_displacement by...
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
Definition: std.h:27
void set_dimension(bool include_x, bool include_y, bool include_z)
Specify dimensions to be considered. By default, the mean square displacement is computed in three di...
This file has a definition of Processor class, where an analysis process is programmed.
Processor analyzes data contained in one or more Generator objects.
Definition: processor.h:18
ProMeanSquareDisplacement computes mean square displacement (MSD).
Eigen::Array< double, Eigen::Dynamic, 1 > ArrayXd
ArrayXd is an alias for a column array of float numbers.
Definition: eigen.h:42
const ArrayXXd & get_displacement2_array()
Get computed time series of squared displacements from initial position for each target as a two-dime...
virtual void prepare() override
Set initial positions and resize displacement2_traj.