Implemented disorder in the DCA Loop using the CT-AUX solver#365
Open
anirudha-mirmira wants to merge 45 commits into
Open
Implemented disorder in the DCA Loop using the CT-AUX solver#365anirudha-mirmira wants to merge 45 commits into
anirudha-mirmira wants to merge 45 commits into
Conversation
add data member to dca_loop data, should still be more
Unfortunate rippling
discovered much wider access to dca_data g0_r_t than expected
Unfortunate rippling
…ed quantities and added another TWO_K_DISORDER flag for the WIP involving k1,k2
…at the code runs. Concurrency barriers for prettier printing of disorder output
… disorder averaging procedure. Also wrote a test for the edited accumulation
…m cluster GF and added a dummy disorder block.
…(replaced earlier code) and dumping of disorder configurations. Wired new disorder config generation to the dca_loop.
…ion, orientation and full loop with U=0
…iagonal short-circuits, implemented compatible local_G_k_w
… calculated as FT from w rather than the erroneous inversion, tail from clean G0_cl_exl; MAJOR CHANGE: g0_interpolation now uses the two r-index signatures even in clean case. Cleanup and a walker unit test added
…he disordered_G0_cl_exl
…ed with the CMake option -DDCA_WITH_DISORDER=ON
…lock or zero num_configs in the input file
…al copy of disorder averaged G and Sigma and error bars
… only when Cmake option -DDCA_WITH_DISORDER=ON; Stat test revealed bug in local_G_k_w division by sign, fixed both disorder and clean branches (other parts were fixed in 2023)
Delete dead, never-compiled early-iteration disorder files: apply_disorder.{cpp,hpp}
(in include/ and src/), make_disorder.hpp, and two committed-by-accident Emacs lock
symlinks (.#apply_disorder.{cpp,hpp}). None are referenced by any CMakeLists or #include;
the live disorder generation path is makeDisorderConfigurations.hpp.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brings the CT-AUX site-disorder work (DCA_WITH_DISORDER / DISORDERED_G0) onto master. Conflict: include/.../ctaux/ctaux_walker.hpp — resolved by taking master's version. disorder_two_k's only changes to this file were clang-format reflow (no logic); master's 85e58ac carries the real change there (re-enabled NDEBUG delayed-spin check) plus the Matrix::resize memory-corruption fix elsewhere. All other overlaps (parameters.hpp, output_parameters.hpp, the parameters test CMake/test) auto-merged in disjoint regions. Verified on the merged tree (DCA_WITH_DISORDER=ON): main_dca builds, 7/7 disorder unit tests pass. Master's new readInput checks (OutputParameters::validate, checkModelSections) accept the disorder inputs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Support DCA calculations for systems with static on-site disorder. The crux of the implementation is the idea that the addition of disorder configurations breaks the translational symmetry and requires the cluster problem to be solved with two real space indices (for the 2D case) instead of a single displacement index. The disorder averaging, which is carried out analogously to the CPA, restores translational symmetry, thereby allowing for the solution of the cluster problem with a single displacement and subsequently a single momentum index.
The flow proceeds as follows: Subsequent to the calculation of the cluster excluded G0(d), the real space indices are unfolded to get G0(r1,r2), the disorder configurations (box or binary) are added. This disordered_G0(r1,r2) is the bare line the walkers uses to walk the chains, followed by an two index M(r1,r2) accumulation. The resulting interacting G(r1,r2) is disorder averaged, folded back into a single displacement index G(d), transformed to G(k) and fed into the cluster finalization step.
CMake Options
The new code has an associated
-DDCA_WITH_DISORDER=ONgate, which definesDISORDERED_G0flag. The disorder parts are separated with#ifdef DISORDERED_G0conditionals. The-DDCA_WITH_DISORDER=OFFflag results is identical to the clean code except in the places as noted belowMain differences from the DCA++ main branch
These are the changes to existing, shared code paths:
g0_interpolationnow uses the two r-index signature G0(r1, r2) in both the clean anddisordered cases. : The clean code calculated a single index as subtract(r2,r1) in the g0_interpolation routines, which is now calculated after inputting both the indices separately;
Fixed a latent divide-by-sign bug in
local_G_k_w(used bycomputeErrorBars) inboth branches: the
get_accumulated_signwas used where the scalar accumulatedget_accumulated_phasewas intended (missed by the Feb-2023 Phase refactor).CMake files where a new CMake option
DCA_WITH_DISORDER(OFF by default) definingDISORDERED_G0, plus anew
DisorderParametersblock (with MPI broadcast) and disorder-related parameter wiring.Features
unique-configs: trueparameter allows for the generation of strictly unique configurationsnum-configurations: 0is handled with a warning and calculation with a single configurationExample disorder block in input
Disorder is configured by adding a
disorderblock to the run's JSON input. The presence ofthe block is what enables the disorder flow; omit it for a clean run.
distribution-"binary"or"box"(any other value is a hard error).potential- disorder strength: V for binary (levels ±V/2), or the full box width W.density- fraction of sites at +V/2 for the binary distribution (ignored by box). For values away from 0.5,adjust-chemical-potentialin thephysicsblock should befalseto prevent chemical potential adjustment from undoing the effect of the shifted average potential.num-configurations- number of disorder realizations in the ensemble (equal weights).unique-configs- iftrue, enforce distinct binary realizations (no-op for box).Tests
Added and tested disorder tests gated on
DCA_WITH_DISORDER AND NOT DCA_WITH_CUDA AND NOT DCA_WITH_HIP, which test the following:Limitations
DCA_WITH_DISORDER+ CUDA/HIP configuration is a deliberate hard CMake error: the GPU version is not implemented. The common G0_interpolation in the GPU case has the original signature and the two index version is not implemented.binaryandboxare accepted; any otherdistributionvalue is a hard error.