46#ifdef ESPRESSO_ELECTROSTATICS
49 auto const &actor = *ptr;
52 return actor.pair_force(q1q2, d, dist);
63#ifdef ESPRESSO_ELECTROSTATICS
72 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
73 auto const &actor = *ptr;
78 actor.add_pair_force_corrections(pos1, pos2, p1f_asym, p2f_asym, q1q2);
89#ifdef ESPRESSO_ELECTROSTATICS
108#ifdef ESPRESSO_ELECTROSTATICS
109 template <
typename T>
111 auto const &actor = *ptr;
115 double dist) {
return actor.pair_energy(q1q2, dist); }};
119 operator()(std::shared_ptr<ElectrostaticLayerCorrection>
const &ptr)
const {
120 auto const &actor = *ptr;
121 auto const energy_kernel = std::visit(*
this, actor.base_solver);
128 energy = (*energy_kernel)(pos1, pos2, q1q2, d, dist);
130 return energy + actor.pair_energy_correction(pos1, pos2, q1q2);
139 double dist) {
return actor->pair_energy(q1q2, d, dist); }};
145inline std::optional<Solver::ShortRangeForceKernel>
147#ifdef ESPRESSO_ELECTROSTATICS
148 if (
auto &solver =
impl->solver; solver.has_value()) {
150 return std::visit(visitor, *solver);
156inline std::optional<Solver::ShortRangeForceCorrectionsKernel>
158#ifdef ESPRESSO_ELECTROSTATICS
159 if (
auto &solver =
impl->solver; solver.has_value()) {
161 return std::visit(visitor, *solver);
167inline std::optional<Solver::ShortRangePressureKernel>
169#ifdef ESPRESSO_ELECTROSTATICS
170 if (
auto &solver =
impl->solver; solver.has_value()) {
172 return std::visit(visitor, *solver);
178inline std::optional<Solver::ShortRangeEnergyKernel>
180#ifdef ESPRESSO_ELECTROSTATICS
181 if (
auto &solver =
impl->solver; solver.has_value()) {
183 return std::visit(visitor, *solver);
Vector implementation and trait types for boost qvm interoperability.
Matrix implementation and trait types for boost qvm interoperability.
Matrix< T, N, M > tensor_product(const Vector< T, N > &x, const Vector< T, M > &y)
result_type operator()(std::shared_ptr< T > const &ptr) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< ElectrostaticLayerCorrection > const &ptr) const
result_type operator()(std::shared_ptr< CoulombMMM1D > const &actor) const
Solver::ShortRangeEnergyKernel kernel_type
result_type operator()(std::shared_ptr< T > const &) const
Solver::ShortRangeForceCorrectionsKernel kernel_type
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< ElectrostaticLayerCorrection > const &ptr) const
std::optional< kernel_type > result_type
result_type operator()(std::shared_ptr< T > const &ptr) const
Solver::ShortRangeForceKernel kernel_type
result_type operator()(std::shared_ptr< T > const &ptr) const
std::optional< kernel_type > result_type
Solver::ShortRangePressureKernel kernel_type
std::optional< ShortRangePressureKernel > pair_pressure_kernel() const
std::function< Utils::Matrix< double, 3, 3 >(double, Utils::Vector3d const &, double)> ShortRangePressureKernel
std::function< double(Utils::Vector3d const &, Utils::Vector3d const &, double, Utils::Vector3d const &, double)> ShortRangeEnergyKernel
std::function< Utils::Vector3d(double, Utils::Vector3d const &, double)> ShortRangeForceKernel
std::function< void(Utils::Vector3d const &, Utils::Vector3d const &, Utils::Vector3d &, Utils::Vector3d &, double)> ShortRangeForceCorrectionsKernel
std::optional< ShortRangeForceKernel > pair_force_kernel() const
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
std::optional< ShortRangeEnergyKernel > pair_energy_kernel() const
std::optional< ShortRangeForceCorrectionsKernel > pair_force_elc_kernel() const
The electrostatic method supports pressure calculation.