ppap4lmp  0.7.2
ProRadialDistributionFunctionWithDeformation Class Reference

ProRadialDistributionFunctionWithDeformation computes radial distribution function (RDF) taking deformation of particles into consideration. More...

#include <pro_radial_distribution_function_with_deformation.h>

Inheritance diagram for ProRadialDistributionFunctionWithDeformation:
Collaboration diagram for ProRadialDistributionFunctionWithDeformation:

Public Member Functions

virtual void prepare () override
 Call ProRDF::prepare and then resize raw_counts_traj, Rg2_sum_traj, Rg2_para_sum_traj and Rg2_perp_sum_traj. More...
 
virtual void finish () override
 Call ProRDF::finish and then compute Rg2_array, Rg2_para_array, Rg2_perp_array, Rg2_array_traj, Rg2_para_array_traj and Rg2_perp_array_traj from raw_counts_traj, Rg2_sum_traj, Rg2_para_sum_traj and Rg2_perp_sum_traj. More...
 
void set_margin (double margin_)
 Set margin for distance from a reference particle: this program uses a sample including particles of which distance from a reference particle are less than the maximum distance in a domain, where the radial distribution function is computed, plus* the margin. More...
 
Map< Str, ArrayXdget_gyration_radius ()
 Get averaged gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are functions for general gyration radius, gyration radius in the particle-to-particle axis and gyration radius around the particle-to-particle axis, respectively. More...
 
Map< Str, Vec< ArrayXd > > get_gyration_radius_traj ()
 Get list of temporary gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation. More...
 
Map< Str, ArrayXdget_squared_gyration_radius ()
 Get averaged square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are function for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. More...
 
Map< Str, Vec< ArrayXd > > get_squared_gyration_radius_traj ()
 Get list of temporary square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation. More...
 
- Public Member Functions inherited from ProRadialDistributionFunction
 ProRadialDistributionFunction (const ElPtr &targets, const ElPtr &box)
 Constructor of ProRadialDistributionFunction class for a snapshot of simulation. More...
 
 ProRadialDistributionFunction (const Vec< std::pair< ElPtr, ElPtr >> &pairs)
 Constructor of ProThicknessProfile class for multiple snapshots of simulation. More...
 
void set_bin (double bin_width_, int n_bins_)
 Set width and number of bins in the distance axis. Each bin is a spherical shell of which center is positioned at a reference particle. More...
 
void bin_from_r_to_r_plus_dr (bool bin_from_r_=true)
 By default, the bins are [0, 0.5*dr), [0.5*dr, 1.5*dr), ... . If this method is called without a parameter, the bins are set as [0, dr), [dr, 2*dr), ... . More...
 
void beyond_half_box_length (bool beyond_half_=true)
 Use a sample including particles of which distance from a reference particle are larger than half the simulation box length. More...
 
const ArrayXd get_r_axis ()
 Get a one-dimensional array of distance, [0, dr, 2*dr, ... ], where dr is width of a bin. More...
 
const ArrayXdget_rdf ()
 Get the radial distribution function as a one-dimensional array. More...
 
const Vec< ArrayXd > & get_rdf_traj ()
 Get a sequence of radial distribution functions as list of one-dimensional arrays. More...
 
- Public Member Functions inherited from Processor
 Processor ()=default
 Constructor of Processor class (default).
 
virtual bool run ()
 Run analysis using i th Generator object in generators, where i = i_generator. More...
 
void startup ()
 Startup this Processor object. More...
 

Protected Member Functions

virtual void run_impl (const int index) override
 Implementation of analysis using an element of generators. More...
 
- Protected Member Functions inherited from Processor
template<class GEN >
void register_generator (const ShPtr< GEN > &gen)
 
template<class GEN >
void register_generators (const Vec< ShPtr< GEN >> &gens)
 
virtual void use_generator_at (const int i)
 Call Generator::generate_data of i th Generator object in generators. More...
 
virtual void finish_using_generator_at (const int i)
 Call Generator::finish_using_generated_data of i* th Generator object in generators. More...
 

Private Attributes

double margin = 1.0
 
ArrayXd Rg2_array
 
ArrayXd Rg2_para_array
 
ArrayXd Rg2_perp_array
 
