ppap4lmp  0.7.2
pro_time_correlation_in_molecule.h
Go to the documentation of this file.
1 
9 #ifndef PRO_TIME_CORRELATION_IN_MOLECULE_H
10 #define PRO_TIME_CORRELATION_IN_MOLECULE_H
11 
12 #include <processors/processor.h>
13 
36  int index1_in_mol = 0;
43  int index2_in_mol = 0;
49  int target_moltype = 1;
94  std::function<void(const RowVector3d &)> callback,
95  const ElPtr &el_mols,
96  const ElPtr &el_atoms);
97  protected:
104  virtual void run_impl(
105  const int index) override;
106  public:
139  const Vec<std::pair<ElPtr,ElPtr>> &pairs);
140  virtual ~ProTimeCorrelationInMolecule() = default;
145  virtual void prepare() override;
156  virtual void finish() override;
177  void set_indices(
178  int index1_in_mol_,
179  int index2_in_mol_);
193  void set_moltype(
194  int target_moltype_);
211  const ArrayXd &get_time_correlation();
212 };
213 
214 #endif
Eigen::RowVector3d RowVector3d
RowVector3d is an alias for a 3-elements row vector of Eigen float numbers.
Definition: eigen.h:110
void set_indices(int index1_in_mol_, int index2_in_mol_)
Specify two atoms in a molecule by zero-based index. Time correlation function of a vector between th...
ShPtr< Element > ElPtr
An alias for a shared pointer of Element class.
Definition: element.h:378
void compute_temporary_vectors(std::function< void(const RowVector3d &)> callback, const ElPtr &el_mols, const ElPtr &el_atoms)
Compute intramolecular vectors and conduct customized manipulation using them.
virtual void prepare() override
Set initial vectors and resize coefficients_traj.
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 ArrayXXd & get_coefficients_array()
Get a two-dimensional array containing computed time correlation coefficients of vectors connecting t...
const ArrayXd & get_time_correlation()
Get an averaged time correlation function of atom-to-atom vector; each pair of atoms is in the same m...
virtual void finish() override
Fill coefficients_array with values of coefficients_traj, and calculate time_correlation_function by ...
void set_moltype(int target_moltype_)
Specify a molecular type. Only molecules whose type property is the specified type are analyzed...
ProTimeCorrelationInMolecule(const Vec< std::pair< ElPtr, ElPtr >> &pairs)
Constructor of ProTimeCorrelationInMolecule class.
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
Definition: std.h:27
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
virtual void run_impl(const int index) override
Implementation of analysis using an element of generators.
Eigen::Array< double, Eigen::Dynamic, 1 > ArrayXd
ArrayXd is an alias for a column array of float numbers.
Definition: eigen.h:42
ProTimeCorrelationInMolecule computes time correlation function of atom-to-atom vector in each molecu...