Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug in xc_rhotol and change estimation function of Ecut #211

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
-Name
-changes

--------------
June 24, 2024
Name: Xin Jing
Changes: (initialization.c, xc/exx/exxInitialization.c)
1. Fix a bug in minimal rho tolerance when calculating xc term
2. change estimation of Ecut in exact exchange for auxiliary function method

--------------
Jan 27, 2023
Name: Xin Jing
Expand Down
4 changes: 2 additions & 2 deletions src/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ void SPARC_copy_input(SPARC_OBJ *pSPARC, SPARC_INPUT_OBJ *pSPARC_Input) {
}

// Value of tol used in xc functional
pSPARC->xc_rhotol = 1e-10;
pSPARC->xc_rhotol = 1e-14;
pSPARC->xc_magtol = 1e-8;
pSPARC->xc_sigmatol = 1e-10;

Expand Down Expand Up @@ -3391,7 +3391,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
}

fprintf(output_fp,"***************************************************************************\n");
fprintf(output_fp,"* SPARC (version Jan 27, 2023) *\n");
fprintf(output_fp,"* SPARC (version June 24, 2024) *\n");
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
fprintf(output_fp,"* Start time: %s *\n",c_time_str);
Expand Down
5 changes: 2 additions & 3 deletions src/xc/exx/exactExchangeInitialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,8 @@ double ecut_estimate(double hx, double hy, double hz)
dz2_inv = 1.0/(hz * hz);
h_eff = sqrt(3.0 / (dx2_inv + dy2_inv + dz2_inv));

ecut = (M_PI/h_eff) * (M_PI/h_eff) / 2; // Ecut rho
ecut = ecut / 4.0; // Ecut wfc
ecut = ecut * 0.9; // by experience
// curve fitting of Ecut2h function
ecut = exp(-2*log(h_eff)+0.848379709041268);
return ecut;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@


:MDSTEP: 21
:MDTM: 1.51
:MDTM: 1.54
:TWIST: 0
:TEL: 1120
:TIO: 1109.79332032081
:TEN: -3.2407633473E+00
Expand Down Expand Up @@ -154,7 +155,8 @@ Al - Al: 4.9425562368E+00
Si - Si: 4.7886440514E+00
Al - Si: 4.9727245536E+00
:MDSTEP: 22
:MDTM: 1.53
:MDTM: 1.60
:TWIST: 0
:TEL: 1120
:TIO: 1116.64695673467
:TEN: -3.2407565434E+00
Expand Down Expand Up @@ -280,7 +282,8 @@ Al - Al: 4.9176808163E+00
Si - Si: 4.7685697705E+00
Al - Si: 4.9352885991E+00
:MDSTEP: 23
:MDTM: 1.34
:MDTM: 1.37
:TWIST: 0
:TEL: 1120
:TIO: 1122.87334663102
:TEN: -3.2407296165E+00
Expand Down Expand Up @@ -406,7 +409,8 @@ Al - Al: 4.8952477469E+00
Si - Si: 4.7502502641E+00
Al - Si: 4.8999861526E+00
:MDSTEP: 24
:MDTM: 1.33
:MDTM: 1.47
:TWIST: 0
:TEL: 1120
:TIO: 1126.47905234742
:TEN: -3.2407117218E+00
Expand Down Expand Up @@ -532,7 +536,8 @@ Al - Al: 4.8781577501E+00
Si - Si: 4.7364921830E+00
Al - Si: 4.8697204692E+00
:MDSTEP: 25
:MDTM: 1.33
:MDTM: 1.38
:TWIST: 0
:TEL: 1120
:TIO: 1126.52309637202
:TEN: -3.2407290828E+00
Expand Down Expand Up @@ -658,7 +663,8 @@ Al - Al: 4.8682788830E+00
Si - Si: 4.7291031034E+00
Al - Si: 4.8463501285E+00
:MDSTEP: 26
:MDTM: 1.33
:MDTM: 1.37
:TWIST: 0
:TEL: 1120
:TIO: 1123.04188392328
:TEN: -3.2407882806E+00
Expand Down Expand Up @@ -784,7 +790,8 @@ Al - Al: 4.8661060403E+00
Si - Si: 4.7285593378E+00
Al - Si: 4.8303559658E+00
:MDSTEP: 27
:MDTM: 1.36
:MDTM: 1.40
:TWIST: 0
:TEL: 1120
:TIO: 1116.74630590542
:TEN: -3.2408724862E+00
Expand Down Expand Up @@ -910,7 +917,8 @@ Al - Al: 4.8706777922E+00
Si - Si: 4.7339233904E+00
Al - Si: 4.8207698452E+00
:MDSTEP: 28
:MDTM: 1.38
:MDTM: 1.37
:TWIST: 0
:TEL: 1120
:TIO: 1108.82591660523
:TEN: -3.2409528294E+00
Expand Down Expand Up @@ -1036,7 +1044,8 @@ Al - Al: 4.8797529838E+00
Si - Si: 4.7430144789E+00
Al - Si: 4.8153626795E+00
:MDSTEP: 29
:MDTM: 1.46
:MDTM: 1.52
:TWIST: 0
:TEL: 1120
:TIO: 1100.9340630919
:TEN: -3.2410068016E+00
Expand Down Expand Up @@ -1162,7 +1171,8 @@ Al - Al: 4.8902591627E+00
Si - Si: 4.7528442124E+00
Al - Si: 4.8110976299E+00
:MDSTEP: 30
:MDTM: 1.36
:MDTM: 1.38
:TWIST: 0
:TEL: 1120
:TIO: 1095.13829738681
:TEN: -3.2410302963E+00
Expand Down
285 changes: 143 additions & 142 deletions tests/Al16Si16_NPTNH_restart/high_accuracy/Al16Si16_NPTNH_restart.refout

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@


