Initialize maxmove input variable for all file types#98
Merged
lmiq merged 1 commit intom3g:masterfrom Jul 11, 2025
Merged
Conversation
maxmove sets the number of molecules that may be moved to a better position and defaults to all molecules in the structure section. However this was only being parsed for the pdb file format, resulting in 0 molecules being moved in movebad in heuristics.F90 and failure to converge for inputs of non-pdb file formats. This PR sets the default value regardless of file type and parses it out of the structure section.
Member
|
Thank you very much! |
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.
Problem
I noticed failures to converge when using input files in the xyz format, with output steps like:
and no change in function value between steps.
The number of molecules to move is set in heuristics.F90:
nmove = min0(maxmove(itype),max0(int(nmols(itype)*frac),1))and I found that
maxmovewas all 0, as it was only being parsed for the PDB file format.This PR:
maxmoveto be the number of molecules of the type (as the default is according to the docs)maxmovefrom thestructuresection of input regardless of file type.Testing
testing/pass.