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
[WIP] Allow alternative file name of vasp_output #487
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #487 +/- ##
===========================================
- Coverage 74.06% 74.03% -0.03%
===========================================
Files 55 55
Lines 5805 5813 +8
===========================================
+ Hits 4299 4303 +4
- Misses 1506 1510 +4
Continue to review full report at Codecov.
|
@zhubonan and @espenfl, I have questions.
|
Before answering your questions I will just make a general comment. Currently we do this:
Obviously, the If we could somehow prepare this before the immigration is done, that would maybe be ideal as then we could leave the current framework intact. E.g. the parser does not know if it is an immigrant calculation or not, which I believe is maybe a behaviour that is useful. |
In fact, this is now hardcoded in the parser config, which we should change. Or we need to make sure that particular file is present (can be a file object as we will move to this anyway, which is something to consider). See
This is handled by the
We could just make another of the |
Thanks a lot @atztogo for addressing this. I will try to give you some answers below.
In the
That file is on the always retrieve list currently, so that should fail if it is not there. We of course need the immigrator to work without such files being present as well.
The attachment is done in the parser like for the other nodes. That should sit in |
Maybe the current behaviour is different from what you might think. I was thinking what I have to do is little, but it seems we have large degrees of freedom in the design. Probably we should discuss in meeting. My last question is about how I can make the real calculation where the error message can be attached to |
That can certainly be. Also, there might be something that still does not work as it should :)
That is interesting. Let us have a look at that. Do you want to raise an issue? |
We may be able to fix this one point. But I feel I should enlarge my scope to tackle this issue around stream. I has underestimated this issue. I will investigate more to make a starting point for the discussion (for which I will need @espenfl and @zhubonan's helps.) If you agree, I will once close this PR. How do you think? |
Hmm, this is slightly more complicated than I think. The aiida-vasp/aiida_vasp/parsers/settings.py Lines 62 to 66 in d16e080
If we decide to use the I personally actually set
With the current develop branch the calculation is likely to not fail and the parsed This probably explains @atztogo 's finding that the stream parser does not catch the error, as it is still looking for the |
Yes, this should be fixed. It is in the always retrieved list by default. And if it is not there it should be a hard fail, or at least one should enter fallback mode. Of course, if the file, while other VASP files are for some strange reason, we might be able to salvage. I think we already did check that the files was in place (but maybe not an actual check after the copy). If |
Filenames are used only as the keys of def _init_parser_definitions(self, file_parser_set, vasp_output_filename=None):
"""Load a set of parser definitions."""
if file_parser_set not in FILE_PARSER_SETS:
return
for filename, parser_dict in FILE_PARSER_SETS.get(file_parser_set).items():
_filename = filename
if filename == 'vasp_output' and vasp_output_filename is not None:
_filename = vasp_output_filename
self._parser_definitions[_filename] = deepcopy(parser_dict) I treat |
This is a good idea and an independent issue. Currently the default |
Do |
Yes, I mean the actual file that the stdout is diverted to should be in the ALWAYS_RETRIEVED_LIST. |
Is the term |
I think this PR to be merged, my propose of being done will be minimized to those:
In this way, I don't need to consider the file & process handler chains and this PR to be well independent. If we don't like this, I will simply close this PR. |
I think so. When calculation is prepared and passed to aiida, we attach a list of files to be retrieved. The |
Sounds good to me! One thing I would like to suggest is that you can just add the |
Please check the applicable boxes, thank you:
I, the author consider this PR
Interactions with issues / other PRs
Related to issues #482 and PR #485.
Description
This can be independent PR from PR #485 to satisfy the issue #482.
Currently I shallow-copy
_ALWAYS_RETRIEVE_LIST
to a method local list and replacevasp_output
in the list bymetadata.options.output_filename
, then use this list instead of_ALWAYS_RETRIEVE_LIST
. In this case,_ALWAYS_RETRIEVE_LIST
is not the list of files that are always retrieved, unfortunately. However, if this option is used only for immigration, since immigration is a special case, so this breaking of the context may be acceptable. But this will be widely used, then we need refactoring.Questions
@espenfl, @zhubonan, could you tell me how I should write the test of the following update.
I updated
aiida_vasp/calcs/vasp.py
to acceptmetadata.options.output_filename
and set this string ascodes_info[0].stdout_name
instead of the stringvasp_output
. I confirmed that mystdout_name
file was retrieved after this update. What I don't understand are:stdout_name
.