:MDSTEP: 21
:MDTM: 1.28
:MDTM: 1.30
:TWIST: 0
:TEL: 1120
:TIO: 1109.79673840231
:TEN: -3.2407651381E+00
Expand All @@ -37,7 +38,7 @@
:FEN: -3.2458721709E+00
:UEN: -3.2449439599E+00
:TSEN: -9.2821100091E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.8860974822E-01 2.7650965414E-01 1.5643773399E-01
3.8601143839E+00 1.5311576073E+01 4.0171788974E+00
Expand Down Expand Up @@ -154,7 +155,8 @@ Al - Al: 4.9425112343E+00
Si - Si: 4.7886013267E+00
Al - Si: 4.9726807443E+00
:MDSTEP: 22
:MDTM: 1.27
:MDTM: 1.30
:TWIST: 0
:TEL: 1120
:TIO: 1116.65647946172
:TEN: -3.2407523168E+00
Expand All @@ -163,7 +165,7 @@ Al - Si: 4.9726807443E+00
:FEN: -3.2458909165E+00
:UEN: -3.2449835654E+00
:TSEN: -9.0735104147E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.8595878993E-01 2.8881240749E-01 1.6342002619E-01
3.8513663732E+00 1.5266452569E+01 4.0141217689E+00
Expand Down Expand Up @@ -280,7 +282,8 @@ Al - Al: 4.9175607516E+00
Si - Si: 4.7684559322E+00
Al - Si: 4.9351722701E+00
:MDSTEP: 23
:MDTM: 1.12
:MDTM: 1.21
:TWIST: 0
:TEL: 1120
:TIO: 1122.88182047704
:TEN: -3.2407201689E+00
Expand All @@ -289,7 +292,7 @@ Al - Si: 4.9351722701E+00
:FEN: -3.2458874163E+00
:UEN: -3.2449991199E+00
:TSEN: -8.8829630270E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.8343809771E-01 3.0115559052E-01 1.7043927443E-01
3.8443785247E+00 1.5227816907E+01 4.0126879332E+00
Expand Down Expand Up @@ -407,6 +410,7 @@ Si - Si: 4.7500548593E+00
Al - Si: 4.8997872702E+00
:MDSTEP: 24
:MDTM: 1.19
:TWIST: 0
:TEL: 1120
:TIO: 1126.47092739946
:TEN: -3.2406975479E+00
Expand All @@ -415,7 +419,7 @@ Al - Si: 4.8997872702E+00
:FEN: -3.2458813114E+00
:UEN: -3.2450110279E+00
:TSEN: -8.7028347317E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.8127407667E-01 3.1371503776E-01 1.7759943099E-01
3.8414282372E+00 1.5204675662E+01 4.0152461427E+00
Expand Down Expand Up @@ -532,7 +536,8 @@ Al - Al: 4.8778721300E+00
Si - Si: 4.7362226506E+00
Al - Si: 4.8694475010E+00
:MDSTEP: 25
:MDTM: 1.12
:MDTM: 1.18
:TWIST: 0
:TEL: 1120
:TIO: 1126.48196227532
:TEN: -3.2407108988E+00
Expand All @@ -541,7 +546,7 @@ Al - Si: 4.8694475010E+00
:FEN: -3.2458947131E+00
:UEN: -3.2450428063E+00
:TSEN: -8.5190684804E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7961261078E-01 3.2661811609E-01 1.8497617849E-01
3.8439931160E+00 1.5202858083E+01 4.0233378576E+00
Expand Down Expand Up @@ -658,7 +663,8 @@ Al - Al: 4.8679380995E+00
Si - Si: 4.7287828147E+00
Al - Si: 4.8460279104E+00
:MDSTEP: 26
:MDTM: 1.11
:MDTM: 1.19
:TWIST: 0
:TEL: 1120
:TIO: 1122.95523439928
:TEN: -3.2407677127E+00
Expand All @@ -667,7 +673,7 @@ Al - Si: 4.8460279104E+00
:FEN: -3.2459352978E+00
:UEN: -3.2451022467E+00
:TSEN: -8.3305111018E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7849295835E-01 3.3991420342E-01 1.9259957337E-01
3.8524770399E+00 1.5223937517E+01 4.0373881932E+00
Expand Down Expand Up @@ -784,7 +790,8 @@ Al - Al: 4.8657469955E+00
Si - Si: 4.7282240835E+00
Al - Si: 4.8300219649E+00
:MDSTEP: 27
:MDTM: 1.12
:MDTM: 1.18
:TWIST: 0
:TEL: 1120
:TIO: 1116.60614318857
:TEN: -3.2408517705E+00
Expand All @@ -793,7 +800,7 @@ Al - Si: 4.8300219649E+00
:FEN: -3.2459901386E+00
:UEN: -3.2451746142E+00
:TSEN: -8.1552438036E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7784185960E-01 3.5355678201E-01 2.0044359356E-01
3.8661336082E+00 1.5264939124E+01 4.0566211126E+00
Expand Down Expand Up @@ -910,7 +917,8 @@ Al - Al: 4.8703437865E+00
Si - Si: 4.7336151227E+00
Al - Si: 4.8204676654E+00
:MDSTEP: 28
:MDTM: 1.12
:MDTM: 1.17
:TWIST: 0
:TEL: 1120
:TIO: 1108.62728261769
:TEN: -3.2409339431E+00
Expand All @@ -919,7 +927,7 @@ Al - Si: 4.8204676654E+00
:FEN: -3.2460355943E+00
:UEN: -3.2452341426E+00
:TSEN: -8.0145169386E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7748785264E-01 3.6740282282E-01 2.0842589861E-01
3.8831936641E+00 1.5318856225E+01 4.0791880813E+00
Expand Down Expand Up @@ -1036,7 +1044,8 @@ Al - Al: 4.8794842080E+00
Si - Si: 4.7427721323E+00
Al - Si: 4.8151326796E+00
:MDSTEP: 29
:MDTM: 1.22
:MDTM: 1.28
:TWIST: 0
:TEL: 1120
:TIO: 1100.67539616546
:TEN: -3.2409908045E+00
Expand All @@ -1045,7 +1054,7 @@ Al - Si: 4.8151326796E+00
:FEN: -3.2460558628E+00
:UEN: -3.2452643907E+00
:TSEN: -7.9147213694E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7719630434E-01 3.8123606612E-01 2.1642148501E-01
3.9012124721E+00 1.5376030703E+01 4.1025285929E+00
Expand Down Expand Up @@ -1162,7 +1171,8 @@ Al - Al: 4.8900821664E+00
Si - Si: 4.7526934966E+00
Al - Si: 4.8109666202E+00
:MDSTEP: 30
:MDTM: 1.15
:MDTM: 1.18
:TWIST: 0
:TEL: 1120
:TIO: 1094.82610471985
:TEN: -3.2410173052E+00
Expand All @@ -1171,7 +1181,7 @@ Al - Si: 4.8109666202E+00
:FEN: -3.2460554464E+00
:UEN: -3.2452710981E+00
:TSEN: -7.8434834399E-04
:NPT_NH_HAMIL: 1.2131557145E-266
:NPT_NH_HAMIL: 0.0000000000E+00
:R:
3.7671978153E-01 3.9481308519E-01 2.2428946551E-01
3.9175888894E+00 1.5426204130E+01 4.1239137165E+00
Expand Down
Loading
Loading