From 776b4764b9a57c9741b68fbc5bdf3af4b329c47c Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Mon, 11 Jul 2022 00:21:15 -0500 Subject: [PATCH] Enable fox replacement. --- CMakeLists.txt | 1 + src/pw2qmcpack.f90 | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a9ef91..d5c4d83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,7 @@ target_link_libraries(pw2qmcpack_exe qe_modules qe_fftx qe_upflib + qe_fox qe_xclib pw2qmcpack_esh5) diff --git a/src/pw2qmcpack.f90 b/src/pw2qmcpack.f90 index 559d270..ecb454b 100644 --- a/src/pw2qmcpack.f90 +++ b/src/pw2qmcpack.f90 @@ -189,7 +189,11 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug) use fft_interfaces, ONLY : invfft, fwfft USE dfunct, ONLY : newd USE symm_base, ONLY : nsym, s, ft +#if defined(__fox) USE Fox_wxml +#else + USE wxml +#endif IMPLICIT NONE LOGICAL :: write_psir, expand_kp, debug @@ -436,7 +440,8 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug) tmp = TRIM( tmp_dir ) // TRIM( prefix )// '.ptcl.xml' CALL xml_OpenFile(filename = TRIM(tmp), XF = xmlfile, PRETTY_PRINT = .true., & - REPLACE = .true., NAMESPACE = .true.) + REPLACE = .true., NAMESPACE = .true., IOSTAT=ios) + IF ( ios/=0 ) CALL errore('pw2qmcpack', 'Failed to open/create '//TRIM(tmp), ABS(ios)) CALL xml_NewElement(xmlfile, "qmcsystem") CALL xml_NewElement(xmlfile, "simulationcell") @@ -600,7 +605,9 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug) ! ENDIF tmp = TRIM( tmp_dir ) // TRIM( prefix )// '.wfs.xml' CALL xml_OpenFile(filename = TRIM(tmp), XF = xmlfile, PRETTY_PRINT = .true., & - REPLACE = .true., NAMESPACE = .true.) + REPLACE = .true., NAMESPACE = .true., IOSTAT=ios) + IF ( ios/=0 ) CALL errore('pw2qmcpack', 'Failed to open/create '//TRIM(tmp), ABS(ios)) + CALL xml_NewElement(xmlfile, "qmcsystem") ! CALL xml_NewElement(xmlfile, "wavefunction")