-
Notifications
You must be signed in to change notification settings - Fork 198
fix: reset LAMMPS minimization timesteps #1954
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
Open
njzjz-bot
wants to merge
1
commit into
master
Choose a base branch
from
fix/issue-1051-reset-timestep
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: deepmodeling/dpgen
Length of output: 292
🏁 Script executed:
Repository: deepmodeling/dpgen
Length of output: 50374
🌐 Web query:
site:docs.lammps.org reset_timestep dump active dump_modify append undump dump file overwrite LAMMPS💡 Result:
In LAMMPS, the commands
reset_timestep,dump,dump_modify, andundumpare used together to manage simulation time and data output. A critical restriction is that you cannot use thereset_timestepcommand while adumpcommand is active [1][2]. Below is the required workflow to safely change the timestep and manage dump files: 1. Stop the active dump: Use theundumpcommand to stop the dump associated with a specific dump-ID [3][4]. This action closes the associated dump file [3][5]. 2. Reset the timestep: Once the dump is inactive, you may safely use thereset_timestepcommand to set the timestep counter to a new value [6][1]. 3. Re-start the dump: If you wish to continue dumping data, you must define a newdumpcommand [1][2]. Regardingdump_modifyoptions: - Append: Theappendkeyword (used withdump_modify) controls whether new snapshots are added to the end of an existing text-based dump file (append yes) or if a new file is created that overwrites the existing one (append no, which is the default) [7][8]. This option applies to most dump styles, but excludes binary, compressed, and image/movie formats [7][8]. If you intend to change the timestep and then resume dumping while managing existing files, you must ensure the dump is turned off (undump) before resetting the timestep, as LAMMPS will terminate with an error if a timestep change is attempted while a dump is active [1][2].Citations:
🏁 Script executed:
Repository: deepmodeling/dpgen
Length of output: 4592
Stop the active dump before resetting the timestep.
When
change_box=True,dump 1remains active during bothreset_timestep 0commands. LAMMPS rejects timestep changes while a dump is active, so the input fails after the first minimization.Issue
undump 1before each reset. Recreate the dump before the next minimization with append enabled to preserve existingdump.relaxframes. Extend the regression test to check this command sequence.🤖 Prompt for AI Agents
Source: MCP tools