Vec< ArrayXdRg2_array_traj
 
Vec< ArrayXdRg2_para_array_traj
 
Vec< ArrayXdRg2_perp_array_traj
 
Vec< ArrayXiraw_counts_traj
 
Vec< ArrayXdRg2_sum_traj
 
Vec< ArrayXdRg2_para_sum_traj
 
Vec< ArrayXdRg2_perp_sum_traj
 

Additional Inherited Members

- Protected Attributes inherited from ProRadialDistributionFunction
int n_bins = 1
 
double bin_width = 1.0
 
bool bin_from_r = false
 
bool beyond_half = false
 
ArrayXd rdf
 
Vec< ArrayXdrdf_traj
 
Vec< int > number_traj
 
Vec< double > volume_traj
 
Vec< ArrayXicounts_traj
 
- Protected Attributes inherited from Processor
int n_generators
 
Vec< ShPtr< Generator > > generators
 

Detailed Description

ProRadialDistributionFunctionWithDeformation computes radial distribution function (RDF) taking deformation of particles into consideration.

Deformation is guessed using gyration radius in perpendicular and parallel directions of the point-to-point vector.

An object of this class makes a one-dimensional array of radial distribution function with deformation of volumetric particles such as beads and molecules. This type of radial distribution function is different from original radial distribution function in terms of distance between two particles. The distance is modified taking deformation of the particles into consideration. Deformation of the particle is estimated using gyration radius in a parallel direction of the particle-to-particle vector. This gyration radius can be computed by subtracting gyration radius around the particle-to-particle axis from general gyration radius. Difference between the gyration radius in the particle-to-particle axis and the general gyration radius is added to the distance.

The above mentioned three types of gyration radius, that is, general gyration radius, gyration radius around* the particle-to-particle axis, and gyration radius in* the particle-to-particle vector are also stored as functions of distance r, where r is distance from a reference particle without* modification.

List of radial distribution functions and lists of functions for three types of gyration radius are also computed for a multiple snapshots of a simulation.

Note that a particle which is one of special bonds of a reference particle is excluded from a sample used for computing radial distribution function. About special bonds, please see AddSpecialBonds class.

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

Definition at line 58 of file pro_radial_distribution_function_with_deformation.h.

Member Function Documentation

◆ finish()

void ProRDFWD::finish ( )
overridevirtual

Call ProRDF::finish and then compute Rg2_array, Rg2_para_array, Rg2_perp_array, Rg2_array_traj, Rg2_para_array_traj and Rg2_perp_array_traj from raw_counts_traj, Rg2_sum_traj, Rg2_para_sum_traj and Rg2_perp_sum_traj.

Returns
None.

Note that Rg2_array (Rg2_para_array/Rg2_perp_array) and an average over elements in Rg2_array_traj (Rg2_para_array/Rg2_perp_array_traj) are identical only when volume of the simulation box and the number of particles are unchanged during the simulation.

Reimplemented from ProRadialDistributionFunction.

Definition at line 238 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the call graph for this function:

◆ get_gyration_radius()

Map< Str, ArrayXd > ProRDFWD::get_gyration_radius ( )

Get averaged gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are functions for general gyration radius, gyration radius in the particle-to-particle axis and gyration radius around the particle-to-particle axis, respectively.

Returns
Dictionary consisting of square rooted Rg2_array, Rg2_para_array and Rg2_perp_array.

Definition at line 305 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the caller graph for this function:

◆ get_gyration_radius_traj()

Map< Str, Vec< ArrayXd > > ProRDFWD::get_gyration_radius_traj ( )

Get list of temporary gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation.

Returns
Dictionary consisting of list created by square rooting each element of Rg2_array_traj, Rg2_para_array_traj and Rg2_perp_array_traj.

Definition at line 315 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the caller graph for this function:

◆ get_squared_gyration_radius()

Map< Str, ArrayXd > ProRDFWD::get_squared_gyration_radius ( )

Get averaged square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are function for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively.

Returns
Dictionary consisting of Rg2_array, Rg2_para_array and Rg2_perp_array.

Definition at line 345 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the caller graph for this function:

◆ get_squared_gyration_radius_traj()

Map< Str, Vec< ArrayXd > > ProRDFWD::get_squared_gyration_radius_traj ( )

