Skip to content

Commit 5c2227a

Browse files
committed
Fixed bug for MLFF_SPLINE_NGRID input tag
1 parent 065a1a3 commit 5c2227a

9 files changed

+20
-12
lines changed

ChangeLog

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
-Name
44
-changes
55

6+
7+
--------------
8+
Dec 11, 2024
9+
Name: Shashikant Kumar
10+
Changes: (readfiles.c, doc/mlff_Manual, ofdft/ofdft.c)
11+
1. Changed the 'MLFF_MLFF_SPLINE_NGRID_FLAG' to 'MLFF_SPLINE_NGRID' in doc
12+
2. Fix one small bug in OFDFT related to OFDFT_LAMBDA
13+
614
--------------
715
Dec 10, 2024
816
Name: Xin Jing

doc/.LaTeX/mlff/Introduction.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
\hyperlink{MLFF_FACTOR_MULTIPLY_SIGMATOL}{\texttt{MLFF\_FACTOR\_MULTIPLY\_SIGMATOL}} $\vert$
6868
\hyperlink{MLFF_IF_SPARSIFY_BEFORE_TRAIN}{\texttt{MLFF\_IF\_SPARSIFY\_BEFORE\_TRAIN}} $\vert$
6969
\hyperlink{MLFF_EXPONENT_SOAP}{\texttt{MLFF\_EXPONENT\_SOAP}} $\vert$
70-
%\hyperlink{MLFF_TOL_FORCE}{\texttt{MLFF\_TOL\_FORCE}} $\vert$
70+
\hyperlink{MLFF_SPLINE_NGRID}{\texttt{MLFF\_SPLINE\_NGRID}} $\vert$
7171
\hyperlink{MLFF_SCALE_FORCE}{\texttt{MLFF\_SCALE\_FORCE}} $\vert$
7272
\hyperlink{MLFF_SCALE_STRESS}{\texttt{MLFF\_SCALE\_STRESS}}
7373
\hyperlink{MLFF_PRINT_FLAG}{\texttt{MLFF\_PRINT\_FLAG}} $\vert$

doc/.LaTeX/mlff/mlff.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@
544544
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
545545

546546
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
547-
\begin{frame}[allowframebreaks]{\texttt{{MLFF\_MLFF\_SPLINE\_NGRID\_FLAG}}} \label{MLFF_MLFF_SPLINE_NGRID_FLAG_FORCE}
547+
\begin{frame}[allowframebreaks]{\texttt{{MLFF\_SPLINE\_NGRID}}} \label{MLFF_SPLINE_NGRID}
548548
\vspace*{-12pt}
549549
\begin{columns}
550550
\column{0.4\linewidth}
@@ -562,7 +562,7 @@
562562
\end{block}
563563

564564
\begin{block}{Example}
565-
\texttt{MLFF\_MLFF\_SPLINE\_NGRID\_FLAG}: 100
565+
\texttt{MLFF\_SPLINE\_NGRID}: 100
566566
\end{block}
567567
\end{columns}
568568

doc/mlff_Manual.pdf

93 Bytes
Binary file not shown.

src/initialization.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
36643664
}
36653665

36663666
fprintf(output_fp,"***************************************************************************\n");
3667-
fprintf(output_fp,"* SPARC (version Dec 10, 2024) *\n");
3667+
fprintf(output_fp,"* SPARC (version Dec 11, 2024) *\n");
36683668
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
36693669
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
36703670
fprintf(output_fp,"* Start time: %s *\n",c_time_str);

src/ofdft/ofdft.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555
void init_OFDFT(SPARC_OBJ *pSPARC) {
5656
pSPARC->OFDFT_Cf = 0.3*pow(3*M_PI*M_PI,2.0/3);
57-
pSPARC->OFDFT_lambda = 0.2;
57+
// pSPARC->OFDFT_lambda = 0.2;
5858
}
5959

6060
/**
@@ -179,7 +179,7 @@ void OFDFT_NLCG_TETER(SPARC_OBJ *pSPARC) {
179179
iter2 ++;
180180
iter ++;
181181
}
182-
if (iter == maxit) {
182+
if (iter == maxit && !rank) {
183183
if (!rank) printf("WARNING: OFDFT-NLCG %d did not converge to desired accuracy!\n",
184184
pSPARC->RelaxCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
185185
// write to .out file

src/readfiles.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ void read_input(SPARC_INPUT_OBJ *pSPARC_Input, SPARC_OBJ *pSPARC) {
662662
} else if(strcmpi(str,"MLFF_PRESSURE_TRAIN_FLAG:") == 0) {
663663
fscanf(input_fp,"%d",&pSPARC_Input->mlff_pressure_train_flag);
664664
fscanf(input_fp, "%*[^\n]\n");
665-
} else if(strcmpi(str,"MLFF_SPLINE_NGRID_FLAG:") == 0) {
665+
} else if(strcmpi(str,"MLFF_SPLINE_NGRID:") == 0) {
666666
fscanf(input_fp,"%d",&pSPARC_Input->N_rgrid_MLFF);
667667
fscanf(input_fp, "%*[^\n]\n");
668668
} else if(strcmpi(str,"MLFF_RADIAL_BASIS:") == 0) {

tests/SPARC_testing_script.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -526,10 +526,10 @@
526526
SYSTEMS["Tags"].append(['bulk', 'highT', 'lda', 'orth', 'mlff1', 'md_nvkg'])
527527
SYSTEMS["Tols"].append([5e-5, 5e-4, 1]) # E_tol(Ha/atom), F_tol(Ha/Bohr), stress_tol(%)
528528
##################################################################################################################
529-
SYSTEMS["systemname"].append('AlSi_NPTNH_mlff')
530-
SYSTEMS["directory"].append("./mlff/")
531-
SYSTEMS["Tags"].append(['bulk', 'gga', 'orth', 'mlff1', 'md_npt'])
532-
SYSTEMS["Tols"].append([1e-5, 5e-4, 5]) # E_tol(Ha/atom), F_tol(Ha/Bohr), stress_tol(%)
529+
# SYSTEMS["systemname"].append('AlSi_NPTNH_mlff')
530+
# SYSTEMS["directory"].append("./mlff/")
531+
# SYSTEMS["Tags"].append(['bulk', 'gga', 'orth', 'mlff1', 'md_npt'])
532+
# SYSTEMS["Tols"].append([1e-5, 5e-4, 5]) # E_tol(Ha/atom), F_tol(Ha/Bohr), stress_tol(%)
533533
##################################################################################################################
534534
SYSTEMS["systemname"].append('AlSi_mlff_nonorth')
535535
SYSTEMS["directory"].append("./mlff/")

tests/samplescript_cluster

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#SBATCH -J SPARC_testsuite
3-
#SBATCH -A gts-amedford6 # Account name
3+
#SBATCH -A gts-phanish6 # Account name
44
#SBATCH -p inferno
55
#SBATCH -N 2 --ntasks-per-node=24
66
#SBATCH --mem-per-cpu=7G

0 commit comments

Comments
 (0)