ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
|
Generic quantities | |
void | ddx_get_banner (char *banner, int maxlen) |
int | ddx_supported_lebedev_grids (int maxlen, int *grids) |
void | ddx_scaled_ylm (const void *ddx, int lmax, const double *x, int sphere, double *ylm) |
Allocate and manage the ddX error object | |
void * | ddx_allocate_error () |
int | ddx_get_error_flag (const void *error) |
void | ddx_get_error_message (const void *error, char *message, int maxlen) |
Allocate and manage the ddX electrostatics object | |
void * | ddx_allocate_electrostatics (void *ddx, void *error) |
void | ddx_multipole_electrostatics (void *ddx, int nsph, int nmultipoles, const double *multipoles, void *electrostatics, void *error) |
void | ddx_deallocate_electrostatics (void *electrostatics, void *error) |
Allocate and manage the ddx model object | |
void * | ddx_allocate_model (int model, int enable_force, double solvent_epsilon, double solvent_kappa, double eta, double shift, int lmax, int n_lebedev, int incore, int maxiter, int jacobi_n_diis, int enable_fmm, int fmm_multipole_lmax, int fmm_local_lmax, int n_proc, int n_spheres, const double *sphere_centres, const double *sphere_radii, int length_logfile, const char *logfile, void *error) |
void | ddx_deallocate_model (void *ddx, void *error) |
Getters for properties of the state object | |
void | ddx_get_logfile (const void *ddx, char *logfile, int maxlen) |
int | ddx_get_enable_fmm (const void *ddx) |
int | ddx_get_enable_force (const void *ddx) |
int | ddx_get_jacobi_n_diis (const void *ddx) |
int | ddx_get_lmax (const void *ddx) |
int | ddx_get_incore (const void *ddx) |
int | ddx_get_maxiter (const void *ddx) |
int | ddx_get_model (const void *ddx) |
int | ddx_get_n_lebedev (const void *ddx) |
int | ddx_get_n_proc (const void *ddx) |
int | ddx_get_n_spheres (const void *ddx) |
int | ddx_get_fmm_local_lmax (const void *ddx) |
int | ddx_get_fmm_multipole_lmax (const void *ddx) |
double | ddx_get_solvent_epsilon (const void *ddx) |
double | ddx_get_eta (const void *ddx) |
double | ddx_get_solvent_kappa (const void *ddx) |
double | ddx_get_shift (const void *ddx) |
void | ddx_get_sphere_charges (const void *ddx, int nsph, double *c_charge) |
void | ddx_get_sphere_centres (const void *ddx, int nsph, double *c_csph) |
void | ddx_get_sphere_radii (const void *ddx, int nsph, double *c_rsph) |
int | ddx_get_n_basis (const void *ddx) |
int | ddx_get_n_cav (const void *ddx) |
void | ddx_get_cavity (const void *ddx, int ncav, double *c_ccav) |
Allocate and manage the state object | |
void * | ddx_allocate_state (const void *ddx, void *error) |
void | ddx_deallocate_state (void *state, void *error) |
void | ddx_get_x (const void *state, int nbasis, int nsph, double *x) |
int | ddx_get_x_niter (const void *state) |
void | ddx_get_s (const void *state, int nbasis, int nsph, double *s) |
int | ddx_get_s_niter (const void *state) |
void | ddx_get_xi (const void *state, const void *ddx, int ncav, double *xi) |
void | ddx_get_zeta_dip (const void *state, const void *ddx, int ncav, double *zeta_dip) |
Model nonspecific setup and solution routines | |
double | ddx_ddsolve (const void *ddx, void *state, const void *electrostatics, int nbasis, int nsph, const double *psi, double tol, double *forces, const int read_guess, void *error) |
void | ddx_setup (const void *ddx, void *state, const void *electrostatics, int nbasis, int nsph, const double *psi, void *error) |
void | ddx_fill_guess (const void *ddx, void *state, double tol, void *error) |
void | ddx_fill_guess_adjoint (const void *ddx, void *state, double tol, void *error) |
void | ddx_solve (const void *ddx, void *state, double tol, void *error) |
void | ddx_solve_adjoint (const void *ddx, void *state, double tol, void *error) |
double | ddx_energy (const void *ddx, void *state, void *error) |
void | ddx_solvation_force_terms (const void *ddx, void *state, void *electrostatics, int nsph, double *forces, void *error) |
double | ddx_ddrun (const void *ddx, void *state, void *electrostatics, int nbasis, int nsph, double *psi, const double tol, double *forces, int read_guess, void *error) |
Problem setup and solution routines | |
void | ddx_cosmo_setup (const void *ddx, void *state, int ncav, int nbasis, int nsph, const double *psi, const double *phi_cav, void *error) |
void | ddx_cosmo_guess (const void *ddx, void *state, void *error) |
void | ddx_cosmo_guess_adjoint (const void *ddx, void *state, void *error) |
void | ddx_cosmo_solve (const void *ddx, void *state, double tol, void *error) |
void | ddx_cosmo_solve_adjoint (const void *ddx, void *state, double tol, void *error) |
double | ddx_cosmo_energy (const void *ddx, void *state, void *error) |
void | ddx_cosmo_solvation_force_terms (const void *ddx, void *state, int nsph, int ncav, const double *e_cav, double *forces, void *error) |
void | ddx_pcm_setup (const void *ddx, void *state, int ncav, int nbasis, int nsph, const double *psi, const double *phi_cav, void *error) |
void | ddx_pcm_guess (const void *ddx, void *state, void *error) |
void | ddx_pcm_guess_adjoint (const void *ddx, void *state, void *error) |
void | ddx_pcm_solve (const void *ddx, void *state, double tol, void *error) |
void | ddx_pcm_solve_adjoint (const void *ddx, void *state, double tol, void *error) |
double | ddx_pcm_energy (const void *ddx, void *state, void *error) |
void | ddx_pcm_solvation_force_terms (const void *ddx, void *state, int nsph, int ncav, const double *e_cav, double *forces, void *error) |
void | ddx_lpb_setup (const void *ddx, void *state, int ncav, int nbasis, int nsph, const double *psi, const double *phi_cav, const double *e_cav, void *error) |
void | ddx_lpb_guess (const void *ddx, void *state, double tol, void *error) |
void | ddx_lpb_guess_adjoint (const void *ddx, void *state, double tol, void *error) |
void | ddx_lpb_solve (const void *ddx, void *state, double tol, void *error) |
void | ddx_lpb_solve_adjoint (const void *ddx, void *state, double tol, void *error) |
double | ddx_lpb_energy (const void *ddx, void *state, void *error) |
void | ddx_lpb_solvation_force_terms (const void *ddx, void *state, int nsph, int ncav, const double *g_cav, double *forces, const void *error) |
Multipolar solutes | |
void | ddx_multipole_electrostatics_0 (const void *ddx, int nsph, int ncav, int nmultipoles, const double *multipoles, double *phi_cav, void *error) |
void | ddx_multipole_electrostatics_1 (const void *ddx, int nsph, int ncav, int nmultipoles, const double *multipoles, double *phi_cav, double *e_cav, void *error) |
void | ddx_multipole_electrostatics_2 (const void *ddx, int nsph, int ncav, int nmultipoles, const double *multipoles, double *phi_cav, double *e_cav, double *g_cav, void *error) |
void | ddx_multipole_psi (const void *ddx, int nbasis, int nsph, int nmultipoles, const double *multipoles, double *psi, void *error) |
void | ddx_multipole_force_terms (const void *ddx, void *state, int nsph, int nmultipoles, const double *multipoles, double *forces, void *error) |
Header file defining the C interface of ddx.
void ddx_get_banner | ( | char * | banner, |
int | maxlen | ||
) |
Fill the string banner with an informative header about ddx. At most maxlen characters will be copied, so use this to specify the number of characters the char array can hold.
int ddx_supported_lebedev_grids | ( | int | maxlen, |
int * | grids | ||
) |
Fill the grids array with the number of grid points of the supported lebedev grids. At most maxlen elements will be touched, so pass the size of the allocated integer array as maxlen. Returns the number of entries in grids actually altered. E.g. if the returned value is 5 the valid entries in the grid array after the call are grid[0], ..., grid[4].
void ddx_scaled_ylm | ( | const void * | ddx, |
int | lmax, | ||
const double * | x, | ||
int | sphere, | ||
double * | ylm | ||
) |
With reference to a atomic sphere sphere
of radius r
centred at a
compute:
where lmax should be identical to the value stored inside ddx or less.
void * ddx_allocate_error | ( | ) |
Allocate the ddX error.
int ddx_get_error_flag | ( | const void * | error | ) |
Get the error flag stored inside the model (0 is no error). It is the responsibility of the user of DDX to regularly check for a non-zero error flag and take appropriate actions if an error is present.
void ddx_get_error_message | ( | const void * | error, |
char * | message, | ||
int | maxlen | ||
) |
Store the error message corresponding to the most recent error inside the passed char array. at most maxlen characters are copied (so set this to the number of allocated characters in the passed array to avoid a buffer overflow.
void * ddx_allocate_electrostatics | ( | void * | ddx, |
void * | error | ||
) |
Allocate the ddX electrostatics object.
void ddx_multipole_electrostatics | ( | void * | ddx, |
int | nsph, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
void * | electrostatics, | ||
void * | error | ||
) |
Compute the electrostatic properties for a multipolar distribution
void ddx_deallocate_electrostatics | ( | void * | electrostatics, |
void * | error | ||
) |
Deallocate the ddX electrostatics object.
void * ddx_allocate_model | ( | int | model, |
int | enable_force, | ||
double | solvent_epsilon, | ||
double | solvent_kappa, | ||
double | eta, | ||
double | shift, | ||
int | lmax, | ||
int | n_lebedev, | ||
int | incore, | ||
int | maxiter, | ||
int | jacobi_n_diis, | ||
int | enable_fmm, | ||
int | fmm_multipole_lmax, | ||
int | fmm_local_lmax, | ||
int | n_proc, | ||
int | n_spheres, | ||
const double * | sphere_centres, | ||
const double * | sphere_radii, | ||
int | length_logfile, | ||
const char * | logfile, | ||
void * | error | ||
) |
Allocate a ddx model object.
model | Integer describing the model to use. |
enable_force | If 1 enable force calculations |
solvent_epsilon | Relative dielectric permittivity |
solvent_kappa | Debye-Hückel parameter (inverse screening length) |
eta | Regularization parameter for the regularised characteristic function chi_eta. Range [0,1] |
shift | Shift for the regularized characteristic function chi_eta |
lmax | Maximal degree of modelling spherical harmonics |
n_lebedev | Number of Lebedev grid points to use |
incore | If 1 store more large objects in memory |
maxiter | Maximal number of iterations |
jacobi_n_diis | Number of iterates stored in the DIIS space for acceleration |
enable_fmm | If 1 enable the fast-multipole method for computations |
fmm_multipole_lmax | Maximal degree of multipole spherical harmonics, ignored in case !enable_fmm . Value -1 means no far-field FFM interactions are computed. |
fmm_local_lmax | Maximal degree of local spherical harmonics, ignored in case use_fmm=false . Value -1 means no local FFM interactions are computed. |
n_proc | Number of processors to use |
n_spheres | Number of cavity spheres |
sphere_centres | The centres of the cavity spheres as a column-major (3, n_spheres) array. |
sphere_radii | The radii of the spheres. |
length_logfile | Length of the logfile name (0 if no log). Note that logs can be quite verbose for larger runs and should only be used for debugging. |
logfile | The logfile name (empty if no log) |
error | The ddX error object |
void ddx_deallocate_model | ( | void * | ddx, |
void * | error | ||
) |
Deallocate the model object
void ddx_get_logfile | ( | const void * | ddx, |
char * | logfile, | ||
int | maxlen | ||
) |
Copy the logfile used by the model to the passed logfile array. At most maxlen characters are copied.
int ddx_get_enable_fmm | ( | const void * | ddx | ) |
Return the current value of enable_fmm stored in the model.
int ddx_get_enable_force | ( | const void * | ddx | ) |
Return the current value of enable_force stored in the model.
int ddx_get_jacobi_n_diis | ( | const void * | ddx | ) |
Return the current value of jacobi_n_diis stored in the model.
int ddx_get_lmax | ( | const void * | ddx | ) |
Return the current value of lmax stored in the model.
int ddx_get_incore | ( | const void * | ddx | ) |
Return the current value of incore stored in the model.
int ddx_get_maxiter | ( | const void * | ddx | ) |
Return the current value of maxiter stored in the model.
int ddx_get_model | ( | const void * | ddx | ) |
Return the current value of model stored in the model.
int ddx_get_n_lebedev | ( | const void * | ddx | ) |
Return the current value of n_lebedev stored in the model.
int ddx_get_n_proc | ( | const void * | ddx | ) |
Return the current value of n_proc stored in the model.
int ddx_get_n_spheres | ( | const void * | ddx | ) |
Return the current value of n_spheres stored in the model.
int ddx_get_fmm_local_lmax | ( | const void * | ddx | ) |
Return the current value of fmm_local_lmax stored in the model.
int ddx_get_fmm_multipole_lmax | ( | const void * | ddx | ) |
Return the current value of fmm_multipole_lmax stored in the model.
double ddx_get_solvent_epsilon | ( | const void * | ddx | ) |
Return the current value of solvent_epsilon stored in the model.
double ddx_get_eta | ( | const void * | ddx | ) |
Return the current value of eta stored in the model.
double ddx_get_solvent_kappa | ( | const void * | ddx | ) |
Return the current value of solvent_kappa stored in the model.
double ddx_get_shift | ( | const void * | ddx | ) |
Return the current value of shift stored in the model.
void ddx_get_sphere_charges | ( | const void * | ddx, |
int | nsph, | ||
double * | c_charge | ||
) |
Store the current values of sphere_charges into the passed pointer location. The pointer should refer to the memory location of an array of size (nsph). Data will be stored in column-major format.
void ddx_get_sphere_centres | ( | const void * | ddx, |
int | nsph, | ||
double * | c_csph | ||
) |
Store the current values of sphere_centres into the passed pointer location. The pointer should refer to the memory location of an array of size (nsph). Data will be stored in column-major format.
void ddx_get_sphere_radii | ( | const void * | ddx, |
int | nsph, | ||
double * | c_rsph | ||
) |
Store the current values of sphere_radii into the passed pointer location. The pointer should refer to the memory location of an array of size (nsph). Data will be stored in column-major format.
int ddx_get_n_basis | ( | const void * | ddx | ) |
Return the current value of n_basis stored in the model.
int ddx_get_n_cav | ( | const void * | ddx | ) |
Return the current value of n_cav stored in the model.
void ddx_get_cavity | ( | const void * | ddx, |
int | ncav, | ||
double * | c_ccav | ||
) |
Store the current values of cavity into the passed pointer location. The pointer should refer to the memory location of an array of size (ncav). Data will be stored in column-major format.
void * ddx_allocate_state | ( | const void * | ddx, |
void * | error | ||
) |
Allocate an empty state from a model
void ddx_deallocate_state | ( | void * | state, |
void * | error | ||
) |
Deallocate a state object
void ddx_get_x | ( | const void * | state, |
int | nbasis, | ||
int | nsph, | ||
double * | x | ||
) |
Get the solution of the forward problem stored inside the state as a (nbasis, nsph) array in column-major ordering.
state | DDX state |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
x | Output pointer |
int ddx_get_x_niter | ( | const void * | state | ) |
Get the number of iterations which where needed to obtain the solution returned by ddx_get_x
void ddx_get_s | ( | const void * | state, |
int | nbasis, | ||
int | nsph, | ||
double * | s | ||
) |
Get the solution of the adjoint problem stored inside the state as a (nbasis, nsph) array in column-major ordering.
state | DDX state |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
s | Output pointer |
int ddx_get_s_niter | ( | const void * | state | ) |
Get the number of iterations which where needed to obtain the adjoint solution returned by ddx_get_s
void ddx_get_xi | ( | const void * | state, |
const void * | ddx, | ||
int | ncav, | ||
double * | xi | ||
) |
Return the xi, the adjoint solution s projected onto the cavity points.
state | DDX state |
ddx | DDX model |
ncav | Number of cavity points |
xi | Array to be filled with ncav |
void ddx_get_zeta_dip | ( | const void * | state, |
const void * | ddx, | ||
int | ncav, | ||
double * | zeta_dip | ||
) |
Return the zeta_dip, the dipolar contribution of the LPB adjoint solution, at the cavity points. The pointer should refer to the memory location of an array of size (3, ncav). Data will be stored in column-major format.
state | DDX state |
ddx | DDX model |
ncav | Number of cavity points |
zeta_dip | Array to be filled with ncav |
double ddx_ddsolve | ( | const void * | ddx, |
void * | state, | ||
const void * | electrostatics, | ||
int | nbasis, | ||
int | nsph, | ||
const double * | psi, | ||
double | tol, | ||
double * | forces, | ||
const int | read_guess, | ||
void * | error | ||
) |
Solve everything and return the energy.
ddx | DDX model |
state | DDX state |
electrostatics | DDX electrostatic properties container |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
tol | Tolerance for the linear system solver |
forces | Force array |
read_guess | Flag for guess, if different from zero the guess is read from the state |
error | DDX error |
void ddx_setup | ( | const void * | ddx, |
void * | state, | ||
const void * | electrostatics, | ||
int | nbasis, | ||
int | nsph, | ||
const double * | psi, | ||
void * | error | ||
) |
In-place adjust the guess inside the state. Setup a problem in the passed state.
ddx | DDX model |
state | DDX state |
electrostatics | DDX electrostatic properties container |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
error | DDX error |
void ddx_fill_guess | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
In-place adjust the guess inside the state. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_fill_guess_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
In-place adjust the adjoint guess inside the state. problem. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_solve | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the forward problem.
state | DDX state |
ddx | DDX model |
tol | Tolerance up to which the problem is solved |
error | DDX error |
void ddx_solve_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the adjoint COSMO problem.
state | DDX state |
ddx | DDX model |
tol | Tolerance up to which the problem is solved |
error | DDX error |
double ddx_energy | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
Compute the solvation energy.
state | DDX state |
ddx | DDX model |
error | DDX ERROR |
void ddx_solvation_force_terms | ( | const void * | ddx, |
void * | state, | ||
void * | electrostatics, | ||
int | nsph, | ||
double * | forces, | ||
void * | error | ||
) |
Compute the solvation force terms.
ddx | DDX model |
state | DDX state |
electrostatics | DDX electrostatic properties container |
nsph | Number of cavity spheres |
forces | Output force array (3, nsph) in column-major order |
error | DDX error |
double ddx_ddrun | ( | const void * | ddx, |
void * | state, | ||
void * | electrostatics, | ||
int | nbasis, | ||
int | nsph, | ||
double * | psi, | ||
const double | tol, | ||
double * | forces, | ||
int | read_guess, | ||
void * | error | ||
) |
Run all the steps of a ddX calculation and return energy and, if requested, forces.
ddx | DDX model |
state | DDX state |
electrostatics | DDX electrostatic properties container |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
tol | Tolerance up to which the problem is solved |
forces | Output force array (3, nsph) in column-major order |
read_guess | Guess control flag: 0 for default guess, 1 for using the content of DDX state for the guess. |
error | DDX error |
void ddx_cosmo_setup | ( | const void * | ddx, |
void * | state, | ||
int | ncav, | ||
int | nbasis, | ||
int | nsph, | ||
const double * | psi, | ||
const double * | phi_cav, | ||
void * | error | ||
) |
Setup a COSMO problem in the passed state.
ddx | DDX model |
state | DDX state |
ncav | Number of cavity points |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
phi_cav | Phi array adjoint (ncav, )-shaped array |
void ddx_cosmo_guess | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve a COSMO problem. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_cosmo_guess_adjoint | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve an adjoint COSMO problem. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_cosmo_solve | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the COSMO problem.
state | DDX state |
ddx | DDX model |
tol | Tolerance up to which the problem is solved |
error | DDX error |
void ddx_cosmo_solve_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the adjoint COSMO problem.
state | DDX state |
ddx | DDX model |
tol | Tolerance up to which the problem is solved |
error | DDX error |
double ddx_cosmo_energy | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
Compute COSMO energy (without any scaling by (epsilon - 1) / epsilon or similar).
state | DDX state |
ddx | DDX model |
error | DDX ERROR |
void ddx_cosmo_solvation_force_terms | ( | const void * | ddx, |
void * | state, | ||
int | nsph, | ||
int | ncav, | ||
const double * | e_cav, | ||
double * | forces, | ||
void * | error | ||
) |
Compute the COSMO force terms.
ddx | DDX model |
state | DDX state |
nsph | Number of cavity spheres |
e_cav | Electric field |
forces | Output force array (3, nsph) in column-major order |
error | DDX error |
void ddx_pcm_setup | ( | const void * | ddx, |
void * | state, | ||
int | ncav, | ||
int | nbasis, | ||
int | nsph, | ||
const double * | psi, | ||
const double * | phi_cav, | ||
void * | error | ||
) |
Setup a PCM problem in the passed state.
ddx | DDX model |
state | DDX state |
ncav | Number of cavity points |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
phi_cav | Phi array (ncav, )-shaped array |
error | DDX error |
void ddx_pcm_guess | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve a PCM problem. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_pcm_guess_adjoint | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve an adjoint PCM problem. Avoid calling this step if you want to use the currently stored solution as an initial guess
void ddx_pcm_solve | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the forward PCM problem.
state | DDX state |
ddx | DDX model |
error | DDX error |
tol | Tolerance up to which the problem is solved |
void ddx_pcm_solve_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the adjoint PCM problem.
state | DDX state |
ddx | DDX model |
error | DDX error |
tol | Tolerance up to which the problem is solved |
double ddx_pcm_energy | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
Compute PCM energy
state | DDX state |
error | DDX error |
ddx | DDX model |
void ddx_pcm_solvation_force_terms | ( | const void * | ddx, |
void * | state, | ||
int | nsph, | ||
int | ncav, | ||
const double * | e_cav, | ||
double * | forces, | ||
void * | error | ||
) |
Compute the PCM force terms.
ddx | DDX model |
state | DDX state |
nsph | Number of cavity spheres |
e_cav | Electric field |
forces | Output force array (3, nsph) in column-major order |
error | DDX error |
void ddx_lpb_setup | ( | const void * | ddx, |
void * | state, | ||
int | ncav, | ||
int | nbasis, | ||
int | nsph, | ||
const double * | psi, | ||
const double * | phi_cav, | ||
const double * | e_cav, | ||
void * | error | ||
) |
Setup a LPB problem in the passed state.
ddx | DDX model |
state | DDX state |
ncav | Number of cavity points |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
psi | Psi array (nbasis, nsph)-shaped array (in column-major ordering) |
phi_cav | Phi array (ncav, )-shaped array |
e_cav | Electric field generated by multipoles: (3, ncav)-shaped array (column major) |
error | DDX error |
void ddx_lpb_guess | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve a LPB problem. Avoid calling this step if you want to use the currently stored solution as an initial guess. tol is the tolerance for solving a simplified initial-guess problem. The same tolerance as for the ddx_lpb_solve call should be chosen.
void ddx_lpb_guess_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
In-place adjust the guess inside the state, getting ready to solve an adjoint LPB problem. Avoid calling this step if you want to use the currently stored solution as an initial guess. tol is the tolerance for solving a simplified initial-guess problem. The same tolerance as for the ddx_lpb_solve call should be chosen.
void ddx_lpb_solve | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the forward LPB problem.
state | DDX state |
ddx | DDX model |
error | DDX error |
tol | Tolerance up to which the problem is solved |
void ddx_lpb_solve_adjoint | ( | const void * | ddx, |
void * | state, | ||
double | tol, | ||
void * | error | ||
) |
Solve the adjoint LPB problem.
state | DDX state |
ddx | DDX model |
error | DDX error |
tol | Tolerance up to which the problem is solved |
double ddx_lpb_energy | ( | const void * | ddx, |
void * | state, | ||
void * | error | ||
) |
Compute LPB energy
state | DDX state |
error | DDX error |
ddx | DDX model |
void ddx_lpb_solvation_force_terms | ( | const void * | ddx, |
void * | state, | ||
int | nsph, | ||
int | ncav, | ||
const double * | g_cav, | ||
double * | forces, | ||
const void * | error | ||
) |
Compute the LPB force terms.
ddx | DDX model |
state | DDX state |
nsph | Number of cavity spheres |
g_cav | Electric field gradient |
forces | Output force array (3, nsph) in column-major order |
error | DDX error |
void ddx_multipole_electrostatics_0 | ( | const void * | ddx, |
int | nsph, | ||
int | ncav, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
double * | phi_cav, | ||
void * | error | ||
) |
Build potential generated by a multipolar charge distribution.
ddx | DDX model |
nsph | Number of cavity spheres |
ncav | Number of cavity points |
nmultipoles | Total number of multipoles. If multipoles up to mmax are used, this is (mmax+1)^2. E.g. for charges, dipoles and quadrupoles (mmax=2), this is 9. |
multipoles | Multipoles (nmultipoles, nsph)-shaped array in column-major order. |
phi_cav | Potential (phi) generated by multipoles: (ncav, )-shaped array |
error | DDX error |
void ddx_multipole_electrostatics_1 | ( | const void * | ddx, |
int | nsph, | ||
int | ncav, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
double * | phi_cav, | ||
double * | e_cav, | ||
void * | error | ||
) |
Build potential and electric field generated by a multipolar charge distribution.
ddx | DDX model |
nsph | Number of cavity spheres |
ncav | Number of cavity points |
nmultipoles | Total number of multipoles. If multipoles up to mmax are used, this is (mmax+1)^2. E.g. for charges, dipoles and quadrupoles (mmax=2), this is 9. |
multipoles | Multipoles (nmultipoles, nsph)-shaped array in column-major order. |
phi_cav | Potential (phi) generated by multipoles: (ncav, )-shaped array |
e_cav | Electric field generated by multipoles: (3, ncav)-shaped array (column major) |
error | DDX error |
void ddx_multipole_electrostatics_2 | ( | const void * | ddx, |
int | nsph, | ||
int | ncav, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
double * | phi_cav, | ||
double * | e_cav, | ||
double * | g_cav, | ||
void * | error | ||
) |
Build potential, electric field and field gradient generated by a multipolar charge distribution.
ddx | DDX model |
nsph | Number of cavity spheres |
ncav | Number of cavity points |
nmultipoles | Total number of multipoles. If multipoles up to mmax are used, this is (mmax+1)^2. E.g. for charges, dipoles and quadrupoles (mmax=2), this is 9. |
multipoles | Multipoles (nmultipoles, nsph)-shaped array in column-major order. |
phi_cav | Potential (phi) generated by multipoles: (ncav, )-shaped array |
e_cav | Electric field generated by multipoles: (3, ncav)-shaped array (column major) |
g_cav | Electric field gradient gen. by multipoles: (3, 3, ncav)-shaped array (column major) |
error | DDX error |
void ddx_multipole_psi | ( | const void * | ddx, |
int | nbasis, | ||
int | nsph, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
double * | psi, | ||
void * | error | ||
) |
Build the Psi generated by a multipolar charge distribution
ddx | DDX model |
nbasis | Number of basis functions used by DDX |
nsph | Number of cavity spheres |
nmultipoles | Total number of multipoles. If multipoles up to mmax are used, this is (mmax+1)^2. E.g. for charges, dipoles and quadrupoles (mmax=2), this is 9. |
multipoles | Multipoles (nmultipoles, nsph)-shaped array in column-major order. |
psi | Psi array (nbasis, nsph)-shaped array (column major) |
error | DDX error |
void ddx_multipole_force_terms | ( | const void * | ddx, |
void * | state, | ||
int | nsph, | ||
int | nmultipoles, | ||
const double * | multipoles, | ||
double * | forces, | ||
void * | error | ||
) |
Compute the force terms generated by a multipolar charge distribution
ddx | DDX model |
state | DDX state |
nsph | Number of cavity spheres |
nmultipoles | Total number of multipoles. If multipoles up to mmax are used, this is (mmax+1)^2. E.g. for charges, dipoles and quadrupoles (mmax=2), this is 9. |
multipoles | Multipoles (nmultipoles, nsph)-shaped array in column-major order. |
forces | Output force array (3, nsph) in column-major order |
error | DDX error |