Variable lmovecell exported from pw.x. Several postprocessing codes

are not working if lmovecell is true. The phonon now stops with a message.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7076 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
dalcorso 2010-09-09 16:45:45 +00:00
parent 6360b48870
commit 0c10a79a7f
4 changed files with 32 additions and 2 deletions

View File

@ -45,7 +45,7 @@ MODULE xml_io_base
restart_dir, check_restartfile, check_file_exst, &
pp_check_file, save_history, save_print_counter, &
read_print_counter, set_kpoints_vars, &
write_header, write_control, &
write_header, write_control, write_moving_cell, &
write_cell, write_ions, write_symmetry, write_planewaves, &
write_efield, write_spin, write_magnetization, write_xc, &
#ifdef EXX
@ -777,6 +777,17 @@ MODULE xml_io_base
!
END SUBROUTINE write_cell
!
SUBROUTINE write_moving_cell(lmovecell, cell_factor)
LOGICAL, INTENT(IN) :: lmovecell
REAL(DP), INTENT(IN) :: cell_factor
CALL iotk_write_begin( iunpun, "MOVING_CELL" )
CALL iotk_write_dat( iunpun, "CELL_FACTOR", cell_factor)
CALL iotk_write_end( iunpun, "MOVING_CELL" )
RETURN
END SUBROUTINE write_moving_cell
!------------------------------------------------------------------------
SUBROUTINE write_ions( nsp, nat, atm, ityp, psfile, &
pseudo_dir, amass, tau, if_pos, dirname, pos_unit )

View File

@ -30,6 +30,7 @@ SUBROUTINE phq_readin()
USE fixed_occ, ONLY : tfixed_occ
USE lsda_mod, ONLY : lsda, nspin
USE spin_orb, ONLY : domag
USE cellmd, ONLY : lmovecell
USE printout_base, ONLY : title
USE control_ph, ONLY : maxter, alpha_mix, lgamma, lgamma_gamma, epsil, &
zue, zeu, xmldyn, &
@ -354,6 +355,9 @@ SUBROUTINE phq_readin()
IF (noncolin.and.(lraman.or.elop.or.elph)) CALL errore('phq_readin', &
'lraman, elop, or e-ph and noncolin not programed',1)
IF (lmovecell) CALL errore('phq_readin', &
'The phonon code is not working after vc-relax',1)
IF (nproc_image /= nproc_image_file .and. .not. twfcollect) &
CALL errore('phq_readin',&
'pw.x run with a different number of processors. Use wf_collect=.true.',1)

View File

@ -114,6 +114,7 @@ MODULE pw_restart
USE exx, ONLY : x_gamma_extrapolation, nq1, nq2, nq3, &
exxdiv_treatment, yukawa, ecutvcut
#endif
USE cellmd, ONLY : lmovecell, cell_factor
!
IMPLICIT NONE
@ -328,6 +329,7 @@ MODULE pw_restart
!
CALL write_cell( ibrav, symm_type, celldm, alat, &
at(:,1), at(:,2), at(:,3), bg(:,1), bg(:,2), bg(:,3) )
IF (lmovecell) CALL write_moving_cell(lmovecell, cell_factor)
!
!-------------------------------------------------------------------------------
! ... IONS
@ -1421,6 +1423,7 @@ MODULE pw_restart
USE printout_base, ONLY: title
USE cell_base, ONLY : ibrav, alat, symm_type, at, bg, celldm
USE cell_base, ONLY : tpiba, tpiba2, omega
USE cellmd, ONLY : lmovecell, cell_factor
!
IMPLICIT NONE
!
@ -1524,6 +1527,12 @@ MODULE pw_restart
!
CALL iotk_scan_end( iunpun, "CELL" )
!
CALL iotk_scan_begin( iunpun, "MOVING_CELL", found=lmovecell )
IF (lmovecell) THEN
CALL iotk_scan_dat( iunpun, "CELL_FACTOR", cell_factor)
CALL iotk_scan_end( iunpun, "MOVING_CELL" )
END IF
!
CALL iotk_close_read( iunpun )
!
END IF
@ -1537,6 +1546,12 @@ MODULE pw_restart
CALL mp_bcast( omega, ionode_id, intra_image_comm )
CALL mp_bcast( at, ionode_id, intra_image_comm )
CALL mp_bcast( bg, ionode_id, intra_image_comm )
CALL mp_bcast( lmovecell, ionode_id, intra_image_comm )
IF (lmovecell) THEN
CALL mp_bcast( cell_factor, ionode_id, intra_image_comm )
ELSE
cell_factor=1.0_DP
END IF
!
title = ' '
!

View File

@ -135,7 +135,7 @@ SUBROUTINE read_file()
END IF
!
if (cell_factor == 0.d0) cell_factor = 1.D0
lmovecell = .FALSE.
! lmovecell = .FALSE.
!
! ... allocate memory for eigenvalues and weights (read from file)
!