Skip to content

Commit

Permalink
...EJB
Browse files Browse the repository at this point in the history
  • Loading branch information
ebylaska committed Nov 18, 2024
1 parent d9dc226 commit 7e9ab9a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Nwpw/pspw/lib/electron/psi_H.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ void psi_H(Pneb *mygrid, Kinetic_Operator *myke, Pseudopotential *mypsp,
mygrid->cc_pack_Sum2(0,vc,vall);
mygrid->c_unpack(0,vall);
mygrid->cr_fft3d(vall);
mygrid->r_zero_ends(vall);

/* add v_field to vall */
if (mypsp->myefield->efield_on)
Expand Down Expand Up @@ -228,6 +229,7 @@ void psi_Hv4(Pneb *mygrid, Kinetic_Operator *myke, Pseudopotential *mypsp,
mygrid->cc_pack_SMul(0, scal2, vsr_l, vall);
mygrid->c_unpack(0, vall);
mygrid->cr_fft3d(vall);
mygrid->r_zero_ends(vall);

/* add vall += vlr_l + vc */
mygrid->rrr_Sum2Add(vlr_l, vc, vall);
Expand Down Expand Up @@ -387,6 +389,7 @@ void gen_vall_DFPT(Pneb *mygrid, Pseudopotential *mypsp, double *vl, double *vc,
mygrid->cc_pack_Sum2(0, vc, tmp);
mygrid->c_unpack(0, tmp);
mygrid->cr_fft3d(tmp);
mygrid->r_zero_ends(tmp);

/* add v_field to tmp */
if (mypsp->myefield->efield_on)
Expand Down Expand Up @@ -432,6 +435,7 @@ void gen_vall_v4_DFPT(Pneb *mygrid, Pseudopotential *mypsp, double *vsr_l,
mygrid->cc_pack_SMul(0, scal2, vsr_l, tmp);
mygrid->c_unpack(0, tmp);
mygrid->cr_fft3d(tmp);
mygrid->r_zero_ends(tmp);

/* add tmp += vlr_l + vc */
mygrid->rrr_Sum2Add(vlr_l, vc, tmp);
Expand Down
3 changes: 3 additions & 0 deletions Nwpw/pspw/lib/exchange-correlation/v_bwexc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ void v_bwexc(const int gga, Pneb *mypneb, const double *dn,
mypneb->c_unpack(0, fdn);
mypneb->cr_fft3d(fdn);
mypneb->rrr_Minus(fn, fdn, xcp);
mypneb->r_zero_ends(xcp);
}

/************************************
Expand Down Expand Up @@ -336,6 +337,8 @@ void v_bwexc(const int gga, Pneb *mypneb, const double *dn,
mypneb->cr_fft3d(fdndn);
mypneb->rrr_Minus(fnup, fdnup, xcpup);
mypneb->rrr_Minus(fndn, fdndn, xcpdn);
mypneb->r_zero_ends(xcpup);
mypneb->r_zero_ends(xcpdn);
}
}

Expand Down
2 changes: 2 additions & 0 deletions Nwpw/pspw/lib/molecule/Molecule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ void Molecule::psi_get_gradient(double *orb, double *vall, double *Horb)
mygrid->cc_pack_copy(1,orb,orb_r);
mygrid->c_unpack(1,orb_r);
mygrid->cr_fft3d(orb_r);
mygrid->r_zero_ends(orb_r);

mygrid->c_pack_zero(1,Horb);
psi_H_orb(mygrid,myelectron->get_myke(),mypsp,orb,orb_r,vall,Horb);
Expand Down Expand Up @@ -964,6 +965,7 @@ void Molecule::epsi_get_gradient(double *orb, double *vall, double *Horb)
mygrid->cc_pack_copy(1,orb,orb_r);
mygrid->c_unpack(1,orb_r);
mygrid->cr_fft3d(orb_r);
mygrid->r_zero_ends(orb_r);

mygrid->c_pack_zero(1,Horb);
psi_H_orb(mygrid,myelectron->get_myke(),mypsp,orb,orb_r,vall,Horb);
Expand Down
5 changes: 5 additions & 0 deletions Nwpw/pspw/lib/psp/Pseudopotential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ static double semicore_check(PGrid *mygrid, bool semicore, double rcore,
/* Put put tmp into real space */
mygrid->c_unpack(0, tmp);
mygrid->cr_fft3d(tmp);
mygrid->r_zero_ends(tmp);

/* square it */
mygrid->r_sqr(tmp);
Expand Down Expand Up @@ -2715,6 +2716,7 @@ void Pseudopotential::semicore_density_update()
/* Put put tmp into real space */
mypneb->c_unpack(0, tmp);
mypneb->cr_fft3d(tmp);
mypneb->r_zero_ends(tmp);

/* square it */
mypneb->r_sqr(tmp);
Expand Down Expand Up @@ -2797,6 +2799,9 @@ void Pseudopotential::semicore_xc_fion(double *vxc, double *fion)
mypneb->cr_fft3d(tmpx);
mypneb->cr_fft3d(tmpy);
mypneb->cr_fft3d(tmpz);
mypneb->r_zero_ends(tmpx);
mypneb->r_zero_ends(tmpy);
mypneb->r_zero_ends(tmpz);

mypneb->rr_Mul(tmp, tmpx);
mypneb->rr_Mul(tmp, tmpy);
Expand Down

0 comments on commit 7e9ab9a

Please sign in to comment.