-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor Vasp output classes #1426
Conversation
Is exactly equal to base class
Is exactly equal to base class
Pull Request Test Coverage Report for Build 9225747625Details
💛 - Coveralls |
I think that is a very reasonable suggestion, originally there was: def to_hdf(self, hdf):
"""
Save the object in a HDF5 file
Args:
hdf (pyiron_base.objects.generic.hdfio.ProjectHDFio): HDF path to which the object is to be saved
"""
with hdf.open("dft") as hdf_dft:
# hdf_go["description"] = self.description
for key, val in self.log_dict.items():
if isinstance(val, list) or isinstance(val, np.ndarray):
hdf_dft[key] = val[:-1]
else:
hdf_dft[key] = val This was then fixed around five years ago f2d6e66 and afterwards nobody cleaned it up. |
@@ -2026,6 +2026,7 @@ def __init__(self): | |||
self.outcar = Outcar() | |||
self.oszicar = Oszicar() | |||
self.generic_output = GenericOutput() | |||
self.dft_output = DFTOutput() |
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.
I feel this is not included in the to_dict()
and from_dict()
as the VASP base implementation stores the corresponding entries in Output.generic_output.dft_log_dict
while the VASP interactive implementation uses Output.dft_output.log_dict
.
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.
I'm not sure how it is handled, but the vasp.interactive.Output
was literally not used as far as I could tell. When I create a test vasp job in a notebook (pr.create.job.Vasp
) its job._output_parser
object is the vasp.base.Output
, only when VaspInteractive.interactive_close
is called this was overwritten. I can test again with a "proper" interactive vasp job, though, in case there are any weird edge cases.
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.
LGTM, up to you to see if edge cases exist, but I don't think it's worth the time.
Test failure discussed in #1444, merging anyway. |
The vasp.interactive sub module defined subclasses that did not change the functionality of the base classes. As far as I can tell they were not used except in
VaspInteractive.interactive_close
, so I have removed them but left the imports in place in case any HDF5 files still refer to them.