ppap4lmp  0.7.2
pro_distance_in_molecule.h
Go to the documentation of this file.
1 
9 #ifndef PRO_DISTANCE_IN_MOLECULE_H
10 #define PRO_DISTANCE_IN_MOLECULE_H
11 
12 #include <processors/processor.h>
13 
32  int index1_in_mol = 0;
38  int index2_in_mol = 0;
45  int target_moltype = 1;
58  protected:
65  virtual void run_impl(
66  const int index) override;
67  public:
102  const ElPtr &mols,
103  const ElPtr &atoms);
136  const Vec<std::pair<ElPtr,ElPtr>> &pairs);
137  virtual ~ProDistanceInMolecule() = default;
142  virtual void prepare() override;
151  virtual void finish() override;
171  void set_indices(
172  int index1_in_mol_,
173  int index2_in_mol_);
187  void set_moltype(
188  int target_moltype_);
205  const ArrayXXd &get_distance2_array();
206 };
207 
208 #endif
ArrayXXd get_distance_array()
Get computed distances between two atoms in each molecule as a two-dimensional array: each row corres...
const ArrayXXd & get_distance2_array()
Get computed squared distances between two atoms in each molecule as a two-dimensional array: each ro...
ShPtr< Element > ElPtr
An alias for a shared pointer of Element class.
Definition: element.h:378
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
virtual void finish() override
Fill distance2_array with values of distance2_traj.
ProDistanceInMolecule computes atom-to-atom distance in each molecule (also computes square of the di...
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
Definition: std.h:27
Vec< RowArrayXd > distance2_traj
ProDistanceInMolecule(const ElPtr &mols, const ElPtr &atoms)
Constructor of ProDistanceInMolecule class for a snapshot of simulation.
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.
void set_moltype(int target_moltype_)
Specify a molecular type. Only molecules whose type property is the specified type are analyzed...
void set_indices(int index1_in_mol_, int index2_in_mol_)
Specify two atoms in a molecule by zero-based index. Distance between the two atoms is computed for e...
virtual void prepare() override
Resize distance2_traj.