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

#include <ewaldrealspacesum.h>

Collaboration diagram for votca::xtp::EwaldRealSpaceSum:

Classes

struct  NeighborStats
struct  Translation
struct  SearchCounts
struct  PairHash

Public Member Functions

 EwaldRealSpaceSum (const Eigen::Matrix3d &box, const EwaldRegistry &registry, double alpha, double thole_a, double r_min, double field_tol, double shell_width=0.945, Index n_max=15, double screening_factor=6.0, const std::vector< std::pair< Index, Eigen::Vector3d > > &foreground={})
template<enum Estatic CE>
void AddFieldAt (Index target_segment_id, PolarSite &target, EwaldChargeState source_state, bool include_static=true) const
template<enum Estatic CE>
void AddFieldAtMany (const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool include_static=true) const
double CalcStaticEnergyAt (const PolarSite &target, EwaldChargeState source_state) const
Eigen::VectorXd PotentialAtMany (Index target_segment_id, const std::vector< Eigen::Vector3d > &points, EwaldChargeState source_state) const
double CalcInducedSourceEnergyAt (const PolarSite &target, EwaldChargeState source_state) const
void PrepareNeighborCache (const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool converge_static_field=false) const
NeighborStats GetNeighborStats () const
double RealSpaceCutoff () const

Private Types

using NeighborList

Private Member Functions

std::vector< Translation > GenerateSortedTranslations () const
template<enum Estatic CE>
NeighborList SearchNeighbors (Index target_segment_id, PolarSite &scratch, EwaldChargeState source_state, bool include_static, SearchCounts &counts) const
template<enum Estatic CE>
void ApplyNeighborList (const NeighborList &list, PolarSite &target, bool include_static) const
template<enum Estatic CE>
void PrepareNeighborCacheImpl (const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool include_static) const
void InsertNeighborList (const std::pair< const PolarSite *, EwaldChargeState > &key, NeighborList list, const SearchCounts &counts) const

Private Attributes

double real_space_cutoff_
std::map< Index, std::vector< Eigen::Vector3d > > foreground_
Index cached_targets_ = 0
Index cached_entries_ = 0
Index culled_entries_ = 0
Index foreground_entries_ = 0
double segment_radius_
Eigen::Matrix3d box_
const EwaldRegistry & registry_
EwaldRealSpaceInteractor interactor_
double r_min_
double field_tol_
double shell_width_
Index n_max_
std::vector< Translation > translations_
std::unordered_map< std::pair< const PolarSite *, EwaldChargeState >, NeighborList, PairHash > neighbor_cache_

Static Private Attributes

static constexpr double kForegroundMatchTol = 1e-4
static constexpr double kSelfTranslationTol = 1e-8

Detailed Description

Definition at line 95 of file ewaldrealspacesum.h.

Member Typedef Documentation

◆ NeighborList

Initial value:
std::vector<std::tuple<const PolarSegment*, Index, Eigen::Vector3d>>

Definition at line 335 of file ewaldrealspacesum.h.

Constructor & Destructor Documentation

◆ EwaldRealSpaceSum()

votca::xtp::EwaldRealSpaceSum::EwaldRealSpaceSum ( const Eigen::Matrix3d & box,
const EwaldRegistry & registry,
double alpha,
double thole_a,
double r_min,
double field_tol,
double shell_width = 0.945,
Index n_max = 15,
double screening_factor = 6.0,
const std::vector< std::pair< Index, Eigen::Vector3d > > & foreground = {} )

Definition at line 68 of file ewaldrealspacesum.cc.

Member Function Documentation

◆ AddFieldAt()

template<enum Estatic CE>
void votca::xtp::EwaldRealSpaceSum::AddFieldAt ( Index target_segment_id,
PolarSite & target,
EwaldChargeState source_state,
bool include_static = true ) const

Definition at line 169 of file ewaldrealspacesum.cc.

◆ AddFieldAtMany()

template<enum Estatic CE>
void votca::xtp::EwaldRealSpaceSum::AddFieldAtMany ( const std::vector< std::pair< Index, PolarSite * > > & targets,
EwaldChargeState source_state,
bool include_static = true ) const

Definition at line 668 of file ewaldrealspacesum.cc.

◆ ApplyNeighborList()

template<enum Estatic CE>
void votca::xtp::EwaldRealSpaceSum::ApplyNeighborList ( const NeighborList & list,
PolarSite & target,
bool include_static ) const
private

Definition at line 133 of file ewaldrealspacesum.cc.

◆ CalcInducedSourceEnergyAt()

double votca::xtp::EwaldRealSpaceSum::CalcInducedSourceEnergyAt ( const PolarSite & target,
EwaldChargeState source_state ) const

Definition at line 564 of file ewaldrealspacesum.cc.

◆ CalcStaticEnergyAt()

double votca::xtp::EwaldRealSpaceSum::CalcStaticEnergyAt ( const PolarSite & target,
EwaldChargeState source_state ) const

Definition at line 404 of file ewaldrealspacesum.cc.

◆ GenerateSortedTranslations()

std::vector< EwaldRealSpaceSum::Translation > votca::xtp::EwaldRealSpaceSum::GenerateSortedTranslations ( ) const
private

Definition at line 111 of file ewaldrealspacesum.cc.

◆ GetNeighborStats()

