diff --git a/ChangeLog b/ChangeLog index cd5961de..4f2b7e74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,19 @@ -Name -changes +-------------- +June 03, 2025 +Name: Sayan Bhowmik +Changes: README.md, doc/.LaTeX/Introduction.tex, doc/.LaTeX/System.tex, doc/Manual.pdf, + src/atom/initializationAtom.c, src/atom/sparcAtom.c, src/include/isddft.h, + src/initialization.c, src/readfiles.c, src/xc/hubbard/hubbardForce.c, + src/xc/hubbard/hubbardStress.c, src/xc/locOrbRoutines.c, + src/xc/hubbard/occupationMatrix.c, tests/MoO3_hubbard/, + tests/NiO_spin_kpts_non_ortho_hubbard/, tests/TiCrO4_kpt_hubbard/ +1. Changed i/o format for DFT+U. +2. Fixed minor bug in atom code. +3. Updated doc. + -------------- June 02, 2025 Name: Lucas Timmerman diff --git a/README.md b/README.md index f93e587b..8e90ed4d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ SPARC is an open-source software package for the accurate, effcient, and scalabl * Spin-orbit coupling (SOC). * Noncollinear spin. * Dispersion interactions through DFT-D3, vdW-DF1, and vdW-DF2. +* DFT+U through Dudarev's formulation. * Symmetry-adaption for cyclic and/or helical symmetries (Cyclix-DFT). * O(N) Spectral Quadrature (SQ) method. * On-the-fly machine-learned force field (MLFF) molecular dynamics (MD) simulations. diff --git a/doc/.LaTeX/Introduction.tex b/doc/.LaTeX/Introduction.tex index 5242cb97..e67cfde2 100644 --- a/doc/.LaTeX/Introduction.tex +++ b/doc/.LaTeX/Introduction.tex @@ -33,7 +33,7 @@ \item \textbf{Boqin Zhang}: vdW-DF, DFT-D3, meta-GGA (SCAN) \\ \item \textbf{Shashikant Kumar}: Testing framework, NLCC, MLFF \\ \item \textbf{Mostafa Faghih Shojaei}: SPMS table of pseudopotentials \\ - \item \textbf{Sayan Bhowmik\footnotemark{}}: Atom code, DFT+U (Dudarev) \\ + \item \textbf{Sayan Bhowmik\footnotemark}: Atom code, DFT+U (Dudarev) \\ \item \textbf{Swarnava Ghosh}: Preliminary development \\ \item \textbf{Deepa Phanish}: Initial development \end{itemize} @@ -282,6 +282,7 @@ \hyperlink{COORD_FRAC}{\texttt{COORD\_FRAC}} $\vert$ \hyperlink{RELAX}{\texttt{RELAX}} $\vert$ \hyperlink{SPIN}{\texttt{SPIN}} $\vert$ + \hyperlink{HUBBARD_FLAG}{\texttt{HUBBARD\_FLAG}} $\vert$ \hyperlink{HUBBARD}{\texttt{HUBBARD}} $\vert$ \hyperlink{U_ATOM_TYPE}{\texttt{U\_ATOM\_TYPE}} $\vert$ \hyperlink{U_VAL}{\texttt{U\_VAL}} diff --git a/doc/.LaTeX/System.tex b/doc/.LaTeX/System.tex index 8feb0312..0cf138fa 100644 --- a/doc/.LaTeX/System.tex +++ b/doc/.LaTeX/System.tex @@ -777,6 +777,40 @@ \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[allowframebreaks]{\texttt{HUBBARD\_FLAG}} \label{HUBBARD_FLAG} +\vspace*{-12pt} +\begin{columns} +\column{0.4\linewidth} +\begin{block}{Type} +0 or 1 +\end{block} + +\begin{block}{Default} +\texttt{0} +\end{block} + +\column{0.4\linewidth} +\begin{block}{Unit} +No unit +\end{block} + +\begin{block}{Example} +\texttt{HUBBARD\_FLAG}: \texttt{1} +\end{block} +\end{columns} + +\begin{block}{Description} +Flag for adding hubbard correction on top of the \hyperlink{EXCHANGE_CORRELATION}{\texttt{EXCHANGE\_CORRELATION}}. +\end{block} + +\begin{block}{Remark} +Usually used along with LDA, GGA or SCAN type functionals. +\end{block} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[allowframebreaks,c]{} \label{System:ion} @@ -1053,13 +1087,17 @@ \begin{block}{Example} \texttt{HUBBARD: \\} -\texttt{U\_ATOM\_TYPE: Ni \\} -\texttt{U\_VAL:} 0 0 0.05 0 \\ +% \texttt{U\_ATOM\_TYPE: Ni \\} +% \texttt{U\_VAL:} 0 0 0.05 0 \\ \end{block} \end{columns} \begin{block}{Description} -Triggers a DFT+U calculation on top of the \hyperlink{EXCHANGE_CORRELATION}{\texttt{EXCHANGE\_CORRELATION}} specified in the \texttt{.inpt} file. Must be followed by specifying the atoms on which a U correction is desired along with value of U as per Dudarev's scheme. +Start of the DFT+U parameter block. Must be followed by specifying the atoms on which a U correction is desired along with value of U as per Dudarev's scheme. +\end{block} + +\begin{block}{Remark} +\hyperlink{HUBBARD_FLAG}{HUBBARD\_FLAG} must be specified to 1 in \texttt{.inpt} file. \end{block} \end{frame} diff --git a/doc/Manual.pdf b/doc/Manual.pdf index 9bae3e9a..5e71cecf 100644 Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ diff --git a/src/atom/initializationAtom.c b/src/atom/initializationAtom.c index 0eb73090..0a8d6d81 100644 --- a/src/atom/initializationAtom.c +++ b/src/atom/initializationAtom.c @@ -249,7 +249,7 @@ void copy_PSP_atom(SPARC_ATOM_OBJ *pSPARC_ATOM, SPARC_OBJ *pSPARC, int ityp) { for (int l = 0; l <= pSPARC_ATOM->psd->lmax; l++) { pSPARC_ATOM->psd->rc[l] = pSPARC->psd[ityp].rc[l]; pSPARC_ATOM->psd->ppl[l] = pSPARC->psd[ityp].ppl[l]; - lpos[l+1] = lpos[l] + pSPARC->psd->ppl[l]; + lpos[l+1] = lpos[l] + pSPARC_ATOM->psd->ppl[l]; } int nproj = lpos[lmax+1]; diff --git a/src/atom/sparcAtom.c b/src/atom/sparcAtom.c index a1f8b0e7..1c2dc7fb 100644 --- a/src/atom/sparcAtom.c +++ b/src/atom/sparcAtom.c @@ -34,12 +34,12 @@ void sparc_atom(SPARC_OBJ *pSPARC, int ityp, SPARC_INPUT_OBJ *pSPARC_Input) { electronicGroundState_atom(&pSPARC_ATOM); // Printing - if (!pSPARC->is_hubbard){ + if (!pSPARC_Input->is_hubbard){ printResultsAtom(&pSPARC_ATOM); } // Copy solution - if (pSPARC->is_hubbard) copyAtomSolution(&pSPARC_ATOM, pSPARC, ityp); + if (pSPARC_Input->is_hubbard) copyAtomSolution(&pSPARC_ATOM, pSPARC, ityp); // Free memory Finalize_Atom(&pSPARC_ATOM); diff --git a/src/include/isddft.h b/src/include/isddft.h index 79def53f..af44a959 100644 --- a/src/include/isddft.h +++ b/src/include/isddft.h @@ -1471,6 +1471,9 @@ typedef struct _SPARC_INPUT_OBJ{ double exx_frac; // hybrid mixing coefficient int ExxMethod; // method for solving poissons equation, kronecker product way or FFT + /* DFT+U */ + int is_hubbard; // DFT+U flag + /* SQ methods */ int sqAmbientFlag; // Flag of SQ method // int SQ_highT_gauss_mem; // Memory option for gauss quadrature diff --git a/src/initialization.c b/src/initialization.c index fb29141e..b6f700b3 100644 --- a/src/initialization.c +++ b/src/initialization.c @@ -55,8 +55,8 @@ #define min(x,y) ((x)<(y)?(x):(y)) #define max(x,y) ((x)>(y)?(x):(y)) -//#define N_MEMBR 209 -#define N_MEMBR 208 +#define N_MEMBR 209 +// #define N_MEMBR 208 /** @@ -300,8 +300,8 @@ void Initialize(SPARC_OBJ *pSPARC, int argc, char *argv[]) { t1 = MPI_Wtime(); #endif - // broadcast hubbard flag - MPI_Bcast(&pSPARC->is_hubbard, 1, MPI_INT, 0, MPI_COMM_WORLD); + // // broadcast hubbard flag + // MPI_Bcast(&pSPARC->is_hubbard, 1, MPI_INT, 0, MPI_COMM_WORLD); // broadcast Ntypes read from ion file MPI_Ibcast(&pSPARC->Ntypes, 1, MPI_INT, 0, MPI_COMM_WORLD, &req); @@ -341,8 +341,8 @@ void Initialize(SPARC_OBJ *pSPARC, int argc, char *argv[]) { t2 = MPI_Wtime(); if (rank == 0) printf("Broadcasting the input parameters took %.3f ms\n",(t2-t1)*1000); #endif - // broadcast hubbard flag - MPI_Bcast(&pSPARC->is_hubbard, 1, MPI_INT, 0, MPI_COMM_WORLD); + // // broadcast hubbard flag + // MPI_Bcast(&pSPARC->is_hubbard, 1, MPI_INT, 0, MPI_COMM_WORLD); // broadcast Ntypes read from ion file MPI_Ibcast(&pSPARC->Ntypes, 1, MPI_INT, 0, MPI_COMM_WORLD, &req); @@ -967,6 +967,9 @@ void set_defaults(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { // read in initial density pSPARC_Input->readInitDens = 0; + // DFT+U + pSPARC_Input->is_hubbard = 0; + /* Default socket options Note to future developers: please keep the USE_SOCKET macro as the LAST PART of the initialization function!! @@ -1571,6 +1574,7 @@ void SPARC_copy_input(SPARC_OBJ *pSPARC, SPARC_INPUT_OBJ *pSPARC_Input) { pSPARC->OFDFT_tol = pSPARC_Input->OFDFT_tol; pSPARC->OFDFT_lambda = pSPARC_Input->OFDFT_lambda; pSPARC->twist = pSPARC_Input->twist; + pSPARC->is_hubbard = pSPARC_Input->is_hubbard; // DFT+U // char type values strncpy(pSPARC->MDMeth , pSPARC_Input->MDMeth,sizeof(pSPARC->MDMeth)); @@ -3777,6 +3781,8 @@ void write_output_init(SPARC_OBJ *pSPARC) { fprintf(output_fp,"EXX_RANGE_FOCK: %.6f\n", pSPARC->hyb_range_fock); fprintf(output_fp,"EXX_RANGE_PBE: %.6f\n", pSPARC->hyb_range_pbe); } + // DFT+U + fprintf(output_fp, "HUBBARD_FLAG: %d\n", pSPARC->is_hubbard); if (pSPARC->sqAmbientFlag == 1 || pSPARC->sqHighTFlag == 1) { if (pSPARC->sqAmbientFlag) fprintf(output_fp,"SQ_AMBIENT_FLAG: %d\n", pSPARC->sqAmbientFlag); if (pSPARC->sqHighTFlag) fprintf(output_fp,"SQ_HIGHT_FLAG: %d\n", pSPARC->sqHighTFlag); @@ -4056,6 +4062,7 @@ void write_output_init(SPARC_OBJ *pSPARC) { pSPARC->stress_rel_scale[4], pSPARC->stress_rel_scale[5]); fprintf(output_fp, "MLFF_DFT_FQ: %d\n", pSPARC->MLFF_DFT_fq); } + fprintf(output_fp,"VERBOSITY: %d\n",pSPARC->Verbosity); fprintf(output_fp,"PRINT_FORCES: %d\n",pSPARC->PrintForceFlag); @@ -4329,7 +4336,7 @@ void SPARC_Input_MPI_create(MPI_Datatype *pSPARC_INPUT_MPI) { MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, - MPI_INT, MPI_INT, MPI_INT, /* int array */ + MPI_INT, MPI_INT, MPI_INT, MPI_INT, /* int array */ MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, @@ -4373,7 +4380,7 @@ void SPARC_Input_MPI_create(MPI_Datatype *pSPARC_INPUT_MPI) { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, /* int */ + 1, 1, 1, 1, /* int */ 9, 3, L_QMASS, L_kpoint, L_kpoint, L_kpoint, 6, /* double array */ 1, 1, 1, 1, 1, @@ -4520,6 +4527,7 @@ void SPARC_Input_MPI_create(MPI_Datatype *pSPARC_INPUT_MPI) { MPI_Get_address(&sparc_input_tmp.N_rgrid_MLFF, addr + i++); MPI_Get_address(&sparc_input_tmp.MLFF_DFT_fq, addr + i++); MPI_Get_address(&sparc_input_tmp.REFERENCE_CUTOFF_FAC, addr + i++); + MPI_Get_address(&sparc_input_tmp.is_hubbard, addr + i++); // double array type MPI_Get_address(&sparc_input_tmp.LatVec, addr + i++); diff --git a/src/readfiles.c b/src/readfiles.c index 778a6bed..442644f3 100644 --- a/src/readfiles.c +++ b/src/readfiles.c @@ -1012,6 +1012,8 @@ void read_input(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { } else if(strcmpi(str,"PRINT_ENERGY_DENSITY:") == 0) { fscanf(input_fp,"%d",&pSPARC_Input->PrintEnergyDensFlag); fscanf(input_fp, "%*[^\n]\n"); + } else if(strcmpi(str,"HUBBARD_FLAG:") == 0) { + fscanf(input_fp,"%d",&pSPARC_Input->is_hubbard); } else { printf("\nCannot recognize input variable identifier: \"%s\"\n",str); exit(EXIT_FAILURE); @@ -1848,7 +1850,7 @@ void read_ion(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { //////////////////////////// HUBBARD BLOCK /////////////////////////////////// // @author: Sayan Bhowmik (sbhowmik9@gatech.edu) - pSPARC->is_hubbard = 0; + // pSPARC->is_hubbard = 0; fseek(ion_fp, 0L, SEEK_SET); /* Identify atom types for which radial solve is desired */ @@ -1869,9 +1871,13 @@ void read_ion(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { #ifdef DEBUG printf("Found Hubbard block.\n"); #endif + if (pSPARC_Input->is_hubbard == 0) { + printf("Please specify HUBBARD_FALG: 1 in the .inpt file.\n"); + exit(EXIT_FAILURE); + } pSPARC->atomSolvSpinFlag = 0; atm_flag = 1; - pSPARC->is_hubbard = 1; + // pSPARC->is_hubbard = 1; pSPARC->AtmU = (HUB_DUDAREV_OBJ *)malloc(pSPARC->Ntypes*sizeof(HUB_DUDAREV_OBJ)); // initialise the AtmU object fscanf(ion_fp, "%*[^\n]\n"); } else if (strcmpi(str, "U_ATOM_TYPE:") == 0) { @@ -1896,7 +1902,8 @@ void read_ion(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { } else { typcnt++; if (pSPARC->atom_solve_flag != NULL) { - pSPARC->atom_solve_flag[typcnt] = 1; + // pSPARC->atom_solve_flag[typcnt] = 1; + pSPARC->atom_solve_flag[id_OG] = 1; } else { printf("Check if you have indicated start of the HUBBARD block...\n"); printf("Include the following line to indicate start of the block\n"); @@ -1907,8 +1914,10 @@ void read_ion(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { free(local_str); } else if(strcmpi(str, "U_VAL:") == 0) { - Uval_count = fscanf(ion_fp,"%lf %lf %lf %lf",&pSPARC->AtmU[typcnt].U[0], &pSPARC->AtmU[typcnt].U[1], - &pSPARC->AtmU[typcnt].U[2], &pSPARC->AtmU[typcnt].U[3]); + // Uval_count = fscanf(ion_fp,"%lf %lf %lf %lf",&pSPARC->AtmU[typcnt].U[0], &pSPARC->AtmU[typcnt].U[1], + // &pSPARC->AtmU[typcnt].U[2], &pSPARC->AtmU[typcnt].U[3]); + Uval_count = fscanf(ion_fp,"%lf %lf %lf %lf",&pSPARC->AtmU[id_OG].U[0], &pSPARC->AtmU[id_OG].U[1], + &pSPARC->AtmU[id_OG].U[2], &pSPARC->AtmU[id_OG].U[3]); if (Uval_count != 4) { printf("\nError: U_VAL must have exactly 4 values corresponding to s p d f orbitals. Found %d values.\n", Uval_count); exit(EXIT_FAILURE); @@ -1923,7 +1932,7 @@ void read_ion(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) { } // checks - if ((pSPARC->is_hubbard == 1) && (typcnt+1 == 0)) { + if ((pSPARC_Input->is_hubbard == 1) && (typcnt+1 == 0)) { printf("\nPlease specify atoms where you want to apply hubbard corrections.\n"); exit(EXIT_FAILURE); } diff --git a/src/xc/hubbard/hubbardForce.c b/src/xc/hubbard/hubbardForce.c index 84ba0341..44404fc4 100644 --- a/src/xc/hubbard/hubbardForce.c +++ b/src/xc/hubbard/hubbardForce.c @@ -227,7 +227,7 @@ void Compute_Integral_Orb_Dpsi(SPARC_OBJ *pSPARC, double *dpsi, double *beta) { * @brief Calculate forces in gamma point using integrals. */ void Compute_force_hubbard_by_integrals(SPARC_OBJ *pSPARC, double *force_hub, double *alpha) { - int n, ityp, iat, ncol, atom_index, atom_index2, count; + int n, ityp, iat, ncol, atom_index, atom_index2, first_id, count; int spinor, Nspinor, hub_sp; double *pre_fac; int angnum; @@ -283,10 +283,15 @@ void Compute_force_hubbard_by_integrals(SPARC_OBJ *pSPARC, double *force_hub, do for (spinor = 0; spinor < Nspinor; spinor++) { int spinorshift = pSPARC->IP_displ_U[atm_idx] * ncol * spinor; - atom_index = 0; + atom_index = 0; first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { - if (!pSPARC->atom_solve_flag[ityp]) continue; + if (!pSPARC->atom_solve_flag[ityp]) { + if (first_id == 0) atom_index += pSPARC->nAtomv[ityp]; + continue; + } + + if (first_id == 0) first_id++; angnum = pSPARC->AtmU[ityp].angnum; for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { @@ -315,14 +320,17 @@ void Compute_force_hubbard_by_integrals(SPARC_OBJ *pSPARC, double *force_hub, do hub_sp = spinor; } - atom_index = 0; atom_index2 = 0; + atom_index = 0; atom_index2 = 0, first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { if (!pSPARC->atom_solve_flag[ityp]) { - continue; atom_index += pSPARC->nAtomv[ityp]; + if (first_id == 0) atom_index2 = atom_index; + continue; } + if (first_id == 0) first_id++; + angnum = pSPARC->AtmU[ityp].angnum; for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { @@ -663,7 +671,7 @@ void Compute_Integral_Orb_Dpsi_kpt(SPARC_OBJ *pSPARC, double _Complex *dpsi, dou * @brief Calculate k-point DFT+U forces using integral. */ void Compute_force_hubbard_by_integrals_kpt(SPARC_OBJ *pSPARC, double *force_hub, double _Complex *alpha) { - int k, n, ityp, iat, ncol, atom_index, atom_index2, count, Nk; + int k, n, ityp, iat, ncol, atom_index, atom_index2, first_id, count, Nk; int spinor, Nspinor, hub_sp, *IP_displ_U; ncol = pSPARC->Nband_bandcomm; // number of bands assigned Nk = pSPARC->Nkpts_kptcomm; @@ -721,10 +729,15 @@ void Compute_force_hubbard_by_integrals_kpt(SPARC_OBJ *pSPARC, double *force_hub for (spinor = 0; spinor < Nspinor; spinor++) { int spinorshift = pSPARC->IP_displ_U[atm_idx] * ncol * Nspinor * k + pSPARC->IP_displ_U[atm_idx] * ncol * spinor; - atom_index = 0; + atom_index = 0; first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { - if (!pSPARC->atom_solve_flag[ityp]) continue; + if (!pSPARC->atom_solve_flag[ityp]) { + if (first_id == 0) atom_index += pSPARC->nAtomv[ityp]; + continue; + } + + if (first_id == 0) first_id++; angnum = pSPARC->AtmU[ityp].angnum; for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { @@ -756,14 +769,17 @@ void Compute_force_hubbard_by_integrals_kpt(SPARC_OBJ *pSPARC, double *force_hub hub_sp = spinor; } - atom_index = 0; atom_index2 = 0; + atom_index = 0; atom_index2 = 0, first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { if (!pSPARC->atom_solve_flag[ityp]) { - continue; atom_index += pSPARC->nAtomv[ityp]; + if (first_id == 0) atom_index2 = atom_index; + continue; } + if (first_id == 0) first_id++; + angnum = pSPARC->AtmU[ityp].angnum; for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { diff --git a/src/xc/hubbard/hubbardStress.c b/src/xc/hubbard/hubbardStress.c index 07d7f2ac..c3551759 100644 --- a/src/xc/hubbard/hubbardStress.c +++ b/src/xc/hubbard/hubbardStress.c @@ -383,14 +383,17 @@ void Compute_stress_tensor_hubbard_by_integrals(SPARC_OBJ *pSPARC,double *stress // g_n stored here double *alpha_gn = (double *)calloc( pSPARC->IP_displ_U[atm_idx] * ncol * Nspinor, sizeof(double)); - int atmcount; + int atmcount, first_id; for (spinor = 0; spinor < Nspinor; spinor++) { int spinorshift = pSPARC->IP_displ_U[atm_idx] * ncol * spinor; - atmcount = 0; + atmcount = 0; first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { - if (!pSPARC->atom_solve_flag[ityp]) continue; + if (!pSPARC->atom_solve_flag[ityp]) { + if (first_id == 0) atmcount += pSPARC->nAtomv[ityp]; + continue; + } for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { // Scale each column of < Orb_Jlm, x_n > with g_n (size: m x Ns_loc) @@ -883,16 +886,21 @@ void Compute_stress_tensor_hubbard_by_integrals_kpt(SPARC_OBJ *pSPARC, double *s // g_nk stored here double _Complex *alpha_gnk = (double _Complex *)calloc( pSPARC->IP_displ_U[atm_idx] * ncol * Nspinor * Nk, sizeof(double _Complex)); - int angnum, atmcount; + int angnum, atmcount, first_id; for (k = 0; k < Nk; k++) { for (spinor = 0; spinor < Nspinor; spinor++) { int spinorshift = pSPARC->IP_displ_U[atm_idx] * ncol * Nspinor * k + pSPARC->IP_displ_U[atm_idx] * ncol * spinor; - atmcount = 0; + atmcount = 0; first_id = 0; for (ityp = 0; ityp < pSPARC->Ntypes; ityp++) { - if (!pSPARC->atom_solve_flag[ityp]) continue; + if (!pSPARC->atom_solve_flag[ityp]) { + if (first_id == 0) atmcount += pSPARC->nAtomv[ityp]; + continue; + } + + if (first_id == 0) first_id++; angnum = pSPARC->AtmU[ityp].angnum; for (iat = 0; iat < pSPARC->nAtomv[ityp]; iat++) { diff --git a/src/xc/hubbard/locOrbRoutines.c b/src/xc/hubbard/locOrbRoutines.c index 39ff73e3..ed15d9e9 100644 --- a/src/xc/hubbard/locOrbRoutines.c +++ b/src/xc/hubbard/locOrbRoutines.c @@ -724,6 +724,7 @@ void CalculateLocalInnerProductIndex(SPARC_OBJ *pSPARC) { if (!pSPARC->atom_solve_flag[ityp]) { atom_index += pSPARC->nAtomv[ityp]; + if (id == 0) atom_index2 = atom_index; continue; } diff --git a/src/xc/hubbard/occupationMatrix.c b/src/xc/hubbard/occupationMatrix.c index d03c23f8..b877d2d0 100644 --- a/src/xc/hubbard/occupationMatrix.c +++ b/src/xc/hubbard/occupationMatrix.c @@ -304,6 +304,7 @@ void CalculateOccMatAtomIndex(SPARC_OBJ *pSPARC) { if (!pSPARC->atom_solve_flag[ityp]) { atom_index += pSPARC->nAtomv[ityp]; + if (id == 0) atom_index2 = atom_index; continue; } diff --git a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.inpt b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.inpt index c282758f..75a7cc4d 100644 --- a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.inpt +++ b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.inpt @@ -9,6 +9,7 @@ MESH_SPACING: 0.16 KPOINT_GRID: 1 1 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-6 PRINT_FORCES: 1 PRINT_ATOMS: 1 diff --git a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refout b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refout index 2ab8c43a..6a9512b6 100644 --- a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refout +++ b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 16:26:11 2025 * +* Start time: Mon Jun 2 16:53:03 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 0 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 24 CHEB_DEGREE: 41 CHEFSI_BOUND_FLAG: 0 @@ -67,13 +68,13 @@ Density: 1.0391323858E-01 (amu/Bohr^3), 1.1644385611E+00 (g/cc) NP_SPIN_PARAL: 1 NP_KPOINT_PARAL: 1 NP_BAND_PARAL: 24 -NP_DOMAIN_PARAL: 1 1 1 -NP_DOMAIN_PHI_PARAL: 2 2 6 +NP_DOMAIN_PARAL: 1 1 2 +NP_DOMAIN_PHI_PARAL: 2 3 8 EIG_SERIAL_MAXNS: 1500 *************************************************************************** Initialization *************************************************************************** -Number of processors : 24 +Number of processors : 48 Mesh spacing in x-direction : 0.15805 (Bohr) Mesh spacing in y-direction : 0.157611 (Bohr) Mesh spacing in z-direction : 0.159117 (Bohr) @@ -92,63 +93,63 @@ Pseudopotential : ../../../psps/08_O_6_1.2_1.4_pbe_n_v1.0.ps Atomic mass : 15.9994 Pseudocharge radii of atom type 2 : 6.95 6.93 7.00 (x, y, z dir) Number of atoms of type 2 : 3 -Estimated total memory usage : 539.70 MB -Estimated memory per processor : 22.49 MB +Estimated total memory usage : 539.71 MB +Estimated memory per processor : 11.24 MB =================================================================== Self Consistent Field (SCF#1) =================================================================== Iteration Free Energy (Ha/atom) SCF Error Timing (sec) -1 -2.9924842254E+01 2.148E-01 3.592 -2 -2.9845533284E+01 2.124E-01 1.179 -3 -2.9840685865E+01 1.230E-01 1.169 -4 -2.9825846873E+01 7.381E-02 1.106 -5 -2.9825307109E+01 6.218E-02 1.142 -6 -2.9825525020E+01 3.720E-02 1.131 -7 -2.9825570949E+01 3.003E-02 1.097 -8 -2.9825390600E+01 1.642E-02 1.095 -9 -2.9825439872E+01 1.976E-02 1.089 -10 -2.9825363914E+01 7.871E-03 1.081 -11 -2.9825350485E+01 1.812E-03 1.084 -12 -2.9825356064E+01 6.983E-04 1.067 -13 -2.9825359098E+01 4.481E-04 1.067 -14 -2.9825362131E+01 3.132E-04 1.065 -15 -2.9825363916E+01 1.434E-04 1.070 -16 -2.9825365772E+01 6.084E-05 1.035 -17 -2.9825366232E+01 8.424E-05 1.035 -18 -2.9825366486E+01 5.266E-05 1.039 -19 -2.9825366955E+01 3.863E-05 1.038 -20 -2.9825367207E+01 1.362E-05 0.985 -21 -2.9825367238E+01 8.403E-06 0.985 -22 -2.9825367296E+01 5.652E-06 0.987 -23 -2.9825367353E+01 3.932E-06 0.989 -24 -2.9825367379E+01 3.666E-06 0.976 -25 -2.9825367384E+01 1.791E-06 0.964 -26 -2.9825367393E+01 1.315E-06 0.967 -27 -2.9825367406E+01 1.268E-06 0.959 -28 -2.9825367400E+01 1.129E-06 0.951 -29 -2.9825367383E+01 7.228E-07 0.956 +1 -2.9929153101E+01 2.181E-01 2.300 +2 -2.9850207686E+01 2.275E-01 0.710 +3 -2.9841047338E+01 1.236E-01 0.701 +4 -2.9825557273E+01 7.272E-02 0.672 +5 -2.9825078298E+01 6.008E-02 0.689 +6 -2.9825240253E+01 2.642E-02 0.688 +7 -2.9825380550E+01 2.194E-02 0.666 +8 -2.9825333620E+01 1.021E-02 0.671 +9 -2.9825642510E+01 3.223E-02 0.681 +10 -2.9825350049E+01 4.202E-03 0.659 +11 -2.9825354543E+01 4.275E-03 0.664 +12 -2.9825357425E+01 1.142E-03 0.649 +13 -2.9825359038E+01 5.435E-04 0.657 +14 -2.9825362144E+01 5.525E-04 0.655 +15 -2.9825363922E+01 1.200E-04 0.650 +16 -2.9825365245E+01 1.065E-04 0.649 +17 -2.9825366183E+01 5.495E-05 0.641 +18 -2.9825366621E+01 3.495E-05 0.642 +19 -2.9825366951E+01 3.830E-05 0.641 +20 -2.9825367193E+01 1.438E-05 0.619 +21 -2.9825367265E+01 7.522E-06 0.613 +22 -2.9825367316E+01 5.679E-06 0.615 +23 -2.9825367356E+01 3.540E-06 0.608 +24 -2.9825367366E+01 2.375E-06 0.609 +25 -2.9825367390E+01 1.887E-06 0.603 +26 -2.9825367401E+01 1.309E-06 0.606 +27 -2.9825367401E+01 3.430E-06 0.602 +28 -2.9825367394E+01 1.001E-06 0.603 +29 -2.9825367405E+01 6.129E-07 0.595 Total number of SCF: 29 ==================================================================== Energy and force calculation ==================================================================== -Free energy per atom : -2.9825367383E+01 (Ha/atom) -Total free energy : -1.1930146953E+02 (Ha) -Band structure energy : -2.3221879148E+01 (Ha) -Exchange correlation energy : -2.2316710081E+01 (Ha) +Free energy per atom : -2.9825367405E+01 (Ha/atom) +Total free energy : -1.1930146962E+02 (Ha) +Band structure energy : -2.3221909770E+01 (Ha) +Exchange correlation energy : -2.2316709683E+01 (Ha) Self and correction energy : -2.0212522639E+02 (Ha) --Entropy*kb*T : -8.3648834911E-03 (Ha) -Fermi level : -1.9468212515E-01 (Ha) -U correction : 8.6244837597E-02 (Ha) -RMS force : 7.6025293540E-02 (Ha/Bohr) -Maximum force : 1.2229887006E-01 (Ha/Bohr) -Time for force calculation : 0.100 (sec) -Pressure : 9.3175442879E-01 (GPa) -Maximum stress : 7.5757588386E+00 (GPa) -Time for stress calculation : 0.199 (sec) +-Entropy*kb*T : -8.3648870493E-03 (Ha) +Fermi level : -1.9468311965E-01 (Ha) +U correction : 8.6244781453E-02 (Ha) +RMS force : 7.6026058458E-02 (Ha/Bohr) +Maximum force : 1.2230061988E-01 (Ha/Bohr) +Time for force calculation : 0.067 (sec) +Pressure : 9.3170381743E-01 (GPa) +Maximum stress : 7.5757041629E+00 (GPa) +Time for stress calculation : 0.135 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 35.203 sec +Total walltime : 22.228 sec ___________________________________________________________________________ *************************************************************************** diff --git a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refstatic b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refstatic index 2b267bd4..d785e9d4 100644 --- a/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refstatic +++ b/tests/MoO3_hubbard/high_accuracy/MoO3_hubbard.refstatic @@ -7,13 +7,13 @@ Fractional coordinates of O: 0.2500000000 0.4663270000 0.7183440000 0.2500000000 0.4985360000 0.4355850000 0.2500000000 0.9826820000 0.5870910000 -Total free energy (Ha): -1.193014695322731E+02 +Total free energy (Ha): -1.193014696215782E+02 Atomic forces (Ha/Bohr): - 4.7554589110E-08 -1.0385061993E-01 6.4591503774E-02 - -7.3124701644E-09 1.6908845895E-02 -1.8655492154E-02 - 4.9771392645E-09 4.7380131261E-03 3.8494779229E-02 - -4.5219258210E-08 8.2203760904E-02 -8.4430790848E-02 + 5.8043514393E-08 -1.0385251796E-01 6.4591765234E-02 + -2.5836392522E-08 1.6909401279E-02 -1.8655094474E-02 + -2.4576601327E-08 4.7384015779E-03 3.8494806233E-02 + -7.6305205432E-09 8.2204715109E-02 -8.4431476993E-02 Stress (GPa): - 6.0230490387E-01 6.8574074469E-07 -1.0814453528E-07 - 6.8574074469E-07 -7.5757588386E+00 3.0230981368E-02 - -1.0814453528E-07 3.0230981368E-02 4.1781906484E+00 + 6.0226469799E-01 -3.7372390963E-06 -5.4109929862E-07 + -3.7372390963E-06 -7.5757041629E+00 3.0278140241E-02 + -5.4109929862E-07 3.0278140241E-02 4.1783280126E+00 diff --git a/tests/MoO3_hubbard/standard/MoO3_hubbard.inpt b/tests/MoO3_hubbard/standard/MoO3_hubbard.inpt index e906768e..c9dec598 100644 --- a/tests/MoO3_hubbard/standard/MoO3_hubbard.inpt +++ b/tests/MoO3_hubbard/standard/MoO3_hubbard.inpt @@ -9,6 +9,7 @@ MESH_SPACING: 0.2 KPOINT_GRID: 1 1 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-6 PRINT_FORCES: 1 PRINT_ATOMS: 1 diff --git a/tests/MoO3_hubbard/standard/MoO3_hubbard.refout b/tests/MoO3_hubbard/standard/MoO3_hubbard.refout index cbb9adcc..76ab6fa8 100644 --- a/tests/MoO3_hubbard/standard/MoO3_hubbard.refout +++ b/tests/MoO3_hubbard/standard/MoO3_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 16:15:42 2025 * +* Start time: Mon Jun 2 16:49:31 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 0 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 24 CHEB_DEGREE: 35 CHEFSI_BOUND_FLAG: 0 @@ -67,13 +68,13 @@ Density: 1.0391323858E-01 (amu/Bohr^3), 1.1644385611E+00 (g/cc) NP_SPIN_PARAL: 1 NP_KPOINT_PARAL: 1 NP_BAND_PARAL: 24 -NP_DOMAIN_PARAL: 1 1 1 -NP_DOMAIN_PHI_PARAL: 2 2 6 +NP_DOMAIN_PARAL: 1 1 2 +NP_DOMAIN_PHI_PARAL: 2 3 8 EIG_SERIAL_MAXNS: 1500 *************************************************************************** Initialization *************************************************************************** -Number of processors : 24 +Number of processors : 48 Mesh spacing in x-direction : 0.198691 (Bohr) Mesh spacing in y-direction : 0.19494 (Bohr) Mesh spacing in z-direction : 0.199191 (Bohr) @@ -92,63 +93,63 @@ Pseudopotential : ../../../psps/08_O_6_1.2_1.4_pbe_n_v1.0.ps Atomic mass : 15.9994 Pseudocharge radii of atom type 2 : 7.15 7.21 7.17 (x, y, z dir) Number of atoms of type 2 : 3 -Estimated total memory usage : 277.27 MB -Estimated memory per processor : 11.55 MB +Estimated total memory usage : 277.29 MB +Estimated memory per processor : 5.78 MB =================================================================== Self Consistent Field (SCF#1) =================================================================== Iteration Free Energy (Ha/atom) SCF Error Timing (sec) -1 -2.9935164236E+01 2.132E-01 1.535 -2 -2.9848945672E+01 2.212E-01 0.485 -3 -2.9841468195E+01 1.228E-01 0.485 -4 -2.9825708523E+01 7.280E-02 0.463 -5 -2.9825235687E+01 6.162E-02 0.478 -6 -2.9825563307E+01 3.582E-02 0.473 -7 -2.9825495904E+01 2.503E-02 0.459 -8 -2.9825448933E+01 1.546E-02 0.464 -9 -2.9825651453E+01 3.022E-02 0.485 -10 -2.9825413723E+01 4.893E-03 0.449 -11 -2.9825409800E+01 1.736E-03 0.456 -12 -2.9825418048E+01 1.769E-03 0.447 -13 -2.9825419315E+01 4.520E-04 0.448 -14 -2.9825422993E+01 4.612E-04 0.447 -15 -2.9825424800E+01 1.583E-04 0.446 -16 -2.9825426126E+01 8.404E-05 0.439 -17 -2.9825426669E+01 9.845E-05 0.441 -18 -2.9825427045E+01 5.245E-05 0.442 -19 -2.9825427561E+01 2.146E-05 0.431 -20 -2.9825427754E+01 1.208E-05 0.422 -21 -2.9825427835E+01 8.334E-06 0.419 -22 -2.9825427883E+01 5.844E-06 0.416 -23 -2.9825427917E+01 4.403E-06 0.418 -24 -2.9825427944E+01 2.828E-06 0.418 -25 -2.9825427972E+01 1.926E-06 0.413 -26 -2.9825427989E+01 1.394E-06 0.411 -27 -2.9825427978E+01 1.468E-06 0.409 -28 -2.9825427978E+01 1.501E-06 0.410 -29 -2.9825427973E+01 6.998E-07 0.403 +1 -2.9938620348E+01 2.141E-01 0.981 +2 -2.9850136000E+01 2.251E-01 0.308 +3 -2.9841451341E+01 1.235E-01 0.303 +4 -2.9825720308E+01 7.329E-02 0.291 +5 -2.9825245511E+01 6.190E-02 0.301 +6 -2.9825709894E+01 4.128E-02 0.296 +7 -2.9825487431E+01 2.445E-02 0.289 +8 -2.9825469997E+01 1.653E-02 0.291 +9 -2.9825641355E+01 2.971E-02 0.288 +10 -2.9825411940E+01 3.392E-03 0.280 +11 -2.9825413238E+01 2.946E-03 0.287 +12 -2.9825418601E+01 1.388E-03 0.282 +13 -2.9825420555E+01 5.271E-04 0.281 +14 -2.9825423544E+01 4.488E-04 0.281 +15 -2.9825425069E+01 1.249E-04 0.285 +16 -2.9825426262E+01 5.989E-05 0.281 +17 -2.9825426786E+01 1.017E-04 0.280 +18 -2.9825427060E+01 6.256E-05 0.282 +19 -2.9825427548E+01 2.749E-05 0.279 +20 -2.9825427747E+01 1.930E-05 0.270 +21 -2.9825427841E+01 9.177E-06 0.271 +22 -2.9825427919E+01 4.862E-06 0.269 +23 -2.9825427942E+01 3.062E-06 0.266 +24 -2.9825427948E+01 3.169E-06 0.266 +25 -2.9825427984E+01 1.647E-06 0.264 +26 -2.9825427995E+01 1.405E-06 0.263 +27 -2.9825427968E+01 2.285E-06 0.260 +28 -2.9825427976E+01 1.908E-06 0.262 +29 -2.9825427997E+01 8.061E-07 0.264 Total number of SCF: 29 ==================================================================== Energy and force calculation ==================================================================== -Free energy per atom : -2.9825427973E+01 (Ha/atom) -Total free energy : -1.1930171189E+02 (Ha) -Band structure energy : -2.3221964895E+01 (Ha) -Exchange correlation energy : -2.2316751576E+01 (Ha) +Free energy per atom : -2.9825427997E+01 (Ha/atom) +Total free energy : -1.1930171199E+02 (Ha) +Band structure energy : -2.3221954783E+01 (Ha) +Exchange correlation energy : -2.2316751488E+01 (Ha) Self and correction energy : -2.0212481471E+02 (Ha) --Entropy*kb*T : -8.3659901201E-03 (Ha) -Fermi level : -1.9467375195E-01 (Ha) -U correction : 8.6236225397E-02 (Ha) -RMS force : 7.6025131560E-02 (Ha/Bohr) -Maximum force : 1.2236235994E-01 (Ha/Bohr) -Time for force calculation : 0.065 (sec) -Pressure : 9.4947733531E-01 (GPa) -Maximum stress : 7.5937177117E+00 (GPa) -Time for stress calculation : 0.126 (sec) +-Entropy*kb*T : -8.3659950427E-03 (Ha) +Fermi level : -1.9467340580E-01 (Ha) +U correction : 8.6236340534E-02 (Ha) +RMS force : 7.6025417937E-02 (Ha/Bohr) +Maximum force : 1.2236299010E-01 (Ha/Bohr) +Time for force calculation : 0.044 (sec) +Pressure : 9.4948643144E-01 (GPa) +Maximum stress : 7.5937303823E+00 (GPa) +Time for stress calculation : 0.087 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 15.765 sec +Total walltime : 10.441 sec ___________________________________________________________________________ *************************************************************************** diff --git a/tests/MoO3_hubbard/standard/MoO3_hubbard.refstatic b/tests/MoO3_hubbard/standard/MoO3_hubbard.refstatic index 2b566d2b..145fbed9 100644 --- a/tests/MoO3_hubbard/standard/MoO3_hubbard.refstatic +++ b/tests/MoO3_hubbard/standard/MoO3_hubbard.refstatic @@ -7,13 +7,13 @@ Fractional coordinates of O: 0.2500000000 0.4663270000 0.7183440000 0.2500000000 0.4985360000 0.4355850000 0.2500000000 0.9826820000 0.5870910000 -Total free energy (Ha): -1.193017118930784E+02 +Total free energy (Ha): -1.193017119895254E+02 Atomic forces (Ha/Bohr): - -3.0139839685E-05 -1.0388486832E-01 6.4656634265E-02 - 6.5717656628E-06 1.6887668807E-02 -1.8666229668E-02 - 4.0007502156E-05 4.7526079431E-03 3.8420374290E-02 - -1.6439428134E-05 8.2244591573E-02 -8.4410778887E-02 + -3.0115166041E-05 -1.0388563139E-01 6.4656600822E-02 + 6.5627841409E-06 1.6887899866E-02 -1.8666310086E-02 + 4.0006244503E-05 4.7528526782E-03 3.8420463088E-02 + -1.6453862604E-05 8.2244878848E-02 -8.4410753824E-02 Stress (GPa): - 5.8172099419E-01 4.8629612110E-04 -7.7297967873E-04 - 4.8629612110E-04 -7.5937177117E+00 3.1137939616E-02 - -7.7297967873E-04 3.1137939616E-02 4.1635647116E+00 + 5.8170874325E-01 4.8668100165E-04 -7.7274428237E-04 + 4.8668100165E-04 -7.5937303823E+00 3.1138748238E-02 + -7.7274428237E-04 3.1138748238E-02 4.1635623448E+00 diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.inpt b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.inpt index 6edec5d1..130b9015 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.inpt +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.inpt @@ -9,6 +9,7 @@ KPOINT_GRID: 2 3 1 SPIN_TYP: 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-6 PRINT_FORCES: 1 PRINT_ATOMS: 1 diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refout b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refout index 05c0a8ab..2dba3eab 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refout +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 15:20:11 2025 * +* Start time: Mon Jun 2 16:57:40 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 1 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 19 CHEB_DEGREE: 42 CHEFSI_BOUND_FLAG: 0 @@ -68,14 +69,14 @@ Density: 4.3401107614E-01 (amu/Bohr^3), 4.8634730270E+00 (g/cc) *************************************************************************** NP_SPIN_PARAL: 2 NP_KPOINT_PARAL: 3 -NP_BAND_PARAL: 4 +NP_BAND_PARAL: 8 NP_DOMAIN_PARAL: 1 1 1 -NP_DOMAIN_PHI_PARAL: 2 3 4 +NP_DOMAIN_PHI_PARAL: 3 4 4 EIG_SERIAL_MAXNS: 1500 *************************************************************************** Initialization *************************************************************************** -Number of processors : 24 +Number of processors : 48 Mesh spacing in x-direction : 0.16749 (Bohr) Mesh spacing in y-direction : 0.16749 (Bohr) Mesh spacing in z-direction : 0.166793 (Bohr) @@ -95,50 +96,50 @@ Atomic mass : 15.9994 Pseudocharge radii of atom type 2 : 7.87 7.87 8.01 (x, y, z dir) Number of atoms of type 2 : 1 Estimated total memory usage : 546.77 MB -Estimated memory per processor : 22.78 MB +Estimated memory per processor : 11.39 MB ======================================================================================== Self Consistent Field (SCF#1) ======================================================================================== Iteration Free Energy (Ha/atom) Magnetization SCF Error Timing (sec) -1 -8.6300747461E+01 2.0000E+00 9.411E-02 7.772 -2 -8.6292773007E+01 2.0000E+00 5.202E-02 1.989 -3 -8.6293957908E+01 2.0000E+00 3.150E-02 1.989 -4 -8.6297328249E+01 1.9994E+00 1.202E-02 1.987 -5 -8.6297594929E+01 1.9992E+00 3.729E-03 1.971 -6 -8.6297603193E+01 1.9991E+00 2.391E-03 1.969 -7 -8.6297624823E+01 1.9989E+00 7.531E-04 1.963 -8 -8.6297626340E+01 1.9989E+00 4.367E-04 1.966 -9 -8.6297626830E+01 1.9988E+00 1.411E-04 1.978 -10 -8.6297626908E+01 1.9988E+00 5.110E-05 1.964 -11 -8.6297626917E+01 1.9988E+00 3.431E-05 1.955 -12 -8.6297626848E+01 1.9988E+00 1.324E-05 1.963 -13 -8.6297626869E+01 1.9988E+00 9.783E-06 1.957 -14 -8.6297626913E+01 1.9988E+00 5.172E-06 1.977 -15 -8.6297626886E+01 1.9988E+00 1.813E-06 1.952 -16 -8.6297626879E+01 1.9988E+00 7.356E-07 1.947 +1 -8.6300220115E+01 2.0000E+00 9.409E-02 5.072 +2 -8.6292731945E+01 2.0000E+00 5.198E-02 1.295 +3 -8.6293987568E+01 2.0000E+00 3.121E-02 1.288 +4 -8.6297346982E+01 1.9994E+00 1.179E-02 1.286 +5 -8.6297600024E+01 1.9992E+00 3.623E-03 1.282 +6 -8.6297604411E+01 1.9990E+00 2.307E-03 1.302 +7 -8.6297624750E+01 1.9989E+00 7.830E-04 1.280 +8 -8.6297626250E+01 1.9989E+00 4.488E-04 1.279 +9 -8.6297626842E+01 1.9988E+00 1.391E-04 1.277 +10 -8.6297626911E+01 1.9988E+00 5.004E-05 1.273 +11 -8.6297626896E+01 1.9988E+00 3.366E-05 1.272 +12 -8.6297626848E+01 1.9988E+00 1.303E-05 1.774 +13 -8.6297626866E+01 1.9988E+00 9.935E-06 1.272 +14 -8.6297626910E+01 1.9988E+00 3.904E-06 1.268 +15 -8.6297626892E+01 1.9988E+00 2.078E-06 1.268 +16 -8.6297626862E+01 1.9988E+00 6.365E-07 1.266 Total number of SCF: 16 ==================================================================== Energy and force calculation ==================================================================== -Free energy per atom : -8.6297626879E+01 (Ha/atom) -Total free energy : -1.7259525376E+02 (Ha) -Band structure energy : -2.0575935602E+01 (Ha) -Exchange correlation energy : -2.2947845606E+01 (Ha) +Free energy per atom : -8.6297626862E+01 (Ha/atom) +Total free energy : -1.7259525372E+02 (Ha) +Band structure energy : -2.0575931164E+01 (Ha) +Exchange correlation energy : -2.2947846534E+01 (Ha) Self and correction energy : -2.4714026244E+02 (Ha) --Entropy*kb*T : -6.6079126968E-05 (Ha) -Fermi level : 1.7381916384E-01 (Ha) -Net magnetization : 1.9988358619E+00 (Bohr magneton) -U correction : 1.9899498091E-01 (Ha) -RMS force : 3.0006325498E-01 (Ha/Bohr) -Maximum force : 3.0006325498E-01 (Ha/Bohr) -Time for force calculation : 0.150 (sec) -Pressure : 4.7995158060E+01 (GPa) -Maximum stress : 1.3184547506E+02 (GPa) -Time for stress calculation : 0.345 (sec) +-Entropy*kb*T : -6.6079949782E-05 (Ha) +Fermi level : 1.7381931132E-01 (Ha) +Net magnetization : 1.9988358079E+00 (Bohr magneton) +U correction : 1.9899504661E-01 (Ha) +RMS force : 3.0006169625E-01 (Ha/Bohr) +Maximum force : 3.0006169625E-01 (Ha/Bohr) +Time for force calculation : 0.096 (sec) +Pressure : 4.7994643164E+01 (GPa) +Maximum stress : 1.3184470244E+02 (GPa) +Time for stress calculation : 0.231 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 39.195 sec +Total walltime : 26.397 sec ___________________________________________________________________________ *************************************************************************** diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refstatic b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refstatic index 01af01cd..f8251957 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refstatic +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/high_accuracy/NiO_spin_kpts_non_ortho_hubbard.refstatic @@ -5,15 +5,15 @@ Fractional coordinates of Ni: 0.0000000000 0.0000000000 0.1000000000 Fractional coordinates of O: 0.0000000000 0.1000000000 0.5000000000 -Total free energy (Ha): -1.725952537585579E+02 +Total free energy (Ha): -1.725952537234899E+02 Atomic forces (Ha/Bohr): - 4.0549307733E-02 -6.1526340835E-02 -2.9087492160E-01 - -4.0549307733E-02 6.1526340835E-02 2.9087492160E-01 -Net magnetization (Bohr magneton): 1.9988358619E+00 + 4.0548833239E-02 -6.1525387798E-02 -2.9087358136E-01 + -4.0548833239E-02 6.1525387798E-02 2.9087358136E-01 +Net magnetization (Bohr magneton): 1.9988358079E+00 Atomic magnetization along Z-dir within Radius 2 Bohr (Bohr magneton): - 1.0089969260E+00 - 6.9286836449E-01 + 9.8373215875E-01 + 6.7232587106E-01 Stress (GPa): - -4.2673176951E+00 5.0549205603E+00 1.4572896273E+01 - 5.0549205603E+00 -7.8726814259E+00 -2.3503941127E+01 - 1.4572896273E+01 -2.3503941127E+01 -1.3184547506E+02 + -4.2669444347E+00 5.0548921449E+00 1.4572776617E+01 + 5.0548921449E+00 -7.8722826125E+00 -2.3503879132E+01 + 1.4572776617E+01 -2.3503879132E+01 -1.3184470244E+02 diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.inpt b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.inpt index 5b3e3ee9..fce778db 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.inpt +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.inpt @@ -9,6 +9,7 @@ KPOINT_GRID: 2 3 1 SPIN_TYP: 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-6 PRINT_FORCES: 1 PRINT_ATOMS: 1 diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refout b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refout index 918ca51c..efbace7b 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refout +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 15:16:27 2025 * +* Start time: Mon Jun 2 16:55:31 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 1 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 19 CHEB_DEGREE: 38 CHEFSI_BOUND_FLAG: 0 @@ -68,14 +69,14 @@ Density: 4.3401107614E-01 (amu/Bohr^3), 4.8634730270E+00 (g/cc) *************************************************************************** NP_SPIN_PARAL: 2 NP_KPOINT_PARAL: 3 -NP_BAND_PARAL: 4 +NP_BAND_PARAL: 8 NP_DOMAIN_PARAL: 1 1 1 -NP_DOMAIN_PHI_PARAL: 2 3 4 +NP_DOMAIN_PHI_PARAL: 3 4 4 EIG_SERIAL_MAXNS: 1500 *************************************************************************** Initialization *************************************************************************** -Number of processors : 24 +Number of processors : 48 Mesh spacing in x-direction : 0.197398 (Bohr) Mesh spacing in y-direction : 0.197398 (Bohr) Mesh spacing in z-direction : 0.19712 (Bohr) @@ -95,50 +96,50 @@ Atomic mass : 15.9994 Pseudocharge radii of atom type 2 : 7.90 7.90 7.88 (x, y, z dir) Number of atoms of type 2 : 1 Estimated total memory usage : 333.08 MB -Estimated memory per processor : 13.88 MB +Estimated memory per processor : 6.94 MB ======================================================================================== Self Consistent Field (SCF#1) ======================================================================================== Iteration Free Energy (Ha/atom) Magnetization SCF Error Timing (sec) -1 -8.6301154630E+01 2.0000E+00 9.407E-02 3.830 -2 -8.6292912747E+01 2.0000E+00 5.200E-02 0.976 -3 -8.6294116540E+01 2.0000E+00 3.125E-02 0.972 -4 -8.6297462408E+01 1.9994E+00 1.194E-02 0.970 -5 -8.6297728085E+01 1.9992E+00 3.663E-03 0.973 -6 -8.6297732662E+01 1.9990E+00 2.349E-03 0.975 -7 -8.6297753845E+01 1.9989E+00 7.739E-04 0.964 -8 -8.6297755286E+01 1.9988E+00 4.487E-04 0.962 -9 -8.6297755866E+01 1.9988E+00 1.422E-04 0.970 -10 -8.6297755935E+01 1.9988E+00 5.171E-05 0.960 -11 -8.6297755935E+01 1.9988E+00 3.446E-05 0.955 -12 -8.6297755900E+01 1.9988E+00 1.331E-05 0.958 -13 -8.6297755896E+01 1.9988E+00 9.972E-06 0.958 -14 -8.6297755941E+01 1.9988E+00 4.807E-06 0.956 -15 -8.6297755913E+01 1.9988E+00 1.846E-06 0.950 -16 -8.6297755861E+01 1.9988E+00 7.266E-07 0.946 +1 -8.6301201717E+01 2.0000E+00 9.421E-02 2.447 +2 -8.6292855303E+01 2.0000E+00 5.195E-02 0.627 +3 -8.6294106733E+01 2.0000E+00 3.129E-02 0.627 +4 -8.6297470136E+01 1.9994E+00 1.184E-02 0.627 +5 -8.6297727647E+01 1.9992E+00 3.681E-03 0.624 +6 -8.6297732618E+01 1.9990E+00 2.350E-03 0.622 +7 -8.6297753844E+01 1.9989E+00 7.745E-04 0.620 +8 -8.6297755273E+01 1.9988E+00 4.509E-04 0.621 +9 -8.6297755867E+01 1.9988E+00 1.419E-04 0.618 +10 -8.6297755935E+01 1.9988E+00 5.169E-05 0.620 +11 -8.6297755935E+01 1.9988E+00 3.461E-05 0.619 +12 -8.6297755900E+01 1.9988E+00 1.331E-05 0.616 +13 -8.6297755897E+01 1.9988E+00 9.935E-06 0.618 +14 -8.6297755940E+01 1.9988E+00 4.846E-06 0.660 +15 -8.6297755914E+01 1.9988E+00 1.840E-06 0.681 +16 -8.6297755862E+01 1.9988E+00 8.152E-07 0.663 Total number of SCF: 16 ==================================================================== Energy and force calculation ==================================================================== -Free energy per atom : -8.6297755861E+01 (Ha/atom) +Free energy per atom : -8.6297755862E+01 (Ha/atom) Total free energy : -1.7259551172E+02 (Ha) -Band structure energy : -2.0576226225E+01 (Ha) -Exchange correlation energy : -2.2947870449E+01 (Ha) +Band structure energy : -2.0576225972E+01 (Ha) +Exchange correlation energy : -2.2947870581E+01 (Ha) Self and correction energy : -2.4714021220E+02 (Ha) --Entropy*kb*T : -6.6231362091E-05 (Ha) -Fermi level : 1.7381919780E-01 (Ha) -Net magnetization : 1.9988061659E+00 (Bohr magneton) -U correction : 1.9899724182E-01 (Ha) -RMS force : 2.9983412926E-01 (Ha/Bohr) -Maximum force : 2.9983412926E-01 (Ha/Bohr) -Time for force calculation : 0.096 (sec) -Pressure : 4.8142284036E+01 (GPa) -Maximum stress : 1.3186435062E+02 (GPa) -Time for stress calculation : 0.232 (sec) +-Entropy*kb*T : -6.6230779750E-05 (Ha) +Fermi level : 1.7381922510E-01 (Ha) +Net magnetization : 1.9988061885E+00 (Bohr magneton) +U correction : 1.9899718208E-01 (Ha) +RMS force : 2.9983516679E-01 (Ha/Bohr) +Maximum force : 2.9983516679E-01 (Ha/Bohr) +Time for force calculation : 0.071 (sec) +Pressure : 4.8142340861E+01 (GPa) +Maximum stress : 1.3186430759E+02 (GPa) +Time for stress calculation : 0.159 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 20.354 sec +Total walltime : 13.377 sec ___________________________________________________________________________ *************************************************************************** diff --git a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refstatic b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refstatic index aa0c6c53..74caeda2 100644 --- a/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refstatic +++ b/tests/NiO_spin_kpts_non_ortho_hubbard/standard/NiO_spin_kpts_non_ortho_hubbard.refstatic @@ -5,15 +5,15 @@ Fractional coordinates of Ni: 0.0000000000 0.0000000000 0.1000000000 Fractional coordinates of O: 0.0000000000 0.1000000000 0.5000000000 -Total free energy (Ha): -1.725955117222723E+02 +Total free energy (Ha): -1.725955117232382E+02 Atomic forces (Ha/Bohr): - 4.0505382807E-02 -6.1457990563E-02 -2.9065913787E-01 - -4.0505382807E-02 6.1457990563E-02 2.9065913787E-01 -Net magnetization (Bohr magneton): 1.9988061659E+00 + 4.0505278811E-02 -6.1457914445E-02 -2.9066023874E-01 + -4.0505278811E-02 6.1457914445E-02 2.9066023874E-01 +Net magnetization (Bohr magneton): 1.9988061885E+00 Atomic magnetization along Z-dir within Radius 2 Bohr (Bohr magneton): - 9.8050853840E-01 - 6.7678050656E-01 + 9.4292230648E-01 + 6.3847799396E-01 Stress (GPa): - -4.5565583153E+00 5.1785507512E+00 1.4548149652E+01 - 5.1785507512E+00 -8.0059431764E+00 -2.3461833960E+01 - 1.4548149652E+01 -2.3461833960E+01 -1.3186435062E+02 + -4.5566004446E+00 5.1785575065E+00 1.4548169377E+01 + 5.1785575065E+00 -8.0061145442E+00 -2.3461813927E+01 + 1.4548169377E+01 -2.3461813927E+01 -1.3186430759E+02 diff --git a/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.inpt b/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.inpt index 54b39f2e..0d3306cb 100644 --- a/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.inpt +++ b/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.inpt @@ -9,6 +9,7 @@ MESH_SPACING: 0.22 KPOINT_GRID: 2 2 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-5 PRINT_FORCES: 1 PRINT_ATOMS: 1 diff --git a/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.refout b/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.refout index e19eebfb..55e2dfc7 100644 --- a/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.refout +++ b/tests/TiCrO4_kpt_hubbard/high_accuracy/TiCrO4_kpt_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 20:51:48 2025 * +* Start time: Mon Jun 2 16:30:32 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 0 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 65 CHEB_DEGREE: 33 CHEFSI_BOUND_FLAG: 0 @@ -103,84 +104,84 @@ Estimated memory per processor : 27.49 MB Self Consistent Field (SCF#1) =================================================================== Iteration Free Energy (Ha/atom) SCF Error Timing (sec) -1 -3.5290746152E+01 2.026E-01 9.180 -2 -3.5208219458E+01 7.330E-02 2.325 -3 -3.5201391939E+01 4.807E-02 2.319 -4 -3.5204401565E+01 9.466E-02 2.338 -5 -3.5200837878E+01 3.915E-02 2.313 -6 -3.5201393227E+01 2.228E-02 2.325 -7 -3.5201831427E+01 1.986E-02 2.325 -8 -3.5202532990E+01 1.259E-02 2.299 -9 -3.5202592821E+01 1.227E-02 2.315 -10 -3.5202444941E+01 1.155E-02 2.337 -11 -3.5202489913E+01 7.817E-03 2.304 -12 -3.5202612738E+01 4.002E-03 2.683 -13 -3.5202629704E+01 3.438E-03 2.326 -14 -3.5202642858E+01 3.755E-03 2.302 -15 -3.5202635352E+01 3.167E-03 2.319 -16 -3.5202629856E+01 2.495E-03 2.295 -17 -3.5202636159E+01 1.238E-03 2.335 -18 -3.5202638743E+01 8.844E-04 2.305 -19 -3.5202640515E+01 7.580E-04 2.334 -20 -3.5202642586E+01 6.551E-04 2.294 -21 -3.5202643696E+01 6.072E-04 2.300 -22 -3.5202645305E+01 5.621E-04 2.319 -23 -3.5202646215E+01 5.411E-04 2.333 -24 -3.5202646469E+01 5.503E-04 2.328 -25 -3.5202646475E+01 5.546E-04 2.301 -26 -3.5202646457E+01 5.420E-04 2.324 -27 -3.5202646672E+01 5.206E-04 2.329 -28 -3.5202647348E+01 4.906E-04 2.311 -29 -3.5202648014E+01 4.557E-04 2.317 -30 -3.5202648553E+01 4.478E-04 2.371 -31 -3.5202648591E+01 4.515E-04 2.307 -32 -3.5202648506E+01 4.474E-04 2.311 -33 -3.5202648657E+01 4.487E-04 2.370 -34 -3.5202648363E+01 4.453E-04 2.289 -35 -3.5202647831E+01 4.366E-04 2.301 -36 -3.5202647403E+01 4.429E-04 2.330 -37 -3.5202647542E+01 4.382E-04 2.329 -38 -3.5202647624E+01 4.384E-04 2.308 -39 -3.5202646881E+01 4.253E-04 2.308 -40 -3.5202646134E+01 3.897E-04 2.298 -41 -3.5202644642E+01 3.450E-04 2.294 -42 -3.5202643696E+01 3.060E-04 2.295 -43 -3.5202643324E+01 3.301E-04 2.303 -44 -3.5202643225E+01 3.306E-04 2.317 -45 -3.5202643476E+01 3.319E-04 2.318 -46 -3.5202642937E+01 3.000E-04 2.330 -47 -3.5202642586E+01 2.734E-04 2.355 -48 -3.5202642060E+01 1.508E-04 2.309 -49 -3.5202641934E+01 1.087E-04 2.304 -50 -3.5202641971E+01 6.677E-05 2.329 -51 -3.5202641953E+01 4.413E-05 2.313 -52 -3.5202642049E+01 4.065E-05 2.351 -53 -3.5202642035E+01 3.226E-05 2.294 -54 -3.5202641981E+01 2.781E-05 2.318 -55 -3.5202641996E+01 2.845E-05 2.310 -56 -3.5202642106E+01 2.758E-05 2.298 -57 -3.5202642034E+01 2.768E-05 2.307 -58 -3.5202641907E+01 2.760E-05 2.314 -59 -3.5202641959E+01 2.812E-05 2.311 -60 -3.5202642031E+01 2.512E-05 2.309 -61 -3.5202642025E+01 2.375E-05 2.286 -62 -3.5202641901E+01 2.248E-05 2.319 -63 -3.5202641995E+01 2.021E-05 2.313 -64 -3.5202642059E+01 1.834E-05 2.477 -65 -3.5202642073E+01 1.520E-05 2.317 -66 -3.5202642102E+01 1.387E-05 2.300 -67 -3.5202642136E+01 1.360E-05 2.315 -68 -3.5202642049E+01 1.370E-05 2.341 -69 -3.5202642095E+01 1.413E-05 2.311 -70 -3.5202641994E+01 1.382E-05 2.286 -71 -3.5202642242E+01 1.384E-05 2.286 -72 -3.5202642095E+01 1.378E-05 2.353 -73 -3.5202642089E+01 1.392E-05 2.297 -74 -3.5202641982E+01 1.385E-05 2.296 -75 -3.5202642072E+01 1.446E-05 2.310 -76 -3.5202642000E+01 1.227E-05 2.293 -77 -3.5202641957E+01 1.008E-05 2.307 -78 -3.5202642109E+01 7.353E-06 2.334 +1 -3.5290746152E+01 2.026E-01 9.149 +2 -3.5208219458E+01 7.330E-02 2.348 +3 -3.5201391939E+01 4.807E-02 2.307 +4 -3.5204401565E+01 9.466E-02 2.307 +5 -3.5200837878E+01 3.915E-02 2.296 +6 -3.5201393227E+01 2.228E-02 2.289 +7 -3.5201831427E+01 1.986E-02 2.311 +8 -3.5202532990E+01 1.259E-02 2.292 +9 -3.5202592821E+01 1.227E-02 2.313 +10 -3.5202444941E+01 1.155E-02 2.305 +11 -3.5202489913E+01 7.817E-03 2.326 +12 -3.5202612738E+01 4.002E-03 2.298 +13 -3.5202629704E+01 3.438E-03 2.299 +14 -3.5202642858E+01 3.755E-03 2.294 +15 -3.5202635352E+01 3.167E-03 2.303 +16 -3.5202629856E+01 2.495E-03 2.287 +17 -3.5202636159E+01 1.238E-03 2.306 +18 -3.5202638743E+01 8.844E-04 2.280 +19 -3.5202640515E+01 7.580E-04 2.306 +20 -3.5202642586E+01 6.551E-04 2.298 +21 -3.5202643696E+01 6.072E-04 2.280 +22 -3.5202645305E+01 5.621E-04 2.293 +23 -3.5202646215E+01 5.411E-04 2.294 +24 -3.5202646469E+01 5.503E-04 2.276 +25 -3.5202646475E+01 5.546E-04 2.279 +26 -3.5202646457E+01 5.420E-04 2.285 +27 -3.5202646672E+01 5.206E-04 2.281 +28 -3.5202647348E+01 4.906E-04 2.295 +29 -3.5202648014E+01 4.557E-04 2.282 +30 -3.5202648553E+01 4.478E-04 2.285 +31 -3.5202648591E+01 4.515E-04 2.279 +32 -3.5202648506E+01 4.474E-04 2.303 +33 -3.5202648657E+01 4.487E-04 2.278 +34 -3.5202648363E+01 4.453E-04 2.273 +35 -3.5202647831E+01 4.366E-04 2.287 +36 -3.5202647403E+01 4.429E-04 2.300 +37 -3.5202647542E+01 4.382E-04 2.279 +38 -3.5202647624E+01 4.384E-04 2.290 +39 -3.5202646881E+01 4.253E-04 2.301 +40 -3.5202646134E+01 3.897E-04 2.285 +41 -3.5202644642E+01 3.450E-04 2.281 +42 -3.5202643696E+01 3.060E-04 2.281 +43 -3.5202643324E+01 3.301E-04 2.271 +44 -3.5202643225E+01 3.306E-04 2.275 +45 -3.5202643476E+01 3.319E-04 2.295 +46 -3.5202642937E+01 3.000E-04 2.295 +47 -3.5202642586E+01 2.734E-04 2.288 +48 -3.5202642060E+01 1.508E-04 2.303 +49 -3.5202641934E+01 1.087E-04 2.278 +50 -3.5202641971E+01 6.677E-05 2.284 +51 -3.5202641953E+01 4.413E-05 2.276 +52 -3.5202642049E+01 4.065E-05 2.300 +53 -3.5202642035E+01 3.226E-05 2.289 +54 -3.5202641981E+01 2.781E-05 2.281 +55 -3.5202641996E+01 2.845E-05 2.276 +56 -3.5202642106E+01 2.758E-05 2.290 +57 -3.5202642034E+01 2.768E-05 2.275 +58 -3.5202641907E+01 2.760E-05 2.283 +59 -3.5202641959E+01 2.812E-05 2.275 +60 -3.5202642031E+01 2.512E-05 2.278 +61 -3.5202642025E+01 2.375E-05 2.277 +62 -3.5202641901E+01 2.248E-05 2.727 +63 -3.5202641995E+01 2.021E-05 2.272 +64 -3.5202642059E+01 1.834E-05 2.295 +65 -3.5202642073E+01 1.520E-05 2.270 +66 -3.5202642102E+01 1.387E-05 2.270 +67 -3.5202642136E+01 1.360E-05 2.272 +68 -3.5202642049E+01 1.370E-05 2.274 +69 -3.5202642095E+01 1.413E-05 2.273 +70 -3.5202641994E+01 1.382E-05 2.271 +71 -3.5202642242E+01 1.384E-05 2.273 +72 -3.5202642095E+01 1.378E-05 2.276 +73 -3.5202642089E+01 1.392E-05 2.270 +74 -3.5202641982E+01 1.385E-05 2.273 +75 -3.5202642072E+01 1.446E-05 2.272 +76 -3.5202642000E+01 1.227E-05 2.272 +77 -3.5202641957E+01 1.008E-05 2.274 +78 -3.5202642109E+01 7.353E-06 2.273 Total number of SCF: 78 ==================================================================== Energy and force calculation @@ -202,7 +203,7 @@ Time for stress calculation : 0.432 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 191.537 sec +Total walltime : 189.021 sec ___________________________________________________________________________ *************************************************************************** diff --git a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.inpt b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.inpt index 075c5477..95d2cef3 100644 --- a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.inpt +++ b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.inpt @@ -10,7 +10,8 @@ MIXING_PARAMETER: 0.5 KPOINT_GRID: 2 2 1 BC: P P P EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 TOL_SCF: 1e-5 PRINT_FORCES: 1 PRINT_ATOMS: 1 -CALC_STRESS: 1 \ No newline at end of file +CALC_STRESS: 1 diff --git a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.ion b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.ion index e86bbfc9..4bb1c96b 100644 --- a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.ion +++ b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.ion @@ -43,8 +43,11 @@ COORD_FRAC: # coordinates follows 0.500000 0.500000 0.702362 HUBBARD: -U_ATOM_TYPE: Ti -U_VAL: 0 0 0.1 0 # U values in hartrees for s p d f orbitals (valence only) +#U_ATOM_TYPE: Ti +#U_VAL: 0 0 0.1 0 # U values in hartrees for s p d f orbitals (valence only) U_ATOM_TYPE: Cr U_VAL: 0 0 0.2 0 # U values in hartrees for s p d f orbitals (valence only) + +U_ATOM_TYPE: Ti +U_VAL: 0 0 0.1 0 # U values in hartrees for s p d f orbitals (valence only) \ No newline at end of file diff --git a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.refout b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.refout index 66da4595..80648c1b 100644 --- a/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.refout +++ b/tests/TiCrO4_kpt_hubbard/standard/TiCrO4_kpt_hubbard.refout @@ -2,7 +2,7 @@ * SPARC (version May 29, 2025) * * Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech * * Distributed under GNU General Public License 3 (GPL) * -* Start time: Thu May 29 20:55:21 2025 * +* Start time: Mon Jun 2 16:23:32 2025 * *************************************************************************** Input parameters *************************************************************************** @@ -20,6 +20,7 @@ SPIN_TYP: 0 ELEC_TEMP_TYPE: Gaussian SMEARING: 0.007349864435 EXCHANGE_CORRELATION: GGA_PBE +HUBBARD_FLAG: 1 NSTATES: 65 CHEB_DEGREE: 27 CHEFSI_BOUND_FLAG: 0 @@ -103,78 +104,78 @@ Estimated memory per processor : 13.41 MB Self Consistent Field (SCF#1) =================================================================== Iteration Free Energy (Ha/atom) SCF Error Timing (sec) -1 -3.5293853780E+01 2.044E-01 2.919 -2 -3.5328723923E+01 3.020E-01 0.732 -3 -3.5208593989E+01 6.615E-02 0.742 -4 -3.5203930178E+01 8.403E-02 0.744 -5 -3.5206987828E+01 1.022E-01 0.734 -6 -3.5202680470E+01 6.685E-02 0.756 -7 -3.5202151872E+01 2.437E-02 0.817 -8 -3.5202228799E+01 1.210E-02 0.735 -9 -3.5202273848E+01 1.230E-02 0.731 -10 -3.5202292899E+01 1.165E-02 0.729 -11 -3.5202272249E+01 1.144E-02 0.734 -12 -3.5202256460E+01 3.954E-03 0.766 -13 -3.5202263142E+01 4.747E-03 0.733 -14 -3.5202260088E+01 2.163E-03 0.728 -15 -3.5202258847E+01 1.545E-03 0.728 -16 -3.5202258430E+01 9.850E-04 0.736 -17 -3.5202259531E+01 7.838E-04 0.730 -18 -3.5202259701E+01 6.190E-04 0.730 -19 -3.5202259736E+01 6.720E-04 0.728 -20 -3.5202259643E+01 6.330E-04 0.731 -21 -3.5202259557E+01 6.582E-04 0.729 -22 -3.5202259861E+01 9.180E-04 0.728 -23 -3.5202259800E+01 1.005E-03 0.735 -24 -3.5202259254E+01 3.317E-04 0.728 -25 -3.5202259300E+01 2.793E-04 0.728 -26 -3.5202259343E+01 1.618E-04 0.729 -27 -3.5202259402E+01 1.048E-04 0.724 -28 -3.5202259422E+01 1.020E-04 0.723 -29 -3.5202259452E+01 1.020E-04 0.727 -30 -3.5202259378E+01 1.035E-04 0.727 -31 -3.5202259391E+01 1.126E-04 0.727 -32 -3.5202259349E+01 1.121E-04 0.724 -33 -3.5202259365E+01 9.065E-05 0.729 -34 -3.5202259405E+01 1.058E-04 0.730 -35 -3.5202259398E+01 1.155E-04 0.734 -36 -3.5202259386E+01 7.938E-05 0.725 -37 -3.5202259407E+01 6.610E-05 0.731 -38 -3.5202259444E+01 5.667E-05 0.724 -39 -3.5202259493E+01 5.661E-05 0.731 -40 -3.5202259387E+01 5.914E-05 0.726 -41 -3.5202259413E+01 6.069E-05 0.728 -42 -3.5202259495E+01 5.918E-05 0.723 -43 -3.5202259361E+01 6.517E-05 0.726 -44 -3.5202259472E+01 6.273E-05 0.740 -45 -3.5202259480E+01 7.485E-05 0.727 -46 -3.5202259517E+01 5.532E-05 0.727 -47 -3.5202259476E+01 5.121E-05 0.727 -48 -3.5202259445E+01 5.355E-05 0.730 -49 -3.5202259481E+01 4.950E-05 0.746 -50 -3.5202259446E+01 1.349E-04 0.726 -51 -3.5202259497E+01 8.393E-05 0.730 -52 -3.5202259502E+01 6.171E-05 0.725 -53 -3.5202259526E+01 2.067E-05 0.725 -54 -3.5202259551E+01 1.877E-05 0.731 -55 -3.5202259544E+01 1.643E-05 0.725 -56 -3.5202259533E+01 1.989E-05 0.727 -57 -3.5202259550E+01 1.486E-05 0.725 -58 -3.5202259523E+01 1.763E-05 0.717 -59 -3.5202259452E+01 1.846E-05 0.725 -60 -3.5202259543E+01 1.322E-05 0.723 -61 -3.5202259481E+01 1.191E-05 0.726 -62 -3.5202259512E+01 1.274E-05 0.726 -63 -3.5202259385E+01 1.087E-05 0.723 -64 -3.5202259425E+01 1.025E-05 0.731 +1 -3.5293853780E+01 2.044E-01 2.867 +2 -3.5328723923E+01 3.020E-01 1.020 +3 -3.5208593989E+01 6.615E-02 0.731 +4 -3.5203930178E+01 8.403E-02 0.736 +5 -3.5206987828E+01 1.022E-01 0.744 +6 -3.5202680470E+01 6.685E-02 0.725 +7 -3.5202151872E+01 2.437E-02 0.723 +8 -3.5202228799E+01 1.210E-02 0.724 +9 -3.5202273848E+01 1.230E-02 0.725 +10 -3.5202292899E+01 1.165E-02 0.722 +11 -3.5202272249E+01 1.144E-02 0.743 +12 -3.5202256460E+01 3.954E-03 0.738 +13 -3.5202263142E+01 4.747E-03 0.722 +14 -3.5202260088E+01 2.163E-03 0.721 +15 -3.5202258847E+01 1.545E-03 0.724 +16 -3.5202258430E+01 9.850E-04 0.723 +17 -3.5202259531E+01 7.838E-04 0.733 +18 -3.5202259701E+01 6.190E-04 0.722 +19 -3.5202259736E+01 6.720E-04 0.724 +20 -3.5202259643E+01 6.330E-04 0.719 +21 -3.5202259557E+01 6.582E-04 0.723 +22 -3.5202259861E+01 9.180E-04 0.720 +23 -3.5202259800E+01 1.005E-03 0.721 +24 -3.5202259254E+01 3.317E-04 0.721 +25 -3.5202259300E+01 2.793E-04 0.725 +26 -3.5202259343E+01 1.618E-04 0.722 +27 -3.5202259402E+01 1.048E-04 0.719 +28 -3.5202259422E+01 1.020E-04 0.717 +29 -3.5202259452E+01 1.020E-04 0.722 +30 -3.5202259378E+01 1.035E-04 0.721 +31 -3.5202259391E+01 1.126E-04 0.723 +32 -3.5202259349E+01 1.121E-04 0.725 +33 -3.5202259365E+01 9.065E-05 0.723 +34 -3.5202259405E+01 1.058E-04 0.722 +35 -3.5202259398E+01 1.155E-04 0.724 +36 -3.5202259386E+01 7.938E-05 0.718 +37 -3.5202259407E+01 6.610E-05 0.720 +38 -3.5202259444E+01 5.667E-05 0.719 +39 -3.5202259493E+01 5.661E-05 0.720 +40 -3.5202259387E+01 5.914E-05 0.716 +41 -3.5202259413E+01 6.069E-05 0.717 +42 -3.5202259495E+01 5.918E-05 0.718 +43 -3.5202259361E+01 6.517E-05 0.717 +44 -3.5202259472E+01 6.273E-05 0.723 +45 -3.5202259480E+01 7.485E-05 0.723 +46 -3.5202259517E+01 5.532E-05 0.724 +47 -3.5202259476E+01 5.121E-05 0.719 +48 -3.5202259445E+01 5.355E-05 0.719 +49 -3.5202259481E+01 4.950E-05 0.723 +50 -3.5202259446E+01 1.349E-04 0.720 +51 -3.5202259497E+01 8.393E-05 0.729 +52 -3.5202259502E+01 6.171E-05 0.720 +53 -3.5202259526E+01 2.067E-05 0.721 +54 -3.5202259551E+01 1.877E-05 0.719 +55 -3.5202259544E+01 1.643E-05 0.718 +56 -3.5202259533E+01 1.989E-05 0.718 +57 -3.5202259550E+01 1.486E-05 0.718 +58 -3.5202259523E+01 1.763E-05 0.720 +59 -3.5202259452E+01 1.846E-05 0.717 +60 -3.5202259543E+01 1.322E-05 0.720 +61 -3.5202259481E+01 1.191E-05 0.721 +62 -3.5202259512E+01 1.274E-05 0.724 +63 -3.5202259385E+01 1.087E-05 0.718 +64 -3.5202259425E+01 1.025E-05 0.721 65 -3.5202259454E+01 1.198E-05 0.718 -66 -3.5202259582E+01 2.356E-05 0.724 -67 -3.5202259487E+01 1.952E-05 0.725 -68 -3.5202259460E+01 1.063E-05 0.726 -69 -3.5202259430E+01 1.077E-05 0.719 -70 -3.5202259538E+01 1.051E-05 0.727 -71 -3.5202259489E+01 1.398E-05 0.723 -72 -3.5202259544E+01 8.273E-06 0.720 +66 -3.5202259582E+01 2.356E-05 0.722 +67 -3.5202259487E+01 1.952E-05 0.724 +68 -3.5202259460E+01 1.063E-05 0.718 +69 -3.5202259430E+01 1.077E-05 0.721 +70 -3.5202259538E+01 1.051E-05 0.718 +71 -3.5202259489E+01 1.398E-05 0.717 +72 -3.5202259544E+01 8.273E-06 0.718 Total number of SCF: 72 ==================================================================== Energy and force calculation @@ -189,14 +190,14 @@ Fermi level : 1.6681854709E-01 (Ha) U correction : 7.7498870076E-01 (Ha) RMS force : 4.6551663107E-03 (Ha/Bohr) Maximum force : 8.4169801768E-03 (Ha/Bohr) -Time for force calculation : 0.093 (sec) +Time for force calculation : 0.094 (sec) Pressure : -2.3693545572E+00 (GPa) Maximum stress : 1.0877409088E+01 (GPa) -Time for stress calculation : 0.234 (sec) +Time for stress calculation : 0.235 (sec) *************************************************************************** Timing info *************************************************************************** -Total walltime : 57.760 sec +Total walltime : 57.421 sec ___________________________________________________________________________ ***************************************************************************