Repository navigation
Conversation
Every line is a row of 16-character, left-aligned cells: the tag, then KEY/unit and value cells, so every cell starts on a column edge and the columns line up across lines and iterations. Values are in scientific notation (9 significant digits for energies, 8 otherwise). The PCC moments form a table whose headers start at the column edges. PCC_USED/Ry is dropped (it repeats E_PCC/Ry), and SCCS_DEFERRED is formatted in sccs_output.cpp with the other lines.
47b8635 to
434ee60
Compare
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The new solvent-output regression can pass when an expected cube is missing; please make that absence fail the check.
Non-blocking: please record the exact commands, configurations and observed results for the added unit/integration tests and relevant INPUT checks, identifying anything not run.
Static review of the complete feature delta at 434ee60e3e5005782a8f73970722c41fd32555cb; builds, tests and numerical runs were not executed, and CI diagnostics were unavailable.
| para.input.out_sol[0] = std::stoi(item.str_values[0]); | ||
| if (count >= 2) | ||
| { | ||
| para.input.out_sol[1] = std::stoi(item.str_values[1]); |
There was a problem hiding this comment.
Non-blocking: out_sol 1.5 6junk is parsed as 1 6, and tokens after the second are ignored. The vector-domain binding does not validate these original tokens; please require exactly one or two complete integer tokens and cover malformed prefixes and extra arguments in the INPUT tests.
There was a problem hiding this comment.
out_sol takes exactly one or two tokens, and each must be a whole integer: std::stoi with the position argument, and the token must be fully consumed.
- props_basic.sh: out_sol 1 fails the case when sol_eps.cube or sol_cavity.cube is missing, instead of silently skipping the sol_cavity_integralref check. - out_sol: accept exactly one or two whole integer tokens; "6junk", "8x" and a third token are rejected. INPUT tests cover these. - sccs_debug: the help text and a comment state that the FFT counts are the Coulomb-operator FFTs of the sqrt-CG solve. - sccs_output: name the computed precision and padding; a cell as wide as the column (a three-digit exponent) keeps one blank instead of running into the next cell. A test covers it.
|
there are some conflicts need to be resolved, thx. @LKFEIYI |
Resolve the conflicts with deepmodeling#8223.
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Delayed SCCS activation can feed a stale PW DFT+U occupation matrix into the next potential update. Please reset its mixing history alongside the charge history.
Static review at f14898e0ac1c7d4a4d5cc9bd7581fa907aa89c6e against 5a7e6a61c90cf7a96bc02ca0c0f98bff9109be54; builds, tests, numerical runs and CI diagnostics were not executed.
| void Charge_Mixing::restart_for_new_model(const int iter) | ||
| { | ||
| this->mix_reset(); | ||
| this->mixing_restart_last = iter; |
There was a problem hiding this comment.
With PW DFT+U, mixing_dftu 1 and mixing_type pulay, activating SCCS after the occupation history is populated resets rho_mdata but leaves uom_mdata at its old ring position. When charge mixing runs in that iteration, the next mix_uom can apply its new coefficients to stale occupation columns and feed a stale matrix into the +U potential. Please reset UOM on this transition and test the first occupation update after activation.
There was a problem hiding this comment.
mix_reset now restarts the DFT+U occupation history together with the density and density-matrix histories, so after SCCS starts the first mix_uom is a single simple mixing step on the new occupations.
mix_uom reuses the rho Pulay coefficients, so mix_reset now restarts uom_mdata together with the rho and DMR histories.
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The new UOM reset addresses the occupation-history mismatch raised in the previous review, and the added test targets the first mix after restart. I found no new functional issue in this update; one non-blocking call-site suggestion is inline.
Static source review only; builds and runtime tests were not run.
Linked Issue
Fifth part of #8052. It follows #8075 (PCC), #8162 (SCCS Step 1: periodic SCCS), #8194 (SCCS Step 2: SCCS with PCC 0D/2D) and #8219 (SCCS Step 3: derivative lowpass filter and
fullcavity).This PR is stacked on #8219: until #8219 is merged, please review only the last commit. The remaining follow-up PR adds the solvent-aware cavity.
Summary
Steps 1–3 run SCCS only in a single SCF, with the solvent active from the first iteration and with no diagnostics. This PR adds what is needed to use SCCS in real calculations:
sccs_start_drho,sccs_start_nmax). The SCF first runs without the solvent until reaching a desired drho, then SCCS starts, which is also applied in Environ and cp2k.calculation relax). The SCCS potential is rebuilt every ionic step. The start state and the last sqrt-CG solution carry over as a warm start.sccs_debug 1/2). Solver iterations, residuals, cavity volume and surface, Gauss-law and multipole checks are written to the running log (only for debug).out_sol 1). The dielectric function and the cavity are written as cube files, for bothimp_sol 1andimp_sol 2.All four are off by default, and nothing changes for existing inputs: no existing integration reference changes.
What's changed?
1. Delayed start and fixed-cell relax
PotSccsgains a start state. Until it starts, it contributes no potential, energy or force. It starts once DRHO ≤sccs_start_drho, or at iterationsccs_start_nmaxat the latest. Once started, it stays on.pot_registerreads the SCCS state (SccsResume: start flag and warm start) from the old components before deleting them. It passes the state explicitly toget_pot_type, which gains aconst SccsResume¶meter, so no new member variable holds it. Registration keeps its original order: old components are deleted first.SccsFixedSourcescaches the Gaussian ion and core densities and the grid coordinates within one ionic step. They are rebuilt only when the atoms change.2. Diagnostics (
sccs_debug)3.
out_solout_sol 1 [precision]writessol_eps.cubeandsol_cavity.cubethroughModuleIO::write_vdata_palgrid, at the same point asout_pot.imp_sol 1,surchemkeeps the dielectric function of its lastcal_vel, and the cavity is computed from it as 1 − S.Governance Notes
esolver_ks.cpponly). Followingsource/source_esolver/AGENTS.md, it only calls named steps ofmodule_chargeand adds no function of its own:iter_finishcallsupdate_pot_modelbefore mixing andprint_corr_iterafterprint_etot;iter_finishreadsPARAM.globalv.two_fermionce into a local.chg_routine):update_pot_modelandprint_corr_iterselect the first rank of the first pool, the screen for the start notice and the running log forsccs_debug.Potentialgainsmodel_pending,update_model,write_corr_iterandsol_out_fields.get_pot_typegains aSccsResumeparameter, and its only call site is updated.ctrl_output_fpwritesout_sol.GlobalV::ofs_runningfor the running log, inchg_routine.cpp, and thetwo_fermilocal) and removes 3, for a net change of −1. The checker reports these as warnings only.<iosfwd>inpot_sccs.h,potential_new.handsccs_output.h:std::ostreamparameters.sccs_output.handsccs_fixed_src.hinpot_sccs.h: value members ofPotSccs.charge_moments.handsccs_coulomb.hinsccs_output.h: value members ofPccOutputandSccsOutput.<memory>and<vector>insccs_fixed_src.h,<string>and<vector>insol_grid_field.h,<vector>insccs_diag.h,sccs_output.handsurchem.h.esolver_ks.cppis 65, as ondevelop