votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::StochasticNetwork Class Reference

Stochastic network model of a molecular charge transport network (Baumeier, Stenzel, Poelking, Andrienko, Schmidt, Phys. Rev. B 86, 184202 (2012); Kordt et al., J. Chem. Theory Comput. 10, 2508 (2014)): a random weighted graph with the statistics of a microscopic (atomistic) system, in a periodic box of any size. More...

#include <stochasticnetwork.h>

Collaboration diagram for votca::xtp::StochasticNetwork:

Classes

struct  PointProcess
struct  EnergyModel
struct  CouplingModel
struct  Carrier
struct  Trap
struct  Options
struct  InsertedTrap
 inserted traps: template index and sites (deepest first) More...
struct  Pair

Public Member Functions

 StochasticNetwork (const Options &opt)
Index NumberOfSites () const
const std::vector< Eigen::Vector3d > & Positions () const
const std::vector< double > & Radii () const
 radii of the point process (r_h + X)
const std::vector< InsertedTrap > & Traps () const
const std::vector< double > & SiteEnergies (Index c) const
 site energies of carrier c (index into Options::carriers)
const std::vector< Pair > & Pairs () const
Index Iterations () const
 iterations the point process needed
void BuildTopology (Topology &top) const
 fill an empty topology (segments with one pseudo atom, box, pairs)
double Connection (double r) const
 connection probability at distance r (bohr)

Static Public Member Functions

static Options FromProperty (const tools::Property &p)
static std::string ToXML (const Options &opt)
 the parameter file (root element "stochasticnetwork")
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)
static Index SamplePoints (const PointProcess &pp, const Eigen::Vector3d &box, Index sites, ModelRandom &random, std::vector< Eigen::Vector3d > &positions, std::vector< double > &radii)
static double Residual (const CouplingModel &m, double g)
 standardized residual for a standard normal g
static double Log10J2 (const CouplingModel &m, double r, double g)
 log10(J^2/eV^2) for distance r (bohr) and standard normal g

Private Member Functions

void Check () const
void GenerateEnergies (ModelRandom &random)
void GeneratePairs (ModelRandom &random)
void InsertTraps (ModelRandom &random)

Private Attributes

Options opt_
std::vector< Eigen::Vector3d > positions_
std::vector< double > radii_
std::vector< std::vector< double > > energies_
std::vector< Pair > pairs_
Index iterations_ = 0
std::vector< InsertedTrap > inserted_

Detailed Description

Stochastic network model of a molecular charge transport network (Baumeier, Stenzel, Poelking, Andrienko, Schmidt, Phys. Rev. B 86, 184202 (2012); Kordt et al., J. Chem. Theory Comput. 10, 2508 (2014)): a random weighted graph with the statistics of a microscopic (atomistic) system, in a periodic box of any size.

  • Sites: iterative dominance-competition point process. Poisson points get radii R = r_h + X with X Gamma distributed (by inversion); a point inside the sphere of a point with a larger radius is removed (all points of an iteration count); later iterations fill the remaining space without violating the spheres of accepted points, until the number of sites is reached.
  • Site energies per carrier: moving average of three Gaussian fields, E_i = mean + sigma (sqrt(w_a) A_i + sqrt(w_b/l_b) sum_{N_b(i)} B_j + sqrt(w_c/l_c) sum_{N_c(i)} C_j), N_l(i) the l sites nearest to i, i itself included, w_c = 1 - w_a - w_b. A second carrier can be correlated with the first: z_2 = rho z_1 + sqrt(1 - rho^2) w with w a moving average with the second carrier's parameters.
  • Pairs: two sites at distance r are connected with probability f(r) (table, linear interpolation).
  • Couplings: log10(J^2 / eV^2) = m(r) + s(r) Q(u), with m and s^2 linear in r and Q the quantile function of the standardized residuals (table; a standard normal if empty), u = Phi(g) for a standard normal g; g of two carriers correlated with coefficient rho_J (Gaussian copula).
  • Reorganization and internal energies per carrier: constants.
  • Traps (optional): templates of trap sites or clusters from a microscopic system (TrapFinder) are inserted with a density per site: floor(density N) + Bernoulli(rest) traps of each template, each at a random free site and its nearest free sites, whose energies (all carriers) are set to the bulk mean plus the template offsets.

Options are in atomic units (bohr, Hartree) except the coupling model, which is in log10(J^2 / eV^2) per nm as in the papers.

Definition at line 142 of file stochasticnetwork.h.

Constructor & Destructor Documentation

◆ StochasticNetwork()

votca::xtp::StochasticNetwork::StochasticNetwork ( const Options & opt)
explicit

Definition at line 271 of file stochasticnetwork.cc.

Member Function Documentation

◆ BuildTopology()

void votca::xtp::StochasticNetwork::BuildTopology ( Topology & top) const

fill an empty topology (segments with one pseudo atom, box, pairs)

Definition at line 731 of file stochasticnetwork.cc.

◆ Check()

void votca::xtp::StochasticNetwork::Check ( ) const
private

Definition at line 289 of file stochasticnetwork.cc.

