Loading...
Searching...
No Matches
rdf.hpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------
2// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3//
4// Copyright (c) 2018--present d-SEAMS core team
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the MIT License as published by
8// the Open Source Initiative.
9//
10// A copy of the MIT License is included in the LICENSE file of this repository.
11// You should have received a copy of the MIT License along with this program.
12// If not, see <https://opensource.org/licenses/MIT>.
13//-----------------------------------------------------------------------------------
14
15#ifndef SEAMS_RDF_H_
16#define SEAMS_RDF_H_
17
18#include <vector>
19
20#include <mol_sys.hpp>
21
25
30
38namespace rdf {
39
40struct PartialRdf {
41 std::vector<double> r;
42 std::vector<double> g;
43 std::vector<int> count;
44 double rmax{0.0};
45 double binwidth{0.0};
46 double volume{0.0};
47 int typeI{0};
48 int typeJ{0};
49 int nI{0};
50 int nJ{0};
51};
52
55 const molSys::PointCloud<molSys::Point<double>, double> &yCloud, int typeI,
56 int typeJ, double rmax, int nbins);
57
59std::vector<double> runningCN(const PartialRdf &h);
60
62std::vector<double> runningCN(const PartialRdf &h, double rhoJ);
63
66
68double coordinationNumber(const PartialRdf &h, double rMax);
69
71double coordinationNumber(const PartialRdf &h, double rMax, double rhoJ);
72
73} // namespace rdf
74
75#endif // SEAMS_RDF_H_
std::vector< double > runningCN(const PartialRdf &h)
Running CN: 4 pi rho_J int_0^r s^2 g_IJ(s) ds. rho_J = nJ / volume.
PartialRdf partialRdf(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int typeI, int typeJ, double rmax, int nbins)
Histogram I-J pair distances and normalize to the dump-cell ideal gas.
double volume
Definition rdf.hpp:46
int firstMinimumBin(const PartialRdf &h)
First minimum of g after the first maximum. Returns the bin index, or -1.
std::vector< int > count
g_IJ at each bin
Definition rdf.hpp:43
double coordinationNumber(const PartialRdf &h, double rMax)
Site-site CN integrated to rMax. Same kernel as runningCN; no default rMax.
double binwidth
Definition rdf.hpp:45
std::vector< double > g
Bin centres.
Definition rdf.hpp:42
std::vector< double > r
Definition rdf.hpp:41
double rmax
Unordered pair counts.
Definition rdf.hpp:44
The main molecular system handler.
Three-dimensional partial RDF g_IJ(r).
Definition rdf.hpp:38
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:173
This contains per-particle information.
Definition mol_sys.hpp:152