20#ifndef ESPRESSO_SRC_SCAFACOS_COULOMB_HPP
21#define ESPRESSO_SRC_SCAFACOS_COULOMB_HPP
36 Coulomb(MPI_Comm comm, std::string method, std::string parameters);
43 void run(std::vector<double> &charges, std::vector<double> &positions,
44 std::vector<double> &fields, std::vector<double> &potentials);
60 if (m_delegate_near_field) {
62 fcs_compute_near_field(
m_handle, dist, &field);
71 if (m_delegate_near_field) {
73 fcs_compute_near_potential(
m_handle, dist, &potential);
81 void tune(std::vector<double> &charges, std::vector<double> &positions);
88 auto get_near_field_flag()
const {
89 return static_cast<fcs_int
>((m_delegate_near_field) ? 0 : 1);
93 bool m_method_can_delegate_near_field;
95 bool m_delegate_near_field;
double pair_force(double dist) const
Calculate short-range pair force.
void run(std::vector< double > &charges, std::vector< double > &positions, std::vector< double > &fields, std::vector< double > &potentials)
Calculate the fields and potentials for charges.
void set_near_field_delegation(bool delegate)
Delegate the short-range calculation.
void tune(std::vector< double > &charges, std::vector< double > &positions)
Tune parameters.
bool get_near_field_delegation() const
void set_r_cut(double r_cut)
Set short-range cutoff.
double r_cut() const
Get short-range cutoff (0.0 if not supported by the method).
void set_runtime_parameters(double const *box_l, int const *periodicity, int total_particles)
Set box geometry and number of particles.
double pair_energy(double dist) const
Calculate short-range pair energy.
FCS m_handle
Handle from the library.