◆ Connection()

double votca::xtp::StochasticNetwork::Connection ( double r) const

connection probability at distance r (bohr)

Definition at line 576 of file stochasticnetwork.cc.

◆ FromProperty()

StochasticNetwork::Options votca::xtp::StochasticNetwork::FromProperty ( const tools::Property & p)
static

options from a parameter file written by networkfit (units nm, eV); sites and box are left as in the file and can be overwritten

Definition at line 763 of file stochasticnetwork.cc.

◆ GenerateEnergies()

void votca::xtp::StochasticNetwork::GenerateEnergies ( ModelRandom & random)
private

Definition at line 540 of file stochasticnetwork.cc.

◆ GeneratePairs()

void votca::xtp::StochasticNetwork::GeneratePairs ( ModelRandom & random)
private

Definition at line 680 of file stochasticnetwork.cc.

◆ InsertTraps()

void votca::xtp::StochasticNetwork::InsertTraps ( ModelRandom & random)
private

Definition at line 633 of file stochasticnetwork.cc.

◆ Iterations()

Index votca::xtp::StochasticNetwork::Iterations ( ) const
inline

iterations the point process needed

Definition at line 237 of file stochasticnetwork.h.

◆ Log10J2()

double votca::xtp::StochasticNetwork::Log10J2 ( const CouplingModel & m,
double r,
double g )
static

log10(J^2/eV^2) for distance r (bohr) and standard normal g

Definition at line 626 of file stochasticnetwork.cc.

◆ MovingAverage()

std::vector< double > votca::xtp::StochasticNetwork::MovingAverage ( const PeriodicCells & cells,
const EnergyModel & m,
Index sites,
const std::vector< double > & A,
const std::vector< double > & Bf,
const std::vector< double > & C )
static

standardized moving average z_i (unit variance) of the standard normal fields A, B, C (one value per site); E_i = mean + sigma z_i

Definition at line 507 of file stochasticnetwork.cc.

◆ NumberOfSites()

Index votca::xtp::StochasticNetwork::NumberOfSites ( ) const
inline

Definition at line 215 of file stochasticnetwork.h.

◆ Pairs()

const std::vector< Pair > & votca::xtp::StochasticNetwork::Pairs ( ) const
inline

Definition at line 235 of file stochasticnetwork.h.

◆ Positions()

const std::vector< Eigen::Vector3d > & votca::xtp::StochasticNetwork::Positions ( ) const
inline

Definition at line 216 of file stochasticnetwork.h.

◆ Radii()

const std::vector< double > & votca::xtp::StochasticNetwork::Radii ( ) const
inline

radii of the point process (r_h + X)

Definition at line 218 of file stochasticnetwork.h.

◆ Residual()

double votca::xtp::StochasticNetwork::Residual ( const CouplingModel & m,
double g )
static

standardized residual for a standard normal g

Definition at line 598 of file stochasticnetwork.cc.

◆ SamplePoints()

Index votca::xtp::StochasticNetwork::SamplePoints ( const PointProcess & pp,
const Eigen::Vector3d & box,
Index sites,
ModelRandom & random,
std::vector< Eigen::Vector3d > & positions,
std::vector< double > & radii )
static

one realization of the point process (as used by the constructor); returns the number of iterations, throws if the box is saturated

Definition at line 376 of file stochasticnetwork.cc.

◆ SiteEnergies()

const std::vector< double > & votca::xtp::StochasticNetwork::SiteEnergies ( Index c) const
inline

site energies of carrier c (index into Options::carriers)

Definition at line 226 of file stochasticnetwork.h.

◆ ToXML()

std::string votca::xtp::StochasticNetwork::ToXML ( const Options & opt)
static

the parameter file (root element "stochasticnetwork")

Definition at line 851 of file stochasticnetwork.cc.

◆ Traps()

const std::vector< InsertedTrap > & votca::xtp::StochasticNetwork::Traps ( ) const
inline

Definition at line 224 of file stochasticnetwork.h.

Member Data Documentation

◆ energies_

std::vector<std::vector<double> > votca::xtp::StochasticNetwork::energies_
private

Definition at line 272 of file stochasticnetwork.h.

◆ inserted_

std::vector<InsertedTrap> votca::xtp::StochasticNetwork::inserted_
private

Definition at line 275 of file stochasticnetwork.h.

◆ iterations_

Index votca::xtp::StochasticNetwork::iterations_ = 0
private

Definition at line 274 of file stochasticnetwork.h.

◆ opt_

Options votca::xtp::StochasticNetwork::opt_
private

Definition at line 269 of file stochasticnetwork.h.

◆ pairs_

std::vector<Pair> votca::xtp::StochasticNetwork::pairs_
private

Definition at line 273 of file stochasticnetwork.h.

◆ positions_

std::vector<Eigen::Vector3d> votca::xtp::StochasticNetwork::positions_
private

Definition at line 270 of file stochasticnetwork.h.

◆ radii_

std::vector<double> votca::xtp::StochasticNetwork::radii_
private

Definition at line 271 of file stochasticnetwork.h.


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