NeighborStats votca::xtp::EwaldRealSpaceSum::GetNeighborStats ( ) const
inline

Definition at line 320 of file ewaldrealspacesum.h.

◆ InsertNeighborList()

void votca::xtp::EwaldRealSpaceSum::InsertNeighborList ( const std::pair< const PolarSite *, EwaldChargeState > & key,
NeighborList list,
const SearchCounts & counts ) const
private

Definition at line 158 of file ewaldrealspacesum.cc.

◆ PotentialAtMany()

Eigen::VectorXd votca::xtp::EwaldRealSpaceSum::PotentialAtMany ( Index target_segment_id,
const std::vector< Eigen::Vector3d > & points,
EwaldChargeState source_state ) const

Definition at line 432 of file ewaldrealspacesum.cc.

◆ PrepareNeighborCache()

void votca::xtp::EwaldRealSpaceSum::PrepareNeighborCache ( const std::vector< std::pair< Index, PolarSite * > > & targets,
EwaldChargeState source_state,
bool converge_static_field = false ) const

Definition at line 595 of file ewaldrealspacesum.cc.

◆ PrepareNeighborCacheImpl()

template<enum Estatic CE>
void votca::xtp::EwaldRealSpaceSum::PrepareNeighborCacheImpl ( const std::vector< std::pair< Index, PolarSite * > > & targets,
EwaldChargeState source_state,
bool include_static ) const
private

Definition at line 604 of file ewaldrealspacesum.cc.

◆ RealSpaceCutoff()

double votca::xtp::EwaldRealSpaceSum::RealSpaceCutoff ( ) const
inline

Definition at line 324 of file ewaldrealspacesum.h.

◆ SearchNeighbors()

template<enum Estatic CE>
EwaldRealSpaceSum::NeighborList votca::xtp::EwaldRealSpaceSum::SearchNeighbors ( Index target_segment_id,
PolarSite & scratch,
EwaldChargeState source_state,
bool include_static,
SearchCounts & counts ) const
private

Definition at line 198 of file ewaldrealspacesum.cc.

Member Data Documentation

◆ box_

Eigen::Matrix3d votca::xtp::EwaldRealSpaceSum::box_
private

Definition at line 421 of file ewaldrealspacesum.h.

◆ cached_entries_

Index votca::xtp::EwaldRealSpaceSum::cached_entries_ = 0
mutableprivate

Definition at line 412 of file ewaldrealspacesum.h.

◆ cached_targets_

Index votca::xtp::EwaldRealSpaceSum::cached_targets_ = 0
mutableprivate

Definition at line 411 of file ewaldrealspacesum.h.

◆ culled_entries_

Index votca::xtp::EwaldRealSpaceSum::culled_entries_ = 0
mutableprivate

Definition at line 413 of file ewaldrealspacesum.h.

◆ field_tol_

double votca::xtp::EwaldRealSpaceSum::field_tol_
private

Definition at line 425 of file ewaldrealspacesum.h.

◆ foreground_

std::map<Index, std::vector<Eigen::Vector3d> > votca::xtp::EwaldRealSpaceSum::foreground_
private

Definition at line 403 of file ewaldrealspacesum.h.

◆ foreground_entries_

Index votca::xtp::EwaldRealSpaceSum::foreground_entries_ = 0
mutableprivate

Definition at line 415 of file ewaldrealspacesum.h.

◆ interactor_

EwaldRealSpaceInteractor votca::xtp::EwaldRealSpaceSum::interactor_
private

Definition at line 423 of file ewaldrealspacesum.h.

◆ kForegroundMatchTol

double votca::xtp::EwaldRealSpaceSum::kForegroundMatchTol = 1e-4
staticconstexprprivate

Definition at line 393 of file ewaldrealspacesum.h.

◆ kSelfTranslationTol

double votca::xtp::EwaldRealSpaceSum::kSelfTranslationTol = 1e-8
staticconstexprprivate

Definition at line 400 of file ewaldrealspacesum.h.

◆ n_max_

Index votca::xtp::EwaldRealSpaceSum::n_max_
private

Definition at line 427 of file ewaldrealspacesum.h.

◆ neighbor_cache_

std::unordered_map<std::pair<const PolarSite*, EwaldChargeState>, NeighborList, PairHash> votca::xtp::EwaldRealSpaceSum::neighbor_cache_
mutableprivate

Definition at line 463 of file ewaldrealspacesum.h.

◆ r_min_

double votca::xtp::EwaldRealSpaceSum::r_min_
private

Definition at line 424 of file ewaldrealspacesum.h.

◆ real_space_cutoff_

double votca::xtp::EwaldRealSpaceSum::real_space_cutoff_
private

Definition at line 390 of file ewaldrealspacesum.h.

◆ registry_

const EwaldRegistry& votca::xtp::EwaldRealSpaceSum::registry_
private

Definition at line 422 of file ewaldrealspacesum.h.

◆ segment_radius_

double votca::xtp::EwaldRealSpaceSum::segment_radius_
private

Definition at line 419 of file ewaldrealspacesum.h.

◆ shell_width_

double votca::xtp::EwaldRealSpaceSum::shell_width_
private

Definition at line 426 of file ewaldrealspacesum.h.

◆ translations_

std::vector<Translation> votca::xtp::EwaldRealSpaceSum::translations_
private

Definition at line 431 of file ewaldrealspacesum.h.


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