Skip to content

Commit 776b476

Browse files
committed
Enable fox replacement.
1 parent d8b2441 commit 776b476

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ target_link_libraries(pw2qmcpack_exe
5959
qe_modules
6060
qe_fftx
6161
qe_upflib
62+
qe_fox
6263
qe_xclib
6364
pw2qmcpack_esh5)
6465

src/pw2qmcpack.f90

+9-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug)
189189
use fft_interfaces, ONLY : invfft, fwfft
190190
USE dfunct, ONLY : newd
191191
USE symm_base, ONLY : nsym, s, ft
192+
#if defined(__fox)
192193
USE Fox_wxml
194+
#else
195+
USE wxml
196+
#endif
193197

194198
IMPLICIT NONE
195199
LOGICAL :: write_psir, expand_kp, debug
@@ -436,7 +440,8 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug)
436440

437441
tmp = TRIM( tmp_dir ) // TRIM( prefix )// '.ptcl.xml'
438442
CALL xml_OpenFile(filename = TRIM(tmp), XF = xmlfile, PRETTY_PRINT = .true., &
439-
REPLACE = .true., NAMESPACE = .true.)
443+
REPLACE = .true., NAMESPACE = .true., IOSTAT=ios)
444+
IF ( ios/=0 ) CALL errore('pw2qmcpack', 'Failed to open/create '//TRIM(tmp), ABS(ios))
440445

441446
CALL xml_NewElement(xmlfile, "qmcsystem")
442447
CALL xml_NewElement(xmlfile, "simulationcell")
@@ -600,7 +605,9 @@ SUBROUTINE compute_qmcpack(write_psir, expand_kp, debug)
600605
! ENDIF
601606
tmp = TRIM( tmp_dir ) // TRIM( prefix )// '.wfs.xml'
602607
CALL xml_OpenFile(filename = TRIM(tmp), XF = xmlfile, PRETTY_PRINT = .true., &
603-
REPLACE = .true., NAMESPACE = .true.)
608+
REPLACE = .true., NAMESPACE = .true., IOSTAT=ios)
609+
IF ( ios/=0 ) CALL errore('pw2qmcpack', 'Failed to open/create '//TRIM(tmp), ABS(ios))
610+
604611
CALL xml_NewElement(xmlfile, "qmcsystem")
605612
! <wavefunction name="psi0">
606613
CALL xml_NewElement(xmlfile, "wavefunction")

0 commit comments

Comments
 (0)