28 #ifndef _chemistry_solvent_bem_h
29 #define _chemistry_solvent_bem_h
31 #include <util/class/class.h>
32 #include <util/state/state.h>
33 #include <util/keyval/keyval.h>
34 #include <math/isosurf/volume.h>
35 #include <math/isosurf/surf.h>
36 #include <math/scmat/matrix.h>
37 #include <chemistry/molecule/molecule.h>
49 double solvent_density_;
50 double dielectric_constant_;
58 double computed_enclosed_charge_;
64 double** alloc_array(
int n,
int m);
65 void free_array(
double**);
72 void charges_to_surface_charge_density(
double *charges);
75 void surface_charge_density_to_charges(
double *charges);
85 void done(
int clear_surface = 1);
87 int ncharge() {
return surf_->nvertex(); }
90 double solvent_density() {
return solvent_density_ ;}
93 double** alloc_charge_positions() {
return alloc_array(ncharge(), 3); }
94 void free_charge_positions(
double**a) { free_array(a); }
96 double** alloc_normals() {
return alloc_array(ncharge(), 3); }
97 void free_normals(
double**a) { free_array(a); }
99 double* alloc_efield_dot_normals() {
return new double[ncharge()]; }
100 void free_efield_dot_normals(
double*a) {
delete[] a; }
102 double* alloc_charges() {
return new double[ncharge()]; }
103 void free_charges(
double*a) {
delete[] a; }
105 void charge_positions(
double**);
106 void normals(
double**);
110 void compute_charges(
double* efield_dot_normals,
double* charge);
115 void normalize_charge(
double enclosed_charge,
double* charges);
118 double nuclear_charge_interaction_energy(
double *nuclear_charge,
119 double** charge_positions,
124 double nuclear_interaction_energy(
double** charge_positions,
128 double self_interaction_energy(
double** charge_positions,
double *charge);
131 double polarization_charge(
double* charge);
134 double area()
const {
return area_; }
136 double volume()
const {
return volume_; }
138 double computed_enclosed_charge()
const {
139 return computed_enclosed_charge_;
142 double disp() {
return edisp_;}
143 double rep() {
return erep_;}
147 void init_system_matrix();