Repository navigation
Feature: periodic self-consistent continuum solvation (SCCS) last step: solvent-aware cavity - #8252
Conversation
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Static review of 6f4fc718 found no confirmed implementation defect. The comments cover INPUT guidance, OpenMP test coverage and small governance cleanups. No build, runtime or CI verification was performed.
Non-blocking: Please add or link the exact validation commands, outcomes and tested commit in the PR description, including the selected unit/integration tests and force finite differences. The setup tables do not identify those invocations; keep the already-labeled pre-split results separate.
- sccs_lowpass_p1, sccs_solvent_radius: state how the filled dielectric is differentiated with PCC with and without lowpass. - sccs_filling_spread: document the filling erfc(t/spread)/2 at zero probe fraction. - Add thread_sums and repeated-solve tests, run with 4 OpenMP threads. - Name call arguments (rule 14).
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The new OpenMP test entry can collide with the normal entry's warning log during parallel CTest execution. The earlier INPUT-guidance and validation-command requests are addressed; two narrow test/style follow-ups remain in their existing threads.
Static incremental review of 91424c05 from 6f4fc718; no build, runtime or CI verification was performed.
- The four MODULE_HAMILT_sccs_poisson entries share a resource lock: they run in one directory, where a test writes and removes its warning log. - The omp4 entry and ThreadCount turn off dynamic teams; ThreadCount restores the previous setting. - Name the potential difference before std::abs (rule 14).
Follow the thr naming of scf_thr and force_thr (review comment).
resolve conflicts
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Two non-blocking documentation follow-ups after the merge. Static review only; no builds or tests were run.
Only out_app_flag 2 adds the g suffix; mode 0 overwrites the fixed name.
|
Great! Thanks for your contributions. |
Linked Issue
Last part of #8052. It follows #8075 (PCC), #8162 (SCCS Step 1), #8194 (Step 2: PCC 0D/2D), #8219 (Step 3: lowpass filter and
fullcavity) and #8222 (Step 4: SCF integration).What's changed?
The SCCS cavity of Steps 1–4 is a local function of the density. Gaps between atoms that are too narrow for a solvent molecule are still counted as solvent, so the dielectric reaches into them. This PR adds Environ's solvent-aware interface (Andreussi et al., J. Chem. Theory Comput. 15, 1996 (2019)), which fills those gaps with solute:
sccs_radial_scale * sccs_solvent_radiusis convolved with the local boundary s, which gives the probe solute fraction c = p * s;sccs_filling_thresholdare filled: s_sa = s + (1 − s) f(c), with f(c) = 1 − erfc((c − t)/Δ)/2.The energy follows Environ, and ΔG agrees with QE-Environ to 0.00 meV for periodic water, with and without filling.
Differences from QE-Environ
S1, narrow cells. A water chain in an 8-bohr cell against its 16-bohr supercell, with
sccs_solvent_radius 3:WideCellProbeMatchesEnvironMinimumImageProbechecks that the probe equals Environ's minimum-image probe in a wide cell.S2, density saddle. He₂ with the midpoint saddle on a grid node (12 bohr, ε = 1, γ = 50 dyn/cm):
ChainSurfaceDerivativeStaysBoundedAtADensitySaddlecovers this case.S3. The spectral gradient of s_sa made the surface too large for f₀ < 0.75 at the default
sccs_filling_spread 0.02. The chain gradient reproduced QE. The same ringing enters the dielectric when s_sa is differentiated on the unfiltered grid.Validation
Against QE 7.6 + Environ 3.1.1. Abacus: PW, 100/400 Ry, ONCV PBE, 8 MPI × 1 OpenMP,
scf_thr 1e-10.Surface and volume agree to 0.01–0.02 bohr² and bohr³.
Analytic − FD force (y on H1, ±0.005 Å) for the filled case:
chain: −1.6e-3 eV/Å.Both use the continuum electrostatic cavity potential without the lowpass.
Water dimer (25 bohr, 75/300 Ry, pre-split implementation): ΔE_SA agrees to ≤ 0.13 meV of 17–37 meV in the ε = 1, periodic and PCC0D stages. The split layer reproduced that implementation to ≤ 2.7e-10 eV.
Force consistency.
water-neutral, r = 2, t = 0.3, lowpass 10/5; first H along x ±0.01 bohr,scf_thr 1e-10.OMP_NUM_THREADS=1 mpirun -np 4 abacus; FD = −(E(x+h) − E(x−h))/2h with h = 0.01 bohr.imp_sol 0on the same grid.out_sol 1writessol_cavity.cubeas the filled boundary s_sa, and addssol_cavity_local.cube(s) andsol_filled_fraction.cube(c).Unit Tests and/or Case Tests for my changes
Tested commit: 91424c0, three commits on
developd20090c. GCC 11 + OpenMPI 5.0.10 with MPI, OpenMP, LCAO, ELPA, LibXC and LibRI;OMP_NUM_THREADS=1unless noted.test_sccs_sa_probe.cpp,test_sccs_sa.cpp,test_sccs_thread_sum.cpp, and new cases intest_sccs_cav_deriv.cpp,test_sccs_functional.cpp,test_sccs_lowpass.cpp,test_sccs_ion_force.cpp,test_sccs_response.cpp,test_pot_sccs.cpp,test_sccs_output.cppandtest_read_inp_sccs.cpp. No existing assertion is changed.01_PW/scf_sccs_sa,01_PW/scf_sccs_sa_pcc_2d_lowpassand02_NAO_Gamma/scf_sccs_sa_pcc2d, each checkingsccs_filled_volumeref.Governance Notes
sccs_solvent_radius,sccs_radial_scale,sccs_radial_spread,sccs_filling_thresholdandsccs_filling_spread, all with Environ's defaults. No documentation update required:docs/parameters.yamlandinput-main.mdare generated in CI from theInput_Itemdescriptions.module_sccs): newsccs_sa.cpp/handsccs_thread_sum.h.make_cav_derivs,solve_responseandeval_functionalgain aprobe_kernelparameter, and every call site is updated.PotSccs,SccsFixedSourcesandSccsResumecarry the probe kernel.SccsOutputreports the filled volume.SccsFixedSourcesto the solver and the functional.sccs_sa.hinsccs_response.h:SccsResponseholds aFilledCavityby value.vector3.hand<vector>insccs_sa.h: members ofFilledCavity.<array>,<cstddef>,<vector>and<omp.h>insccs_thread_sum.h: a header-only template.sccs_sa_test.handsccs_test.h: fixtures.auto. Outside tests,autoappears only in the nine grid sums, asconst auto add_... = [...]. A lambda's closure type cannot be written out, andstd::functionwould add an indirect call per grid point in these hot loops. Every other new local has an explicit type.read_inp_out.cpp, which scores 0 ondeveloptoo (1830 lines;item_outputhas cyclomatic complexity 178). This PR changes only theout_solhelp text there.