Skip to content

to_jdftxinfile method for JDFTXOutfile #4408

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

Merged
merged 5 commits into from
May 16, 2025

Conversation

benrich37
Copy link
Contributor

Summary

Major changes:

  • feature 1: Method to_jdftxinfile for JDFTXOutfile(Slice)
    -- Uses internal JDFTXInfile and Structure to create a new JDFTXInfile object that can be ran to restart a calculation
  • feature 2: Method strip_structure_tags for JDFTXInfile
    -- Strips all structural tags from a JDFTXInfile for creating equivalent JDFTXInfile objects with updated associated structures
  • fix 1: Changing 'nAlphaAdjustMax' shared tag from a FloatTag to an IntTag
  • fix 2: Adding an optional minval field for certain FloatTags which prevent writing error-raising values
    -- Certain tag options in JDFTx can internally be the minimum value, but trying to pass the minimum value will raise an error

Todos

  • feature 1: Testing for the to_jdftxinfile
    -- I know the function works from having used it, but I haven't written in an explicit test for it yet.
  • fix 2: Look through JDFTx source code and identify all the numeric tag value boundaries and add them to the FloatTag. This will likely require generalizing how boundaries are tested as a quick glance (see here) shows there are tags that actually do use the >= operator
  • Unrelated: Reduce bloat in outputs module
    -- Remove references to deprecated fields
    -- Begin phasing out redundant fields
    --- i.e. JDFTXOutfile.lattice redundant to JDFTXOutfile.structure.lattice.matrix
    -- Generalize how optimization logs are stored in outputs module objects
    --- Fields like grad_K are part of a broad group of values that can be logged for an optimization step, and the fields present in each log varies a lot more than I previously thought when I initially wrote the JDFTx outputs module. Generalizing how these are stored into a dictionary of arbitrary keys should make the outputs module more robust, as well as helping reduce the bloat in the outputs module.

benrich37 added 5 commits May 15, 2025 13:34
…Outfile inherits its most recent slice's `infile`, TODO's for cleaning up outputs module
… of an int for this parameter will raise an error
…o return an empty string if the requested value is not greater than the set minimum value. An empty string is chosen instead of raising an error as error-raising values are dumped for the internal infile by JDFTx, so raising an error here would gaurantee an initialization error for every out file without these fields specified in the in file. There are likely more float tags that need this field set.
@benrich37 benrich37 requested review from shyuep and mkhorton as code owners May 15, 2025 22:58
@shyuep shyuep merged commit 4f536fc into materialsproject:master May 16, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants