Commit 0bc6bc57 authored by timrov's avatar timrov

Remove the dependence of TDDFPT on the PH variable 'tmp_dir_phq'

by creating a new variable 'tmp_dir_lr' in TDDFPT.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12169 c92efa57-630b-4861-b058-cf58834340f0
parent 157e732d
......@@ -27,7 +27,7 @@ SUBROUTINE lr_init_nfo()
USE wvfct, ONLY : nbnd, et, igk, npw, g2kin
USE realus, ONLY : real_space
USE lr_variables, ONLY : lr_verbosity, eels, nwordd0psi, &
& nwordrestart, restart, size_evc
nwordrestart, restart, size_evc, tmp_dir_lr
USE io_global, ONLY : stdout
USE constants, ONLY : pi, tpi, degspin, eps8
USE noncollin_module, ONLY : noncolin, npol
......@@ -38,7 +38,6 @@ SUBROUTINE lr_init_nfo()
USE ener, ONLY : ef, ef_up, ef_dw
USE ktetra, ONLY : ltetra
USE lsda_mod, ONLY : lsda, current_spin, nspin, isk
USE control_ph, ONLY : tmp_dir_phq
USE wvfct, ONLY : npwx, wg
USE gvecw, ONLY : gcutw
USE io_files, ONLY : iunigk, seqopn, tmp_dir, prefix, &
......@@ -128,7 +127,7 @@ SUBROUTINE lr_init_nfo()
!
iuwfc = 21
lrwfc = 2 * nbnd * npwx * npol
IF (restart) wfc_dir = tmp_dir_phq
IF (restart) wfc_dir = tmp_dir_lr
CALL diropn (iuwfc, 'wfc', lrwfc, exst)
IF (.NOT.exst) THEN
CALL errore ('lr_init_nfo', 'file '//trim(prefix)//'.wfc not found', 1)
......
......@@ -54,7 +54,6 @@ SUBROUTINE lr_readin
USE esm, ONLY : do_comp_esm
USE qpoint, ONLY : xq
USE save_ph, ONLY : tmp_dir_save
USE control_ph, ONLY : tmp_dir_phq
USE xml_io_base, ONLY : create_directory
USE io_rho_xml, ONLY : write_rho
USE noncollin_module, ONLY : noncolin
......@@ -362,19 +361,18 @@ SUBROUTINE lr_readin
!
! EELS: Create a temporary directory for nscf files, and for
! writing of the turboEELS restart files.
! TODO: Try to change the name "_ph" to something like "_eels".
!
IF (eels) THEN
tmp_dir_save = tmp_dir
tmp_dir_phq = TRIM (tmp_dir) // '_ph' // TRIM(int_to_char(my_image_id)) //'/'
CALL create_directory(tmp_dir_phq)
tmp_dir_lr = TRIM (tmp_dir) // 'tmp_eels/'
CALL create_directory(tmp_dir_lr)
ENDIF
!
! EELS: If restart=.true. read the initial information from the file
! where the turboEELS code saved its own data (including the data about
! the nscf calculation)
!
IF (eels .AND. restart) tmp_dir = tmp_dir_phq
IF (eels .AND. restart) tmp_dir = tmp_dir_lr
!
! Now PWSCF XML file will be read, and various initialisations will be done.
! I. Timrov: Allocate space for PW scf variables (EELS: for PW nscf files,
......@@ -392,7 +390,7 @@ SUBROUTINE lr_readin
!
! Specify the temporary derictory.
!
tmp_dir = tmp_dir_phq
tmp_dir = tmp_dir_lr
!
! Copy the scf-charge-density to the tmp_dir (PH/check_initial_status.f90).
! Needed for the nscf calculation.
......
!
! Copyright (C) 2001-2015 Quantum ESPRESSO group
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......@@ -19,11 +19,12 @@ SUBROUTINE lr_run_nscf( )
USE io_files, ONLY : prefix, tmp_dir, wfc_dir, seqopn
USE lsda_mod, ONLY : nspin
USE control_flags, ONLY : restart
USE control_ph, ONLY : reduce_io, tmp_dir_phq, ext_restart
USE control_ph, ONLY : reduce_io, ext_restart
USE save_ph, ONLY : tmp_dir_save
USE io_global, ONLY : stdout
USE fft_base, ONLY : dffts
USE mp_bands, ONLY : ntask_groups
USE lr_variables, ONLY : tmp_dir_lr
!
IMPLICIT NONE
!
......@@ -37,8 +38,8 @@ SUBROUTINE lr_run_nscf( )
!
! From now on, work only on the _ph directory
!
wfc_dir = tmp_dir_phq
tmp_dir = tmp_dir_phq
wfc_dir = tmp_dir_lr
tmp_dir = tmp_dir_lr
!
! Setting the values for the nscf run
!
......
......@@ -38,6 +38,7 @@ MODULE lr_variables
REAL(kind=dp) :: q1,q2,q3 ! Components of the q-vector in units of 2*pi/a
! in Cartesian coordinates
CHARACTER(len=30) :: approximation ! Level of approximation in TDDFPT
CHARACTER(LEN=256) :: tmp_dir_lr ! Name of a temporary directory
!
!------------------------------------------------------------------------!
!
......
!
! Copyright (C) 2001-2015 Quantum ESPRESSO group
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......@@ -21,14 +21,13 @@ SUBROUTINE lr_write_restart()
LR_polarization, LR_iteration, n_ipol,F,project,&
evc1,evc1_new,evc1_old,iunrestart, nwordrestart, &
nbnd_total, charge_response,lr_verbosity,&
bgz_suffix, eels, q1, q2, q3, sum_rule
bgz_suffix, eels, q1, q2, q3, sum_rule, tmp_dir_lr
USE charg_resp, ONLY : resonance_condition, rho_1_tot, rho_1_tot_im
USE wvfct, ONLY : nbnd, npwx, npw
USE fft_base, ONLY : dfftp
USE io_global, ONLY : ionode, stdout
USE klist, ONLY : nks, nelec
USE noncollin_module, ONLY : nspin_mag, noncolin
USE control_ph, ONLY : tmp_dir_phq
use lsda_mod, only : nspin
USE cell_base, ONLY : alat, omega
!
......@@ -54,7 +53,7 @@ SUBROUTINE lr_write_restart()
!
IF ( n_ipol /= 1 ) pol_index = LR_polarization
!
IF (eels) tmp_dir = tmp_dir_phq
IF (eels) tmp_dir = tmp_dir_lr
!
#ifdef __MPI
IF (ionode) THEN
......
......@@ -426,7 +426,6 @@ lr_readin.o : ../../Modules/plugin_flags.o
lr_readin.o : ../../Modules/recvec.o
lr_readin.o : ../../Modules/uspp.o
lr_readin.o : ../../Modules/xml_io_base.o
lr_readin.o : ../../PHonon/PH/phcom.o
lr_readin.o : ../../PHonon/PH/save_ph_input.o
lr_readin.o : ../../PW/src/esm.o
lr_readin.o : ../../PW/src/exx.o
......@@ -467,6 +466,7 @@ lr_run_nscf.o : ../../PHonon/PH/phcom.o
lr_run_nscf.o : ../../PHonon/PH/save_ph_input.o
lr_run_nscf.o : ../../PW/src/atomic_wfc_mod.o
lr_run_nscf.o : ../../PW/src/pwcom.o
lr_run_nscf.o : lr_variables.o
lr_set_boxes_density.o : ../../Modules/fft_base.o
lr_set_boxes_density.o : ../../Modules/io_global.o
lr_set_boxes_density.o : ../../Modules/kind.o
......@@ -558,7 +558,6 @@ lr_write_restart.o : ../../Modules/io_files.o
lr_write_restart.o : ../../Modules/io_global.o
lr_write_restart.o : ../../Modules/kind.o
lr_write_restart.o : ../../Modules/noncol.o
lr_write_restart.o : ../../PHonon/PH/phcom.o
lr_write_restart.o : ../../PW/src/pwcom.o
lr_write_restart.o : lr_charg_resp.o
lr_write_restart.o : lr_variables.o
......
......@@ -48,7 +48,7 @@ PROGRAM lr_calculate_spectrum
REAL(kind=dp) :: omegmax,delta_omeg
CHARACTER(len=60) :: extrapolation, td
CHARACTER(len=256) :: outdir, filename, filename1, &
& eign_file, tmp_dir_phq
& eign_file, tmp_dir_lr
INTEGER :: units
LOGICAL :: eels
!
......@@ -171,12 +171,12 @@ PROGRAM lr_calculate_spectrum
outdir = trimcheck(outdir)
tmp_dir = outdir
!
! EELS: Read data from the directory _ph
! EELS: Read data from the directory tmp_dir_lr
!
IF (eels) THEN
!
tmp_dir_phq = TRIM (tmp_dir) // '_ph' // TRIM(int_to_char(my_image_id)) //'/'
tmp_dir = tmp_dir_phq
tmp_dir_lr = TRIM (tmp_dir) // 'tmp_eels/'
tmp_dir = tmp_dir_lr
!
ENDIF
!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment