21#ifndef VOTCA_XTP_STOCHASTICNETWORK_H
22#define VOTCA_XTP_STOCHASTICNETWORK_H
54 ModelRandom(std::uint64_t seed, std::uint64_t stream);
57 return (
double(
engine_() >> 11) + 1.0) * (1.0 / 9007199254740992.0);
78 const std::vector<Eigen::Vector3d>& points);
80 Eigen::Vector3d
Connection(
const Eigen::Vector3d& r1,
81 const Eigen::Vector3d& r2)
const;
84 void Within(
const Eigen::Vector3d& p,
double radius,
85 const std::function<
void(
Index,
const Eigen::Vector3d&,
double)>&
91 std::vector<Index>
NearestTo(
const Eigen::Vector3d& p,
Index l)
const;
96 std::array<Index, 3>
n_;
98 const std::vector<Eigen::Vector3d>&
points_;
101 Index CellIndex(
const Eigen::Vector3d& p, std::array<Index, 3>& c)
const;
103 void Shell(
const std::array<Index, 3>& c,
Index s,
F&& f)
const;
194 Eigen::Vector3d
box = Eigen::Vector3d::Zero();
233 std::vector<double>
J2;
246 static std::string
ToXML(
const Options& opt);
251 const EnergyModel& m,
Index sites,
252 const std::vector<double>& A,
253 const std::vector<double>& Bf,
254 const std::vector<double>& C);
259 std::vector<Eigen::Vector3d>& positions,
260 std::vector<double>& radii);
264 static double Residual(
const CouplingModel& m,
double g);
266 static double Log10J2(
const CouplingModel& m,
double r,
double g);
Platform independent random numbers for the stochastic models: mt19937_64 with self-written transform...
Index Poisson(double mean)
Poisson distributed count.
Index Integer(Index n)
integer in [0, n)
ModelRandom(std::uint64_t seed, std::uint64_t stream)
independent streams for the same seed (points, energies, pairs)
Periodic orthorhombic cell list for neighbour searches.
std::array< Index, 3 > n_
PeriodicCells(const Eigen::Vector3d &box, double radius, const std::vector< Eigen::Vector3d > &points)
box lengths and the largest search radius used with Within()
std::vector< Index > NearestTo(const Eigen::Vector3d &p, Index l) const
indices of the l points nearest to any position p
Index NumberOfPoints() const
Index CellIndex(const Eigen::Vector3d &p, std::array< Index, 3 > &c) const
std::vector< Index > start_
std::vector< Index > members_
void Shell(const std::array< Index, 3 > &c, Index s, F &&f) const
Eigen::Vector3d Connection(const Eigen::Vector3d &r1, const Eigen::Vector3d &r2) const
shortest periodic connection r2 - r1
void Within(const Eigen::Vector3d &p, double radius, const std::function< void(Index, const Eigen::Vector3d &, double)> &f) const
std::vector< Index > Nearest(Index i, Index l) const
const std::vector< Eigen::Vector3d > & points_
StochasticNetwork(const Options &opt)
static Index SamplePoints(const PointProcess &pp, const Eigen::Vector3d &box, Index sites, ModelRandom &random, std::vector< Eigen::Vector3d > &positions, std::vector< double > &radii)
void BuildTopology(Topology &top) const
fill an empty topology (segments with one pseudo atom, box, pairs)
const std::vector< double > & Radii() const
radii of the point process (r_h + X)
std::vector< InsertedTrap > inserted_
std::vector< std::vector< double > > energies_
std::vector< Eigen::Vector3d > positions_
void GenerateEnergies(ModelRandom &random)
static std::vector< double > MovingAverage(const PeriodicCells &cells, const EnergyModel &m, Index sites, const std::vector< double > &A, const std::vector< double > &Bf, const std::vector< double > &C)
double Connection(double r) const
connection probability at distance r (bohr)
const std::vector< double > & SiteEnergies(Index c) const
site energies of carrier c (index into Options::carriers)
static double Log10J2(const CouplingModel &m, double r, double g)
log10(J^2/eV^2) for distance r (bohr) and standard normal g
Index Iterations() const
iterations the point process needed
std::vector< Pair > pairs_
static std::string ToXML(const Options &opt)
the parameter file (root element "stochasticnetwork")
const std::vector< Eigen::Vector3d > & Positions() const
void InsertTraps(ModelRandom &random)
const std::vector< InsertedTrap > & Traps() const
const std::vector< Pair > & Pairs() const
std::vector< double > radii_
static double Residual(const CouplingModel &m, double g)
standardized residual for a standard normal g
void GeneratePairs(ModelRandom &random)
Index NumberOfSites() const
static Options FromProperty(const tools::Property &p)
Container for segments and box and atoms.
Charge transport classes.
Provides a means for comparing floating point numbers.
std::vector< double > residual_quantiles
inserted traps: template index and sites (deepest first)
std::vector< Index > sites
double energy_correlation
double coupling_correlation
std::vector< Trap > traps
trap templates, inserted after the Gaussian energies
std::vector< double > connection_r
connection probability table: f at distances r (ascending, bohr)
double trap_factor
multiplies all trap densities (0: no traps)
std::vector< Carrier > carriers
std::vector< double > connection_p
double candidates
candidates per iteration in units of the number of sites
std::vector< std::vector< double > > offsets
offsets[k][c]: site k (deepest first), carrier c, Hartree