mirror of https://gitlab.com/QEF/q-e.git
now read_conf_from_file reads configuration for the xml output file.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12784 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
27787dc887
commit
99914bc7af
|
@ -17,6 +17,11 @@ FUNCTION read_config_from_file(nat, at_old,omega_old, lmovecell, at, bg, omega,
|
|||
! USE cellmd, ONLY : at_old, omega_old, lmovecell
|
||||
USE io_files, ONLY : tmp_dir, prefix
|
||||
USE pw_restart, ONLY : pw_readfile
|
||||
#ifdef __XSD
|
||||
USE pw_restart, ONLY : pw_readschema_file, init_vars_from_schema
|
||||
USE qes_types_module, ONLY : output_type, input_type, parallel_info_type, general_info_type
|
||||
USE qes_libs_module, ONLY : qes_reset_output, qes_reset_input, qes_reset_general_info, qes_reset_parallel_info
|
||||
#endif
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -26,6 +31,13 @@ FUNCTION read_config_from_file(nat, at_old,omega_old, lmovecell, at, bg, omega,
|
|||
REAL(DP),INTENT(inout) :: at(3,3), bg(3,3), omega
|
||||
REAL(DP),INTENT(inout) :: tau(3,nat)
|
||||
INTEGER :: ierr
|
||||
#ifdef __XSD
|
||||
TYPE ( output_type), ALLOCATABLE :: output_obj
|
||||
TYPE ( input_type ), ALLOCATABLE :: input_obj
|
||||
TYPE (parallel_info_type),ALLOCATABLE :: parinfo_obj
|
||||
TYPE (general_info_type ),ALLOCATABLE :: geninfo_obj
|
||||
#endif
|
||||
|
||||
!
|
||||
!
|
||||
WRITE( stdout, '(/5X,"Atomic positions and unit cell read from directory:", &
|
||||
|
@ -33,7 +45,20 @@ FUNCTION read_config_from_file(nat, at_old,omega_old, lmovecell, at, bg, omega,
|
|||
!
|
||||
! ... check if restart file is present, if yes read config parameters
|
||||
!
|
||||
#ifdef __XSD
|
||||
ALLOCATE (output_obj, input_obj, parinfo_obj, geninfo_obj)
|
||||
CALL pw_readschema_file ( ierr, output_obj, input_obj, parinfo_obj, geninfo_obj)
|
||||
IF (ierr == 0 ) THEN
|
||||
CALL init_vars_from_schema ( 'config', ierr, output_obj, input_obj, parinfo_obj, geninfo_obj )
|
||||
CALL qes_reset_output(output_obj)
|
||||
CALL qes_reset_input (input_obj)
|
||||
CALL qes_reset_parallel_info (parinfo_obj)
|
||||
CALL qes_reset_general_info (geninfo_obj)
|
||||
END IF
|
||||
DEALLOCATE ( output_obj, input_obj, parinfo_obj, geninfo_obj )
|
||||
#else
|
||||
CALL pw_readfile( 'config', ierr )
|
||||
#endif
|
||||
!
|
||||
IF ( ierr > 0 ) THEN
|
||||
!
|
||||
|
|
|
@ -199,7 +199,7 @@ SUBROUTINE read_xml_file_internal(withbs)
|
|||
! ... first we get the version of the qexml file
|
||||
! if not already read
|
||||
CALL init_vars_from_schema ( 'header', ierr, output_obj, input_obj, parinfo_obj, geninfo_obj )
|
||||
CALL errore( 'read_xml_file ', 'unable to determine qexml version', ABS(ierr) )
|
||||
CALL errore( 'read_xml_file ', 'unable to determine determine schema version', ABS(ierr) )
|
||||
#else
|
||||
! ... first we get the version of the qexml file
|
||||
! if not already read
|
||||
|
|
Loading…
Reference in New Issue