Split mdsteps#371
Draft
suemni wants to merge 21 commits into
Draft
Conversation
cnegre
approved these changes
May 19, 2026
Ran for t2, t3, t34, t4.
Added new logic to top of mdstep loop.
Added input file for usinf kernel and LangeDynamics.
…r than minimization steps.
mewall
reviewed
Jun 1, 2026
mewall
left a comment
Collaborator
There was a problem hiding this comment.
The energy is drifting when I run the Mac1 system on Perlmutter. Needs debugging.
Scale kappa with (timestep)^2 as required by κ = Δt²ω². Result: Stable through 100+ split-step cycles. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed MD loop to continue until print_mdstep reaches the requested number of steps, rather than using a fixed internal step count. This ensures that MDSteps= in input.in controls the number of output steps at the user timestep, regardless of how many split-steps occur. Before: MDSteps=50 with frequent splits would give < 50 output steps After: MDSteps=50 always gives exactly 50 output steps Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add interpolation-based approach for handling non-uniform timesteps. When timesteps vary, interpolate historical charges n_0...n_5 from non-uniform grid to uniform grid, then apply fixed coefficients C0-C5. This is mathematically equivalent to recomputing adaptive coefficients but simpler to implement. Key changes: - Add dt_history(5) and nsteps_taken to xlbo_type for tracking timesteps - Implement prg_xlbo_interpolate_charges() using 5th-order Lagrange polynomial - Modify prg_xlbo_nint, prg_xlbo_nint_kernel, prg_xlbo_nint_kernelTimesRes to use interpolation when nsteps >= 6 and dt provided - Automatic activation after 6 MD steps, graceful fallback for early steps Test results: - Uniform timesteps (0.25 fs): Identical to original (0.0 eV difference) - Variable timesteps (0.5 fs, 60 split-steps): Same accuracy as recomputing coefficients (0.0 eV difference), confirming mathematical equivalence Builds on kappa scaling fix from commit 7f62eec. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Mdsteps are split into two half timesteps when criteria is met. Steps that are split are noted with a warning message.