Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ endif()

set(DO_GTO ${DO_GTO})

set(COMPILE_CINTW_4C OFF)
if("$ENV{COMPILE_CINTW_4C}" STREQUAL "ON")
set(COMPILE_CINTW_4C ON)
endif()
message(STATUS "COMPILE_CINTW_4C: ${COMPILE_CINTW_4C}")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
Expand Down
13 changes: 11 additions & 2 deletions include/becke.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ void atomic_domain_cell_wt(const int ta, const float alpha, const float beta, co

void becke_weight_nc(int natoms, float* grid1, float* wt1, double* coords);
void becke_weight_nc(int natoms, float* grid1, float* wt1, float* coordsf);
void becke_weight_nc(const int mu_order, const int natoms, float* Rs, const int gc, const int gs, float* grid1, float* wt1, int* atno, float* coords);
void becke_weight_ncg(const int mu_order, const int natoms, float* Rs, const int gc, const int gs, float* grid1, float* wt1, int* atno, float* coords);
void becke_weight_ncgd(const int mu_order, const int natoms, double* Rs, const int gc, const int gs, double* grid1, double* wt1, int* atno, double* coords);
void becke_weight_nc(const int mu_order, const int natoms, double* Rs, const int gc, const int gs, double* grid1, double* wt1, int* atno, double* coords);

void becke_weight_3c(int gs, float* grid1, float* wt1, float* grid2, float* wt2, float* grid3, float* wt3,
int Z1, int Z2, int Z3, float A2, float B2, float C2, float A3, float B3, float C3);
Expand All @@ -25,10 +29,15 @@ void becke_weight_2c(int gs, float* grid1, float* wt1, float* grid2, float* wt2,
void becke_weight_2d(int gs, double* grid1, double* wt1, double* grid2, double* wt2,
double zeta1, double zeta2, double A2, double B2, double C2);

float becke_ar(float r1, float r2);
double becke_ard(double r1, double r2);

void get_becke_grid_full(float alpha, int natoms, int* atno, float* coords, int nrad, int nang, float* ang_g, float* ang_w, const int gc, float* grid, float* wt);
void get_becke_grid_full(int mu_order, float alpha, int natoms, int* atno, float* coords, int nrad, int nang, float* ang_g, float* ang_w, const int gc, float* grid, float* wt);
void get_becke_grid_full(int natoms, int* atno, double* coords, int nrad, int nang, float* ang_g, float* ang_w, const int gc, float* grid, float* wt);
void get_becke_grid_full(int natoms, int* atno, double* coords, int nrad, int nang, double* ang_g, double* ang_w, const int gc, float* grid, float* wt);
void get_becke_grid_full(int natoms, int* atno, double* coords, int nrad, int nang, double* ang_g, double* ang_w, const int gc, double* grid, double* wt);
void get_becke_grid_full(int mu_order, int natoms, int* atno, double* coords, int nrad, int nang, double* ang_g, double* ang_w, const int gc, double* grid, double* wt);
void get_becke_grid_sparse(double rmax, int natoms, int* atno, double* coords, int nrad, int nang, double* ang_g, double* ang_w, const int gc, double* grid, double* wt);

void compute_rho(int natoms, int* atno, double* coords, vector<vector<double> > &basis, double* Pao, int nrad, int gsa, float* grid, double* rho, double* drho, int prl);
Expand Down Expand Up @@ -87,8 +96,8 @@ void density_in_basis2(int natoms, int* atno, double* coords, vector<vector<doub

double becke_ad(int Z1, int Z2);
float becke_a(int Z1, int Z2);
float bf3(float f1);
double bf3d(double f1);
float bf3(int mu_order, float f1);
double bf3d(int mu_order, double f1);

//stretch atom 1's radius
float becke_a(float alpha, int Z1, int Z2);
Expand Down
13 changes: 13 additions & 0 deletions include/cintwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ extern "C" {
int64_t int1e_grids_cart(double *out, FINT *dims, FINT *shls,
FINT *atm, FINT natm, FINT *bas, FINT nbas,
double *env, CINTOpt *opt, double *cache);

int cint4c1e_cart(double *buf, int *shls, int *atm, int natm,
int *bas, int nbas, double *env, CINTOpt *opt);
int cint4c1e_sph(double *buf, int *shls, int *atm, int natm,
int *bas, int nbas, double *env, CINTOpt *opt);
}

using namespace std;
Expand Down Expand Up @@ -128,6 +133,14 @@ void gen_pvp(double *pvp, int N,
int natm, int nbas, int nenv,
int *atm, int *bas, double *env);

void gen_4c_overlap_m4(double* ovlp4, size_t N,
int natm, int nbas, int nenv,
int* atm, int* bas, double* env);

void gen_4c_overlap(double* ovlp4, size_t N,
int natm, int nbas, int nenv,
int* atm, int* bas, double* env);

void gen_eri(double **eri, int N,
int natm, int nbas, int nenv,
int *atm, int *bas, double *env);
Expand Down
22 changes: 17 additions & 5 deletions include/gauss.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,37 @@

#include "integrals.h"
//#include "vxc.h"
#include "gamma.h"
#include "read.h"
#include "gto_grid.h"
#include "print.h"
#include "cuda_util.h"

void eval_gh(int gs, float* grid, float* val1, int l1, int m1, const float norm1, const float zeta1);
void eval_ghd(int gs, double* grid, double* val1, int l1, int m1, const double norm1, const double zeta1);
void eval_gh_spd(bool include_r, int gs, double* grid, double* val1, int l1, int m1);
void eval_gh_spd(int gs, double* grid, double* val1, int l1, int m1);

void eval_gh_ke(int gs, float* grid, float* val1, int n1, int l1, const float norm1, const float zeta1);
void eval_ghd_ke(int gs, double* grid, double* val1, int n1, int l1, const double norm1, const double zeta1);
//void eval_pdke_gh(int gs, double* grid, double* val1, int n1, int l1, int m1, double norm1, double zeta1);
void eval_p_gh(int gs, float* grid, float* val, int n1, int l1, int m1, float norm1, float zeta1);
void eval_pd_gh(int gs, double* grid, double* val, int n1, int l1, int m1, double norm1, double zeta1);

//Gaussian single-center potentials
void eval_vghd(int gsa, double* grid, double* val, int n, int l, int m, double norm, double zt);

void eval_hess_ghd(int gs, double* grid, double* val, int n1, int l1, int m1, double norm1, double zeta1);
int eval_gh_full(int gs, float* grid, float** val1, int i1, int natoms, int nbas, int nenv, int N, int* atm, int* bas, double* env);
void wf_to_grid_gh_ke(int natoms, int* atno, double* coords, vector<vector<double> > basis, double* jCA, int gs, float* grid, float* wt, double* TL, int prl);
void wf_to_grid_gh_ke_2(int natoms, int* atno, double* coords, vector<vector<double> > basis, int nbas, int nenv, int N, int* atm, int* bas, double* env,
double* jCA, int gs, float* grid, float* wt, double* Td, int prl);
void integrate_hole_para_gh(double* rdm, bool full_rdm, bool hfx_on, int Nc, int No, int M, int natoms, int* atno, double* coords, int gs, int gsb, vector<vector<double> >& basis,
double* Pao, double* Pmo, double* jCA, float* grid, float* gridb, float* wt, float* wtb, float* rho, float* vxch, int prl);

void wf_to_grid_gh(bool divide_by_rho, bool calc_rho, int natoms, int* atno, double* coords, vector<vector<double> > basis,
double* Pao, double* gfao, int gs, double* grid, double* wt,
double* rho, double* gf, double* Td, double* TL, int prl);
//void wf_to_grid_gh_ke(int natoms, int* atno, double* coords, vector<vector<double> > basis, double* jCA, int gs, float* grid, float* wt, double* TL, int prl);
//void wf_to_grid_gh_ke_2(int natoms, int* atno, double* coords, vector<vector<double> > basis, int nbas, int nenv, int N, int* atm, int* bas, double* env,
// double* jCA, int gs, float* grid, float* wt, double* Td, int prl);
//void integrate_hole_para_gh(double* rdm, bool full_rdm, bool hfx_on, int Nc, int No, int M, int natoms, int* atno, double* coords, int gs, int gsb, vector<vector<double> >& basis,
// double* Pao, double* Pmo, double* jCA, float* grid, float* gridb, float* wt, float* wtb, float* rho, float* vxch, int prl);


#endif
4 changes: 3 additions & 1 deletion include/integrals.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ void compute_Enp(int natoms, int* atno, float* coords, vector<vector<double> > &
void compute_Enp_para(int ngpu, int natoms, int* atno, float* coords, vector<vector<double> > &basis, int nrad, int nang, double* ang_g0, double* ang_w0, double* En, double* pVp, int prl);
void compute_Enp_para(int ngpu, int natoms, int* atno, float* coords, vector<vector<double> > &basis, int nrad, int nang, double* ang_g0, double* ang_w0, float* En, float* pVp, int prl);

//electric fields in x,y,z (centered at origin)
//electric fields in x,y,z (centered at origin) and confining potential
void compute_Exyz(double rconf, double pconf, int natoms, int* atno, double* coords, bool gbasis, vector<vector<double> > &basis, int nrad, int nang, double* ang_g, double* ang_w, double* S, double* E, int prl);
void compute_Exyz(int natoms, int* atno, double* coords, bool gbasis, vector<vector<double> > &basis, int nrad, int nang, double* ang_g, double* ang_w, double* S, double* E, int prl);

void compute_ST(int natoms, int* atno, float* coords, vector<vector<double> > &basis, int nrad, int nang, double* ang_g0, double* ang_w0, double* S, double* T, int prl);
Expand Down Expand Up @@ -151,6 +152,7 @@ int get_imax_n2ip(int Nmax, int natoms, int N, vector<vector<double> >& basis, v

int find_center_of_grid(float Z1, int nrad);
void get_angular_grid(int size_ang, double* ang_g, double* ang_w);
void get_angular_grid(int size_ang, float* ang_g, float* ang_w);
void acc_assign(int size, float* vec, float v1);
void acc_assign(int size, double* vec, double v1);
void acc_assign(int tid, int size, double* vec, double v1);
Expand Down
Loading
Loading