diff --git a/include/cint.h.in b/include/cint.h.in index 90dce4a1..29abe11f 100644 --- a/include/cint.h.in +++ b/include/cint.h.in @@ -49,9 +49,8 @@ #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 PTR_FRAC_CHARGE 4 +#define RESERVE_ATMLOT 5 #define ATM_SLOTS 6 @@ -131,6 +130,7 @@ #define POINT_NUC 1 #define GAUSSIAN_NUC 2 #define FRAC_CHARGE_NUC 3 +#define FRAC_GAUSS_NUC 4 #define bas(SLOT,I) bas[BAS_SLOTS * (I) + (SLOT)] #define atm(SLOT,I) atm[ATM_SLOTS * (I) + (SLOT)] diff --git a/src/g1e.c b/src/g1e.c index 112b783a..a69951b2 100644 --- a/src/g1e.c +++ b/src/g1e.c @@ -191,7 +191,7 @@ double CINTnuc_mod(double aij, FINT nuc_id, FINT *atm, double *env) double zeta; if (nuc_id < 0) { zeta = env[PTR_RINV_ZETA]; - } else if (atm(NUC_MOD_OF, nuc_id) == GAUSSIAN_NUC) { + } else if ((atm(NUC_MOD_OF, nuc_id)-1) & (GAUSSIAN_NUC-1)) { zeta = env[atm(PTR_ZETA, nuc_id)]; } else { zeta = 0; @@ -225,7 +225,7 @@ FINT CINTg1e_nuc(double *g, CINTEnvVars *envs, FINT nuc_id) if (nuc_id < 0) { fac1 = 2*M_PI * envs->fac[0] * tau / aij; cr = env + PTR_RINV_ORIG; - } else if (atm(NUC_MOD_OF, nuc_id) == FRAC_CHARGE_NUC) { + } else if ((atm(NUC_MOD_OF, nuc_id)-1) & (FRAC_CHARGE_NUC-1)) { fac1 = 2*M_PI * -env[atm[PTR_FRAC_CHARGE+nuc_id*ATM_SLOTS]] * envs->fac[0] * tau / aij; cr = env + atm(PTR_COORD, nuc_id); } else {