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

Nexus: fix convert4qmc hdf5 issue #4243

Merged
merged 4 commits into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions nexus/lib/qmcpack_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,25 @@ def check_sim_status(self):
output = open(os.path.join(self.locdir,self.outfile),'r').read()
#errors = open(os.path.join(self.locdir,self.errfile),'r').read()

# Recent versions of convert4qmc no longer produce the orbs.h5 file.
anbenali marked this conversation as resolved.
Show resolved Hide resolved
# Instead, the file produced directly by e.g. Pyscf is used instead.
# Therefore, make a symlink to the previously produced file in
# place of the orbs.h5 file.
orbs = self.input.orbitals
finished = self.job.finished
h5_orbs = orbs is not None and orbs.endswith('.h5')
if finished and h5_orbs:
orbfile = self.get_prefix()+'.orbs.h5'
orbfilepath = os.path.join(self.locdir,orbfile)
h5_orbs_missing = not os.path.exists(orbfilepath)
if h5_orbs_missing:
cwd = os.getcwd()
os.chdir(self.locdir)
os.system('ln -s {} {}'.format(orbs,orbfile))
os.chdir(cwd)
#end if
#end if

success = 'QMCGaussianParserBase::dump' in output
for filename in self.list_output_files():
success &= os.path.exists(os.path.join(self.locdir,filename))
Expand Down