Skip to content

Commit

Permalink
Support fractional nuclear charges
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Dec 1, 2019
1 parent 60539d0 commit 26b22b1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Version 3.0.19 (2019-11-30):
* support fractional nuclear charges
Version 3.0.18 (2019-07-02):
* Fix undefined varialbe in nabla-rinv integral
* Add integral < i | nabla-rinv | j >
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ qcint (quick libcint)

An optimized libcint branch for X86 platform

version 3.0.18
version 3.0.19

2019-07-02
2019-11-30


What is qcint
Expand Down
2 changes: 2 additions & 0 deletions include/cint.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#define PTR_COORD 1
#define NUC_MOD_OF 2
#define PTR_ZETA 3
#define PTR_FRAC_CHARGE 3
#define RESERVE_ATMLOT1 4
#define RESERVE_ATMLOT2 5
#define ATM_SLOTS 6
Expand Down Expand Up @@ -94,6 +95,7 @@
#define ANG_MAX 12 // l = 0..11
#define POINT_NUC 1
#define GAUSSIAN_NUC 2
#define FRAC_CHARGE_NUC 3

#define bas(SLOT,I) bas[BAS_SLOTS * (I) + (SLOT)]
#define atm(SLOT,I) atm[ATM_SLOTS * (I) + (SLOT)]
Expand Down
2 changes: 2 additions & 0 deletions src/cint_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define PTR_COORD 1
#define NUC_MOD_OF 2
#define PTR_ZETA 3
#define PTR_FRAC_CHARGE 3
#define RESERVE_ATMLOT1 4
#define RESERVE_ATMLOT2 5
#define ATM_SLOTS 6
Expand Down Expand Up @@ -131,3 +132,4 @@

#define POINT_NUC 1
#define GAUSSIAN_NUC 2
#define FRAC_CHARGE_NUC 3
4 changes: 4 additions & 0 deletions src/g1e.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ void CINTg1e_nuc(double *g, CINTEnvVars *envs, int count, int nuc_id)
if (nuc_id < 0) {
fac1 = MM_SET1(2*M_PI) * MM_LOAD(envs->fac) * MM_LOAD(tau) / aij;
cr = env + PTR_RINV_ORIG;
} else if (atm(NUC_MOD_OF,nuc_id) == FRAC_CHARGE_NUC) {
fac1 = MM_SET1(2*M_PI) * MM_SET1(-env[atm[PTR_FRAC_CHARGE+nuc_id*ATM_SLOTS]]);
fac1 = fac1 * MM_LOAD(envs->fac) * MM_LOAD(tau) / aij;
cr = env + atm(PTR_COORD, nuc_id);
} else {
fac1 = MM_SET1(2*M_PI) * MM_SET1(-fabs(atm[CHARGE_OF+nuc_id*ATM_SLOTS]));
fac1 = fac1 * MM_LOAD(envs->fac) * MM_LOAD(tau) / aij;
Expand Down
4 changes: 4 additions & 0 deletions src/g3c1e.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ void CINTg3c1e_nuc(double *g, CINTEnvVars *envs, int count, int nuc_id)
if (nuc_id < 0) {
fac1 = 2./SQRTPI * MM_LOAD(envs->fac) * MM_LOAD(tau) / aijk;
cr = env + PTR_RINV_ORIG;
} else if (atm(NUC_MOD_OF,nuc_id) == FRAC_CHARGE_NUC) {
fac1 = 2./SQRTPI * MM_SET1(-env[atm[PTR_FRAC_CHARGE+nuc_id*ATM_SLOTS]]);
fac1 = fac1 * MM_LOAD(envs->fac) * MM_LOAD(tau) / aijk;
cr = env + atm(PTR_COORD, nuc_id);
} else {
fac1 = 2./SQRTPI * MM_SET1(-fabs(atm[CHARGE_OF+nuc_id*ATM_SLOTS]));
fac1 = fac1 * MM_LOAD(envs->fac) * MM_LOAD(tau) / aijk;
Expand Down

0 comments on commit 26b22b1

Please sign in to comment.