in the xml output the symmetries is now optional, code changed accordingly

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13392 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
pietrodelugas 2017-03-10 16:55:11 +00:00
parent 133cc3e439
commit f966bea360
4 changed files with 27 additions and 14 deletions

View File

@ -4355,6 +4355,7 @@ SUBROUTINE qes_init_bands(obj, tagname, nbnd_ispresent, nbnd, smearing_ispresent
REAL(DP) :: tot_charge
LOGICAL :: tot_magnetization_ispresent
REAL(DP) :: tot_magnetization
LOGICAL :: occupations_ispresent
TYPE(occupations_type) :: occupations
LOGICAL :: inputOccupations_ispresent
INTEGER :: ndim_inputOccupations
@ -5979,7 +5980,10 @@ SUBROUTINE qes_write_output(iun, obj)
!
CALL qes_write_atomic_structure(iun, obj%atomic_structure)
!
CALL qes_write_symmetries(iun, obj%symmetries)
IF(obj%symmetries_ispresent) THEN
CALL qes_write_symmetries(iun, obj%symmetries)
!
ENDIF
!
CALL qes_write_basis_set(iun, obj%basis_set)
!
@ -6023,10 +6027,10 @@ SUBROUTINE qes_write_output(iun, obj)
END SUBROUTINE qes_write_output
SUBROUTINE qes_init_output(obj, tagname, convergence_info, algorithmic_info, &
atomic_species, atomic_structure, symmetries, basis_set, dft, &
magnetization, total_energy, band_structure, &
forces_ispresent, forces, stress_ispresent, stress, &
electric_field_ispresent, electric_field, &
atomic_species, atomic_structure, symmetries_ispresent, &
symmetries, basis_set, dft, magnetization, total_energy, &
band_structure, forces_ispresent, forces, stress_ispresent, &
stress, electric_field_ispresent, electric_field, &
FCP_force_ispresent, FCP_force, FCP_tot_charge_ispresent, &
FCP_tot_charge)
IMPLICIT NONE
@ -6038,6 +6042,7 @@ SUBROUTINE qes_init_output(obj, tagname, convergence_info, algorithmic_info, &
TYPE(algorithmic_info_type) :: algorithmic_info
TYPE(atomic_species_type) :: atomic_species
TYPE(atomic_structure_type) :: atomic_structure
LOGICAL :: symmetries_ispresent
TYPE(symmetries_type) :: symmetries
TYPE(basis_set_type) :: basis_set
TYPE(dft_type) :: dft
@ -6060,7 +6065,10 @@ SUBROUTINE qes_init_output(obj, tagname, convergence_info, algorithmic_info, &
obj%algorithmic_info = algorithmic_info
obj%atomic_species = atomic_species
obj%atomic_structure = atomic_structure
obj%symmetries = symmetries
obj%symmetries_ispresent = symmetries_ispresent
IF(obj%symmetries_ispresent) THEN
obj%symmetries = symmetries
ENDIF
obj%basis_set = basis_set
obj%dft = dft
obj%magnetization = magnetization
@ -6100,7 +6108,10 @@ SUBROUTINE qes_reset_output(obj)
CALL qes_reset_algorithmic_info(obj%algorithmic_info)
CALL qes_reset_atomic_species(obj%atomic_species)
CALL qes_reset_atomic_structure(obj%atomic_structure)
CALL qes_reset_symmetries(obj%symmetries)
IF(obj%symmetries_ispresent) THEN
CALL qes_reset_symmetries(obj%symmetries)
obj%symmetries_ispresent = .FALSE.
ENDIF
CALL qes_reset_basis_set(obj%basis_set)
CALL qes_reset_dft(obj%dft)
CALL qes_reset_magnetization(obj%magnetization)

View File

@ -1183,6 +1183,7 @@ TYPE :: output_type
TYPE(algorithmic_info_type) :: algorithmic_info
TYPE(atomic_species_type) :: atomic_species
TYPE(atomic_structure_type) :: atomic_structure
LOGICAL :: symmetries_ispresent
TYPE(symmetries_type) :: symmetries
TYPE(basis_set_type) :: basis_set
TYPE(dft_type) :: dft

View File

@ -174,11 +174,10 @@ MODULE qexsd_input
!
IF (PRESENT ( tot_mag)) tot_mag_ispresent = .TRUE.
CALL qes_init_bands(obj,TAGNAME,NBND_ISPRESENT=(nbnd .GT. 0), NBND = nbnd,&
SMEARING_ISPRESENT = smearing_obj%lread, SMEARING = smearing_obj,&
TOT_CHARGE_ISPRESENT=.TRUE., TOT_CHARGE = tot_charge, &
TOT_MAGNETIZATION_ISPRESENT = tot_mag_ispresent, TOT_MAGNETIZATION = tot_mag, &
OCCUPATIONS=occup_obj, INPUTOCCUPATIONS_ISPRESENT=inp_occ_arepresent, &
CALL qes_init_bands(obj,TAGNAME,NBND_ISPRESENT=(nbnd .GT. 0), NBND = nbnd, SMEARING_ISPRESENT = smearing_obj%lread,&
SMEARING = smearing_obj, TOT_CHARGE_ISPRESENT=.TRUE., TOT_CHARGE = tot_charge, &
TOT_MAGNETIZATION_ISPRESENT = tot_mag_ispresent, TOT_MAGNETIZATION = tot_mag, &
OCCUPATIONS=occup_obj, INPUTOCCUPATIONS_ISPRESENT=inp_occ_arepresent, &
NDIM_INPUTOCCUPATIONS= inpOcc_size, INPUTOCCUPATIONS = inpOcc_objs)
CALL qes_reset_smearing(smearing_obj)
CALL qes_reset_occupations(occup_obj)

View File

@ -3231,8 +3231,10 @@ CALL qexsd_get_atomic_structure ( iunit, obj%atomic_structure, found )
IF (.NOT. found ) CALL errore ( "qexsd_get_output", "reading xml-output: atomic_species not found", 1 )
!
CALL qexsd_get_symmetries( iunit, obj%symmetries, found )
IF (.NOT. found ) CALL infomsg ( "qexsd_get_output", "reading xml-output: symmetries not found")
IF (.NOT. found ) THEN
obj%symmetries_ispresent = .FALSE.
CALL infomsg ( "qexsd_get_output", "reading xml-output: symmetries not found")
END IF
CALL qexsd_get_basis_set (iunit, obj%basis_set, found )
IF ( .NOT. found ) CALL errore ( "qexsd_get_output", "reading xml-output: basis_set not found", 1)
!