This should restore changes to Makefile and setup.f90 that went lost in a

recent checkin


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4988 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
degironc 2008-06-16 16:44:38 +00:00
parent ed4d69d93c
commit 24cf60b606
3 changed files with 82 additions and 40 deletions

View File

@ -316,6 +316,27 @@ MODULES = \
../Modules/xml_io_base.o \
../Modules/zhpev_drv.o
EEOBJS = \
../EE/dvdr_tao.o \
../EE/add_dcc_field.o \
../EE/v_h_from_rho_r.o \
../EE/multiscale.o \
../EE/writetofile.o \
../EE/mg_pb_solver.o \
../EE/add_boundary.o \
../EE/ee_mod.o \
../EE/gcoarse_mod.o \
../EE/add_dccdil_forces.o \
../EE/init_ee.o \
../EE/calc_ecomp.o \
../EE/setlocalcoul.o \
../EE/set_fft_dim_coarse.o \
../EE/set_mltgrid_dim.o \
../EE/data_structure_coarse.o \
../EE/add_ele_corr.o \
../EE/write_ee_summary.o \
../EE/ggen_coarse.o
TLDEPS=bindir mods libs libiotk
all : tldeps pw.x
@ -325,7 +346,7 @@ pw.x : pwscf.o libpw.a $(LIBOBJS)
pwscf.o $(MODULES) libpw.a $(LIBOBJS) $(LIBS)
- ( cd ../bin; ln -fs ../PW/$@ . )
libpw.a : $(PWOBJS)
libpw.a : $(PWOBJS) $(EEOBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@

View File

@ -440,6 +440,21 @@ exx.o : ../Modules/mp_global.o
exx.o : ../Modules/wavefunctions.o
exx.o : buffers.o
exx.o : pwcom.o
exx_loop.o : ../Modules/cell_base.o
exx_loop.o : ../Modules/check_stop.o
exx_loop.o : ../Modules/constants.o
exx_loop.o : ../Modules/control_flags.o
exx_loop.o : ../Modules/input_parameters.o
exx_loop.o : ../Modules/io_files.o
exx_loop.o : ../Modules/io_global.o
exx_loop.o : ../Modules/ions_base.o
exx_loop.o : ../Modules/kind.o
exx_loop.o : ../Modules/mp.o
exx_loop.o : ../Modules/mp_global.o
exx_loop.o : ../Modules/path_formats.o
exx_loop.o : ../Modules/path_io_routines.o
exx_loop.o : ../Modules/path_variables.o
exx_loop.o : pwcom.o
find_group.o : ../Modules/kind.o
force_cc.o : ../Modules/atom.o
force_cc.o : ../Modules/cell_base.o
@ -1154,6 +1169,7 @@ scale_h.o : ../Modules/cell_base.o
scale_h.o : ../Modules/control_flags.o
scale_h.o : ../Modules/io_global.o
scale_h.o : ../Modules/ions_base.o
scale_h.o : ../Modules/kind.o
scale_h.o : pwcom.o
scf_mod.o : ../Modules/cell_base.o
scf_mod.o : ../Modules/constants.o
@ -1208,7 +1224,6 @@ setlocal.o : ../Modules/mp_global.o
setlocal.o : pwcom.o
setlocal.o : scf_mod.o
setqf.o : ../Modules/kind.o
setup.o : ../EE/ee_mod.o
setup.o : ../Modules/cell_base.o
setup.o : ../Modules/constants.o
setup.o : ../Modules/control_flags.o
@ -1247,6 +1262,7 @@ stop_run.o : ../Modules/io_files.o
stop_run.o : ../Modules/io_global.o
stop_run.o : ../Modules/metadyn_vars.o
stop_run.o : ../Modules/mp.o
stop_run.o : ../Modules/mp_global.o
stop_run.o : ../Modules/path_io_routines.o
stop_run.o : ../Modules/path_variables.o
stop_run.o : buffers.o
@ -1551,6 +1567,7 @@ dynamics_module.o : ../include/f_defs.h
electrons.o : ../include/f_defs.h
ewald_dipole.o : ../include/f_defs.h
exx.o : ../include/f_defs.h
exx_loop.o : ../include/f_defs.h
force_cc.o : ../include/f_defs.h
force_corr.o : ../include/f_defs.h
force_ew.o : ../include/f_defs.h

View File

@ -72,12 +72,12 @@ SUBROUTINE setup()
USE uspp, ONLY : okvan
USE ldaU, ONLY : lda_plus_u, Hubbard_U, &
Hubbard_l, Hubbard_alpha, Hubbard_lmax
USE bp, ONLY : gdir, lberry, nppstr
USE bp, ONLY : gdir, lberry, nppstr, lelfield, nx_el, nppstr_3d,l3dstring
USE fixed_occ, ONLY : f_inp, tfixed_occ
USE char, ONLY : sname
USE funct, ONLY : set_dft_from_name
USE mp_global, ONLY : nimage, kunit
USE spin_orb, ONLY : lspinorb, domag, so
USE spin_orb, ONLY : lspinorb, domag
USE noncollin_module, ONLY : noncolin, npol, m_loc, i_cons, mcons, &
angle1, angle2, bfield, ux
USE pw_restart, ONLY : pw_readfile
@ -87,22 +87,22 @@ SUBROUTINE setup()
#endif
USE funct, ONLY : dft_is_meta, dft_is_hybrid, dft_is_gradient
USE paw_variables, ONLY : okpaw
! DCC
USE ee_mod, ONLY : do_coarse, do_mltgrid
!
IMPLICIT NONE
!
INTEGER :: na, nt, input_nks, nrot, irot, isym, tipo, is, nb, ierr, ibnd
INTEGER :: na, nt, input_nks, nrot, irot, isym, tipo, is, nb, ierr, ibnd, ik
LOGICAL :: minus_q, magnetic_sym, ltest
REAL(DP) :: iocc, ionic_charge
!
INTEGER, EXTERNAL :: n_atom_wfc, set_Hubbard_l
LOGICAL, EXTERNAL :: lchk_tauxk ! tests that atomic coordinates do not overlap
!
!
IF ( dft_is_meta() .AND. ANY ( upf(:)%tvanp ) ) &
CALL errore( 'setup', 'US and Meta-GGA not yet implemented', 1 )
ALLOCATE( m_loc( 3, nat ) )
!
#if ! defined (EXX)
IF ( nimage > 1 .AND. .NOT. lpath ) &
CALL errore( 'setup', 'images parallelization not permitted', 1 )
@ -129,6 +129,9 @@ SUBROUTINE setup()
!
END IF
!
! ... magnetism-related quantities
!
ALLOCATE( m_loc( 3, nat ) )
! time reversal operation is set up to 0 by default
t_rev = 0
IF ( noncolin ) THEN
@ -141,19 +144,6 @@ SUBROUTINE setup()
! ... wavefunctions are spinors with 2 components
!
npol = 2
!
! initialize the quantization direction for gga
!
ux=0.0_DP
!
! ... transform angles to radiants
!
! DO nt = 1, ntyp
!
! angle1(nt) = pi * angle1(nt) / 180.D0
! angle2(nt) = pi * angle2(nt) / 180.D0
! !
! END DO
!
! ... Set the nomag variable to make a spin-orbit calculation with zero
! ... magnetization
@ -183,6 +173,10 @@ SUBROUTINE setup()
m_loc(3,na) = starting_magnetization(ityp(na)) * &
COS( angle1(ityp(na)) )
END DO
!
! initialize the quantization direction for gga
!
ux=0.0_DP
if (dft_is_gradient()) call compute_ux(m_loc,ux,nat)
!
bfield=0.D0
@ -192,11 +186,7 @@ SUBROUTINE setup()
! ... angle theta between the magnetic moments and the z-axis is
! ... constrained. Transform theta to radiants
!
DO na = 1, ntyp
!
mcons(1,na) = pi * mcons(1,na) / 180.D0
!
END DO
mcons(1,:) = pi * mcons(1,:) / 180.D0
!
ELSE IF ( i_cons == 4 ) THEN
!
@ -247,8 +237,8 @@ SUBROUTINE setup()
iocc = iocc + SUM( f_inp(1:nbnd,1) )
#endif
DO ibnd = 1, nbnd
if (f_inp(ibnd,1).gt.1.d0.or.f_inp(ibnd,1).lt.0.d0) call &
errore('setup','wrong fixed occupations',1)
if ( f_inp(ibnd,1) > 1.0_dp .or. f_inp(ibnd,1) < 0.0_dp ) &
call errore('setup','wrong fixed occupations',1)
END DO
!
ELSE
@ -415,12 +405,6 @@ SUBROUTINE setup()
IF ( lspinorb .AND. ALL ( .NOT. upf(:)%has_so ) ) &
CALL infomsg ('setup','At least one non s.o. pseudo')
!
DO nt = 1, ntyp
!
so(nt) = upf(nt)%has_so
!
END DO
!
IF ( .NOT. lspinorb ) CALL average_pp ( ntyp )
!
! ... set number of atomic wavefunctions
@ -461,12 +445,15 @@ SUBROUTINE setup()
!
! ... Test that atoms do not overlap
!
IF ( .NOT. ( lchk_tauxk( nat, tau, bg ) ) ) &
CALL errore( 'setup', 'Wrong atomic coordinates ', 1 )
call check_atoms ( nat, tau, bg )
!
! ... calculate dimensions of the FFT grid
!
CALL set_fft_dim()
! DCC
IF( do_coarse ) CALL set_fft_dim_coarse()
!
IF( do_mltgrid ) CALL set_mltgrid_dim()
!
! ... generate transformation matrices for the crystal point group
! ... First we generate all the symmetry matrices of the Bravais lattice
@ -527,7 +514,7 @@ SUBROUTINE setup()
!
ELSE IF ( nkstot == 0 ) THEN
!
IF ( lberry ) THEN
IF ( lberry .and. .not. lelfield) THEN
!
CALL kp_strings( nppstr, gdir, nrot, s, bg, npk, &
k1, k2, k3, nk1, nk2, nk3, nkstot, xk, wk )
@ -536,6 +523,14 @@ SUBROUTINE setup()
nrot = 1
nsym = 1
!
ELSE IF (lelfield) THEN
CALL kpoint_grid_efield (at,bg, npk, &
k1,k2,k3, nk1,nk2,nk3, nkstot, xk, wk, nspin)
!
nosym = .TRUE.
nrot = 1
nsym = 1
!
ELSE
!
CALL kpoint_grid ( nrot, time_reversal, s, t_rev, bg, npk, &
@ -543,6 +538,17 @@ SUBROUTINE setup()
!
END IF
!
ELSE IF( lelfield) THEN
allocate(nx_el(nkstot*nspin,3))
do ik=1,nkstot
nx_el(ik,gdir)=ik
enddo
if(nspin==2) nx_el(nkstot+1:2*nkstot,:)=nx_el(1:nkstot,:)+nkstot
nppstr_3d(gdir)=nppstr
l3dstring=.false.
nosym = .TRUE.
nrot = 1
nsym = 1
END IF
!
! ... allocate space for irt
@ -617,7 +623,6 @@ SUBROUTINE setup()
IF ( dft_is_hybrid() ) CALL errore( 'setup ', &
'HYBRID XC not implemented in PWscf', 1 )
#endif
!
IF ( lsda ) THEN
!
@ -727,7 +732,6 @@ FUNCTION n_atom_wfc( nat, ityp )
!
USE uspp_param, ONLY : upf
USE noncollin_module, ONLY : noncolin
USE spin_orb, ONLY : so
!
IMPLICIT NONE
!
@ -750,7 +754,7 @@ FUNCTION n_atom_wfc( nat, ityp )
!
IF ( noncolin ) THEN
!
IF ( so(nt) ) THEN
IF ( upf(nt)%has_so ) THEN
!
n_atom_wfc = n_atom_wfc + 2 * upf(nt)%lchi(n)
!