21#ifndef VOTCA_XTP_EWALDREALSPACESUM_H
22#define VOTCA_XTP_EWALDREALSPACESUM_H
28#include <unordered_map>
112 const Eigen::Matrix3d& box,
const EwaldRegistry& registry,
double alpha,
113 double thole_a,
double r_min,
double field_tol,
114 double shell_width = 0.945,
Index n_max = 15,
115 double screening_factor = 6.0,
116 const std::vector<std::pair<Index, Eigen::Vector3d>>& foreground = {});
130 template <enum Estatic CE>
133 bool include_static =
true)
const;
147 template <enum Estatic CE>
148 void AddFieldAtMany(
const std::vector<std::pair<Index, PolarSite*>>& targets,
150 bool include_static =
true)
const;
187 const std::vector<Eigen::Vector3d>& points,
215 const std::vector<std::pair<Index, PolarSite*>>& targets,
232 return seen > 0 ? double(
culled) / double(seen) : 0.0;
251 std::vector<std::tuple<const PolarSegment*, Index, Eigen::Vector3d>>;
266 template <enum Estatic CE>
272 template <enum Estatic CE>
274 bool include_static)
const;
279 template <enum Estatic CE>
281 const std::vector<std::pair<Index, PolarSite*>>& targets,
286 const std::pair<const PolarSite*, EwaldChargeState>& key,
293 const std::pair<const PolarSite*, EwaldChargeState>& key)
const {
294 return std::hash<const PolarSite*>()(key.first) ^
295 (std::hash<EwaldChargeState>()(key.second) << 1);
352 mutable std::unordered_map<std::pair<const PolarSite*, EwaldChargeState>,
NeighborStats GetNeighborStats() const
static constexpr double kForegroundMatchTol
Eigen::VectorXd PotentialAtMany(Index target_segment_id, const std::vector< Eigen::Vector3d > &points, EwaldChargeState source_state) const
std::unordered_map< std::pair< const PolarSite *, EwaldChargeState >, NeighborList, PairHash > neighbor_cache_
std::vector< std::tuple< const PolarSegment *, Index, Eigen::Vector3d > > NeighborList
double CalcInducedSourceEnergyAt(const PolarSite &target, EwaldChargeState source_state) const
void AddFieldAtMany(const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool include_static=true) const
std::map< Index, std::vector< Eigen::Vector3d > > foreground_
double CalcStaticEnergyAt(const PolarSite &target, EwaldChargeState source_state) const
std::vector< Translation > GenerateSortedTranslations() const
const EwaldRegistry & registry_
void PrepareNeighborCache(const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool converge_static_field=false) const
void AddFieldAt(Index target_segment_id, PolarSite &target, EwaldChargeState source_state, bool include_static=true) const
void PrepareNeighborCacheImpl(const std::vector< std::pair< Index, PolarSite * > > &targets, EwaldChargeState source_state, bool include_static) const
double RealSpaceCutoff() const
std::vector< Translation > translations_
void InsertNeighborList(const std::pair< const PolarSite *, EwaldChargeState > &key, NeighborList list, const SearchCounts &counts) const
EwaldRealSpaceInteractor interactor_
double real_space_cutoff_
Index foreground_entries_
static constexpr double kSelfTranslationTol
void ApplyNeighborList(const NeighborList &list, PolarSite &target, bool include_static) const
EwaldRealSpaceSum(const Eigen::Matrix3d &box, const EwaldRegistry ®istry, 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={})
NeighborList SearchNeighbors(Index target_segment_id, PolarSite &scratch, EwaldChargeState source_state, bool include_static, SearchCounts &counts) const
Class to represent Atom/Site in electrostatic+polarization.
Provides a means for comparing floating point numbers.
double culled_fraction() const
double entries_per_target() const
std::size_t operator()(const std::pair< const PolarSite *, EwaldChargeState > &key) const