to_jdftxinfile method for JDFTXOutfile#4408
Merged
shyuep merged 5 commits intomaterialsproject:masterfrom May 16, 2025
Merged
Conversation
…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.
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
Major changes:
to_jdftxinfilefor JDFTXOutfile(Slice)-- Uses internal
JDFTXInfileandStructureto create a newJDFTXInfileobject that can be ran to restart a calculationstrip_structure_tagsforJDFTXInfile-- Strips all structural tags from a
JDFTXInfilefor creating equivalentJDFTXInfileobjects with updated associated structuresFloatTagto anIntTagminvalfield for certainFloatTags 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
to_jdftxinfile-- I know the function works from having used it, but I haven't written in an explicit test for it yet.
>=operator-- Remove references to deprecated fields
-- Begin phasing out redundant fields
--- i.e.
JDFTXOutfile.latticeredundant toJDFTXOutfile.structure.lattice.matrix-- Generalize how optimization logs are stored in outputs module objects
--- Fields like
grad_Kare 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.