Get list of temporary square of gyration radius as function of distance from a reference particle. The returned value is dictionary of which keys are isotropic, parallel and perpendicular, and corresponding values are lists of functions for general gyration radius, gyration radius in* the particle-to-particle axis and gyration radius around* the particle-to-particle axis, respectively. Each element of the lists corresponds to each snapshot of the simulation.

Returns
Dictionary consisting of Rg2_array_traj, Rg2_para_array_traj and Rg2_perp_array_traj.

Definition at line 355 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the caller graph for this function:

◆ prepare()

void ProRDFWD::prepare ( )
overridevirtual

Call ProRDF::prepare and then resize raw_counts_traj, Rg2_sum_traj, Rg2_para_sum_traj and Rg2_perp_sum_traj.

Returns
None.

Reimplemented from ProRadialDistributionFunction.

Definition at line 226 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the call graph for this function:

◆ run_impl()

void ProRDFWD::run_impl ( const int  index)
overrideprotectedvirtual

Implementation of analysis using an element of generators.

Parameters
indexAn index in generators for a Generator object to be analyzed.
Returns
None.

To be compatible with multithreading computation, class members should not be modified in this method. If modification of some members is necessary, please consider defining them as Vec, and modifying only their i th element, where i = index.

I am sorry to say that the best documentation for this method is its source code...

Reimplemented from ProRadialDistributionFunction.

Definition at line 17 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the call graph for this function:

◆ set_margin()

void ProRDFWD::set_margin ( double  margin_)

Set margin for distance from a reference particle: this program uses a sample including particles of which distance from a reference particle are less than the maximum distance in a domain, where the radial distribution function is computed, plus* the margin.

Parameters
margin_Consider particles up to the maximum distance in the domain plus* this value. This parameter is assigned to margin.
Returns
None.

Definition at line 297 of file pro_radial_distribution_function_with_deformation.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ margin

double ProRadialDistributionFunctionWithDeformation::margin = 1.0
private

Since distance between particles can be changed by modification, particles of which original distances from a reference particle are larger than the maximum distance in a domain, where the radial distribution function is computed, might be counted. This program uses a sample including particles up to the maximum distance plus this member.

Definition at line 67 of file pro_radial_distribution_function_with_deformation.h.

◆ raw_counts_traj

Vec<ArrayXi> ProRadialDistributionFunctionWithDeformation::raw_counts_traj
private

List consisting of temporary numbers of particles in a spherical shell with radius of r, where r is distance from a reference particle without modification. Indices in this list corresponds those in generators.

Definition at line 112 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_array

ArrayXd ProRadialDistributionFunctionWithDeformation::Rg2_array
private

Averaged square of general gyration radius as a function of distance from a reference particle.

Definition at line 72 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_array_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_array_traj
private

List consisting of temporary averaged square of general gyration radius as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 91 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_para_array

ArrayXd ProRadialDistributionFunctionWithDeformation::Rg2_para_array
private

Averaged square of gyration radius in* the particle-to-particle axis as a function of distance from a reference particle.

Definition at line 78 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_para_array_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_para_array_traj
private

List consisting of temporary averaged square of gyration radius in* the particle-to-particle axis as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 98 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_para_sum_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_para_sum_traj
private

List consisting of temporary sum of square of gyration radius in* the particle-to-particle axis as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 126 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_perp_array

ArrayXd ProRadialDistributionFunctionWithDeformation::Rg2_perp_array
private

Averaged square of gyration radius around* the particle-to-particle axis as a function of distance from a reference particle.

Definition at line 84 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_perp_array_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_perp_array_traj
private

List consisting of temporary averaged square of gyration radius around* the particle-to-particle axis as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 105 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_perp_sum_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_perp_sum_traj
private

List consisting of temporary sum of square of gyration radius around* the particle-to-particle axis as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 133 of file pro_radial_distribution_function_with_deformation.h.

◆ Rg2_sum_traj

Vec<ArrayXd> ProRadialDistributionFunctionWithDeformation::Rg2_sum_traj
private

List consisting of temporary sum of square of general gyration radius as a function of distance from a reference particle. Indices in this list corresponds those in generators.

Definition at line 119 of file pro_radial_distribution_function_with_deformation.h.


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