Skip to content
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

Outputs - JDFTx IO Module #4190

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

benrich37
Copy link

@benrich37 benrich37 commented Nov 22, 2024

Summary

Major changes:

-feature 0: hierarchy of class objects used to represent the data contained within a JDFTx out file. Hierarchy here is used to represent where each class object is stored - none of these classes inherit the class below it. Classes stored within a list in its parent are indicated by "[i]" (ie below where JDFTXOutfile.slices is a list of JDFTXOutfileSlice). Descriptions of each class are given below the tree.

                             JDFTXOutputs
                                   |
                             JDFTXOutputs.outfile
                                   |
                             JDFTXOutfile
                                   |
                         JDFTXOutfile.slices[i]
                                   |
                            JDFTXOutfileSlice
                          /                   \
  JDFTXOutfileSlice.jstrucs              JDFTXOutfileSlice.jsettings_(fluid, electronic, lattice, or ionic)
              |                                                          |
       JOutStructures                                               JMinSettings 
              |
       JOutStructures.slices[i]
              |
       JOutStructure(Structure)
              |
       JOutStructure.elecmindata
              |
          JElSteps
              |
          JElSteps.slices[i]
              |
          JElStep
  • feature 1: outputs.py module containing JDFTXOutfile class to give robust pythonic representation of to a JDFTx "out" file. This class is initialized from the path to a JDFTx "out" file by the user. The initialization of a JDFTXOutfile will initialize the following JDFTx IO classes by
  • feature 2: jdftxoutfileslice.py module containing JDFTXOutfileSlice class representing a "slice" of a JDFTx "out" file corresponding to a single call of the JDFTx executable (subsequent calls will append the same "out" file). This class is initialized for every call from an "out" file when JDFTXOutfile is initialized and stored in the list JDFTXOutfile.slices
  • feature 3: joutstructures.py module containing JOutStructures class representing a series of structures from an "out" file "slice". This class is primarily helpful for representing a geometric optimization during a single call. This class is initialized once during the initialization of a JDFTXOutfileSlice and is stored in JDFTXOutfileSlice.jstrucs
  • feature 4: joutstructure.py module containing JOutStructure class representing a single structure within an "out" file (specifically from a portion of the "out" file starting from the beginning of an SCF optimization down to the next log of Lowdin charges as the flag for the end of geometric optimization step). This class initialized once for every structure update when initializing JOutStructures, and is stored within the list JOutStructures.slices. An initial structure is given for initialization in the case that either lattice or ion positions are not being updated (and therefore not printed for parsing within the given slice of the "out" file "slice".
  • feature 5: jelstep.py module containing JElStep and JElSteps class representing a single SCF step and a series of SCF steps, respectively. The JElSteps class is helpful for getting SCF convergence data. The JElSteps class is initialized once for every initialization of a JOutStructure, and is stored within JOutStructure.elecmindata. The JElStep class is helpful for analyzing the logged SCF optimization data (energy, chemical potential, line-minimization values, etc) for a single SCF step. The JElStep class initialized once for every SCF step when initializing a JElSteps, and is stored within JElSteps.slices.
  • feature 6: jminsettings.py module containing JMinSettings abstract class for representing the input minimization settings of a JDFTx call. JMinSettings is inherited by the following classes within jminsettings.py - JMinSettingsElectronic to represent electronic minimization settings, JMinSettingsFluid for implicit fluid minimization, JMinSettingsLattice for lattice minimization, and JMinSettingsIonic for ionic minimization.

@benrich37 benrich37 mentioned this pull request Nov 22, 2024
benrich37 and others added 14 commits November 22, 2024 13:29
… not exactly what I thought it did. I still think its a helpful function to have but not what I need here)
…ut calling `.items()`) - This does not appear in my local pre-commit (which I believe is running correctly) but started causing the "lint" action to fail starting around 11/22 (along with other failures from unrelated pre-existing parts of pymatgen)
…bject to a mongo-db. A lot of the mystery in this output module was in how properties were being forced into memory through getattr, so here all properties are now attributes set up in post_init , get getatr is no longer explicitly defined (this also takes up a lot less lines to make reviewing easier). The only exception is charges and magnetic_moments for JOutStructure
…void any issues with using a JOutStructure in place of a Structure, adding eigenvals and bandProjections to JDFTXOutputs
@computron
Copy link
Member

@mkhorton , are you OK with merging this change?

@shyuep I am not sure why some of the optional checks are not running, I started the tests a couple of days ago.

Looks like all changes are restricted to the io/jdftx module, so not much likelihood of things breaking

@mkhorton
Copy link
Member

I’ll try and review this later today, thanks @benrich37

@mkhorton mkhorton enabled auto-merge (squash) December 22, 2024 22:15
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.

3 participants