Commit cad18942 authored by Valerio Vitale's avatar Valerio Vitale

Merge branch 'develop' of https://gitlab.com/QEF/q-e into wannier90_in_QEv6.4

parents 214b4d47 a24be2fe
No preview for this file type
\documentclass[12pt,a4paper]{article}
\def\version{6.3}
\def\version{6.4}
\def\qe{{\sc Quantum ESPRESSO}}
\usepackage{html}
......@@ -124,16 +124,18 @@ Symlinks to executable programs will be placed in the \texttt{bin/} subdirectory
As a final check that compilation was successful,
you may want to run some or all of the tests
and examples. Please see the general User's Guide for their setup. Automated tests for \cpx\ are in directory
\texttt{tests/} and can be run via the
script \texttt{check\_cp.x.j}
and examples.
Automated tests for \cpx\ are in directory
\texttt{test-suite/} and can be run via the
\texttt{Makefile} found there.
Please see the general User's Guide for their setup.
You may take the tests and examples distributed
with \CP\ as templates for writing your own input
files. Input files for tests are contained
in \texttt{tests/} subdirectory with file type
\texttt{*.in1}, \texttt{*.in2}, ... . Input file for examples
are produced if you run the examples in the
files. Input files for tests are contained in
subdirectories \texttt{test-suite/cp\_*} with file type
\texttt{*.in1}, \texttt{*.in2}, ... . Input files for examples
are produced, if you run the examples, in the
\texttt{results/} subdirectories, with names ending
with \texttt{.in}.
......
......@@ -74,6 +74,7 @@ PROGRAM main
!
CALL cpr_loop( 1 )
!
CALL unset_mpi_comm_4_solvers ()
CALL stop_run()
CALL do_stop( .TRUE. )
!
......
......@@ -28,21 +28,29 @@ PROGRAM manycp
USE environment, ONLY : environment_start, environment_end
USE io_global, ONLY : ionode, ionode_id, stdout
USE mp_global, ONLY : mp_startup
USE mp_images, ONLY : my_image_id
USE mp_world, ONLY : world_comm
USE mp_images, ONLY : intra_image_comm, my_image_id
USE mp_pools, ONLY : intra_pool_comm
USE mp_bands, ONLY : intra_bgrp_comm, inter_bgrp_comm
USE mp_diag, ONLY : mp_start_diag
USE read_input, ONLY : read_input_file
USE check_stop, ONLY : check_stop_init
USE command_line_options, ONLY: input_file_
USE command_line_options, ONLY: input_file_, ndiag_
!
IMPLICIT NONE
!
INTEGER :: i
LOGICAL :: opnd
LOGICAL :: opnd, diag_in_band_group = .true.
CHARACTER(LEN=256) :: filin, filout
CHARACTER(LEN=7) :: image_label
CHARACTER(LEN=6), EXTERNAL :: int_to_char
!
!
CALL mp_startup ( start_images=.true. )
CALL mp_start_diag ( ndiag_, world_comm, intra_bgrp_comm, &
do_distr_diag_inside_bgrp_ = diag_in_band_group )
CALL set_mpi_comm_4_solvers( intra_pool_comm, intra_bgrp_comm, &
inter_bgrp_comm )
CALL environment_start ( 'MANYCP' )
!
! ... Image-specific input files
......@@ -100,6 +108,7 @@ PROGRAM manycp
!
CALL cpr_loop( 1 )
!
CALL unset_mpi_comm_4_solvers ()
CALL stop_run( )
CALL do_stop( .TRUE. )
!
......
......@@ -28,7 +28,6 @@ SUBROUTINE stop_run()
!
CALL plugin_clean()
!
CALL unset_mpi_comm_4_solvers ()
CALL mp_global_end()
!
END SUBROUTINE stop_run
......
No preview for this file type
No preview for this file type
New in development version:
New in version 6.4:
* Experimental version of SCDM localization with k-points, activated like for
k=0 by specifying in &system namelist a value > 0 for "localization_thr".
* It is now possible to limit the number of xml step elements printed out
for relaxation or molecular dynamics simulation, by setting the environment
variable MAX_XML_STEPS. Useful in case of very long trajectories to avoid
issues due to too large file size.
* EPW works with ultrasoft pseudopotentials (F. Giustino, S. Poncé, R. Margine)
* New code hp.x to compute Hubbard parameters using density-functional
perturbation theory (experimental stage) (I. Timrov, N. Marzari, and M. Cococcioni,
......@@ -10,7 +16,7 @@ New in development version:
and M. Cococcioni, in preparation)
* XDM now works also for USPP and norm-conserving PP
Problems fixed in development version (+ = in qe-6.3-backports as well) :
Problems fixed in version 6.4 (+ = in qe-6.3-backports as well) :
+ index not correctly initialized in LSDA phonon with core corrections
+ GTH pseudopotentials in analytical form wrongly computed in some cases
+ projwfc.x not working with new xml format in noncolinear/spinorbit case
......@@ -31,7 +37,7 @@ Problems fixed in development version (+ = in qe-6.3-backports as well) :
pseudopotentials was not working.
+ bad format in upf%comment when writing the PP_INFO section of UPF v2 PPs
Incompatible changes in development version:
Incompatible changes in version 6.4 version:
* Charge density in the LSDA case is stored as (up+down, up-down) and no longer
as (up,down). Output data format is unchanged to (up+down, up-down)
* Non-symmorphic operations are always allowed and the FFT grid is made
......@@ -47,7 +53,7 @@ Incompatible changes in development version:
variables of turbo_lanczos.x and turbo_davidson.x. Instead, they are read
from the XML file produced by pw.x. The variable real_space_debug was removed.
Known problems in development version:
Known problems in version 6.4:
* Frequent "dexx is negative" errors with hybrid functionals
New in 6.3 version:
......
No preview for this file type
......@@ -11,7 +11,7 @@ MODFLAGS= $(BASEMOD_FLAGS) \
$(MOD_FLAG)../../PW/src \
$(MOD_FLAG)../../PHonon/PH \
$(MOD_FLAG)../../LR_Modules \
$(MOD_FLAG)../../wannier90-2.1.0/src/obj \
$(MOD_FLAG)../../wannier90-3.0.0/src/obj \
$(MOD_FLAG)../../dft-d3
#
......@@ -106,7 +106,7 @@ system_mem_usage.o
PHOBJS = ../../PHonon/PH/libph.a
PWOBJS = ../../PW/src/libpw.a
W90LIB = ../../wannier90-2.1.0/libwannier.a
W90LIB = ../../wannier90-3.0.0/libwannier.a
LRMODS = ../../LR_Modules/liblrmod.a
PWOBJS = ../../PW/src/libpw.a
QEMODS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
......@@ -115,8 +115,6 @@ LIBOBJS =../../LAXlib/libqela.a ../../UtilXlib/libutil.a ../../clib/clib.a ../..
TLDEPS= pw ph
#all : pw ph wannier wcorr pp ld1 upf libepw.a epw.x
#all : pw ph wannier pp ld1 upf libepw.a epw.x
all : pw ph wannier pp upf libepw.a epw.x
libepw.a : $(EPWOBJS)
......@@ -128,11 +126,6 @@ epw.x : epw.o libepw.a $(PHOBJS) $(LRMODS) $(PWOBJS) $(W90LIB) $(QEMODS) $(LIBOB
epw.o libepw.a $(PHOBJS) $(LRMODS) $(W90LIB) $(PWOBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)
- ( cd ../bin ; ln -fs ../src/epw.x . )
# SP: Here to correct bugs in wannier 2.0.1
wcorr :
sed -i "s/allocate(fermi_energy_list(nfermi),stat=ierr)/if (.not. allocated(fermi_energy_list) ) allocate(fermi_energy_list(nfermi))/g" ../../wannier90-2.0.1/src/parameters.F90 ; sed -i "s/allocate(kubo_freq_list(kubo_nfreq),stat=ierr)/if (.not. allocated(kubo_freq_list) ) allocate(kubo_freq_list(kubo_nfreq)) /g" ../../wannier90-2.0.1/src/parameters.F90 ; cp wannier_lib.f90 wannier_lib.F90 ; cp wannier_lib.F90 ../../wannier90-2.0.1/src/
pw :
cd ../../ ; make pw
......@@ -140,7 +133,7 @@ ph :
cd ../../ ; make ph
wannier :
cd ../../ ; make w90 ; cd wannier90-2.1.0/ ; make lib
cd ../../ ; make w90 ; cd wannier90-3.0.0/ ; make lib
pp :
cd ../../ ; make pp
......
......@@ -10,7 +10,7 @@
!-----------------------------------------------------------------------
PROGRAM epw
!! author: Samuel Ponce', Roxana Margine, Carla Verdi, Feliciano Giustino
!! version: v5.0
!! version: v5.1
!! license: GNU
!! summary: EPW main driver
!!
......@@ -39,7 +39,7 @@
CHARACTER (LEN=12) :: code = 'EPW'
!! Name of the program
!
version_number = '5.0.0'
version_number = '5.1.0'
!
CALL init_clocks( .TRUE. )
!
......@@ -145,7 +145,7 @@
!
IF ( elph ) THEN
!
CALL dvanqq2()
! CALL dvanqq2()
!
CALL elphon_shuffle_wrap()
!
......
......@@ -121,7 +121,9 @@ MODULE input_parameters
INTEGER :: iprint = 10
! number of steps/scf iterations between successive writings
! of relevant physical quantities to standard output
INTEGER :: max_xml_steps = 0
! max number of steps between successive appending of an xml step
! in the xml data file, default 0 means all steps are printed.
INTEGER :: isave = 100
! number of steps between successive savings of
! information needed to restart the run (see "ndr", "ndw")
......
......@@ -1317,7 +1317,7 @@ CONTAINS
step_counter = step_counter+1
!
step_obj%tagname="step"
step_obj%n_step = step_counter
step_obj%n_step = i_step
!
CALL qes_init( scf_conv_obj,"scf_conv", scf_has_converged, n_scf_steps, scf_error )
!
......
......@@ -60,6 +60,7 @@ MODULE read_namelists_module
IMPLICIT NONE
!
CHARACTER(LEN=2) :: prog ! ... specify the calling program
CHARACTER(LEN=20) :: temp_string
!
!
IF ( prog == 'PW' ) THEN
......@@ -105,6 +106,10 @@ MODULE read_namelists_module
pseudo_dir = TRIM( pseudo_dir ) // '/espresso/pseudo/'
END IF
!
! ... max number of md steps added to the xml file. Needs to be limited for very long
! md simulations
CALL get_environment_variable('MAX_XML_STEPS', temp_string)
IF ( TRIM(temp_string) .NE. ' ') READ(temp_string, *) max_xml_steps
refg = 0.05_DP
max_seconds = 1.E+7_DP
ekin_conv_thr = 1.E-6_DP
......
No preview for this file type
......@@ -96,7 +96,7 @@ just typing \texttt{make neb}, from the main \qe\ directory.
the following codes in \texttt{NEB/src}:
\begin{itemize}
\item \nebx: calculates reaction barriers and pathways using NEB.
\item \texttt{path\_int.x}: generates a reaction path (a set of points
\item \texttt{path\_interpolation.x}: generates a reaction path (a set of points
in the configuration space of the atomic system, called ``images''), by
interpolating the supplied path. The new path can have a
different number of images than the old one and the initial and final
......@@ -163,7 +163,7 @@ architectures the precise numbers could be slightly different, in
particular if different FFT dimensions are automatically selected. For
this reason, a plain diff of your results against the reference data
doesn't work, or at least, it requires human inspection of the
results.
results.
\section{Parallelism}
\label{Sec:para}
......
......@@ -111,6 +111,7 @@ PROGRAM neb
!
CALL search_mep()
!
CALL unset_mpi_comm_4_solvers()
CALL stop_run_path( conv_path )
!
STOP
......
......@@ -41,7 +41,6 @@ SUBROUTINE stop_run_path( lflag )
CALL path_deallocation()
IF ( lfcpopt ) CALL fcp_opt_deallocation()
!
CALL unset_mpi_comm_4_solvers()
CALL mp_global_end()
!
IF ( .not. lflag ) THEN
......
......@@ -128,8 +128,8 @@ nq1, nq2, nq3 ! the mesh of q points
or
xq ! the coordinates of a q point
start_iq ! initial q to calculate
last_iq ! last q to calculate
start_q ! initial q to calculate
last_q ! last q to calculate
start_irr ! initial representation to calculate
last_irr ! last representation to calculate
\end{verbatim}
......@@ -211,11 +211,11 @@ the routines where these quantities are calculated are:
on output.
\item
4.4) The dielectric constant is a real \texttt{3x3} tensor:
4.5) The dielectric constant is a real \texttt{3x3} tensor:
\texttt{epsilon} (calculated in \texttt{dielec}).
\item
4.5) Zeu is a real array: \texttt{zstareu(3,3,nat)}. The first index is
4.6) Zeu is a real array: \texttt{zstareu(3,3,nat)}. The first index is
the electric field, while the other two indices give the atom that moves and the
direction.
......@@ -225,7 +225,7 @@ that is calculated by the routine \texttt{el\_opt}. It requires the response
to the electric field perturbation.
\item
The raman tensor is a real array \texttt{zstarue(3,3,3,nat)} that
The raman tensor is a real array \texttt{ramtns(3,3,3,nat)} that
gives the derivatives of the dielectric constant when the atom nat moves.
The third index give the direction of the displacement.
It requires the first and the second order response of the wavefunctions
......@@ -241,7 +241,7 @@ The US and PAW schemes have additional parts,
one of them calculated inside \texttt{dynmat0} with a call to
\texttt{addusdynmat}, and another part calculated in \texttt{drho}.
There is then a contribution that requires the response of the
wavefunctions calculated in \texttt{drhodv} and \texttt{drhodv\_loc}
wavefunctions calculated in \texttt{drhodv} and \texttt{drhodvloc}
which is common to the NC, US, and PAW schemes. The latter two schemes
have other contributions calculated in \texttt{drhodvus}. This
routine contains also the additional PAW term.
......@@ -293,21 +293,21 @@ done_start_zstar, if .TRUE. zstareu0 is known
done_zeu, if .TRUE. zeu is known
done_lraman, if .TRUE. the raman tensor is known
done_elop, if .TRUE. the electron-optical coefficient is known
done_trans, if .TRUE. the dynamical matrix is known
done_zue, if .TRUE. zue is known
done_elph if .TRUE. the electron-phonon coupling coefficient is known
\end{verbatim}
%done_trans, if .TRUE. the dynamical matrix is known
The variables that control the grid are:
\begin{verbatim}
comp_iq(nqs)=.TRUE. ! .FALSE. when this q is not computed in
! this run (controlled by start_iq, last_iq,
! this run (controlled by start_q, last_q,
! or by the image controller)
comp_irr_iq(0:3*nat,nqs)=.TRUE. ! .FALSE. for the representations that are
! not calculated in this run.
! (controlled by start_iq, last_iq,
! (controlled by start_q, last_q,
! start_irr, last_irr,
! or by the image controller)
......@@ -652,7 +652,9 @@ check_restart_recover.f90 Check if a restart or recover file is present
in the outdir directory
\end{verbatim}
Routines that select the small group of {\bf q} and other symmetry related
Note: in the following some of the listed routines are contained in folder
\texttt{LR\_Modules}).
Routines that select the small group of {\bf q} and other symmetry related
quantities used by the \phx\ code:
\begin{verbatim}
......@@ -664,13 +666,15 @@ set_small_group_of_q.f90 This is a driver that selects among the s matrices
mode_group.f90 Find the small group of q and of the mode (used with modenum)
smallgq.f90 (set_giq) Find the G vectors associated to each rotation: Sq=q+G.
sgam_ph.f90 Finds the rtau vectors. These are Bravais lattice vectors that
link an atom na to its rotated atom nb if these two atoms are
not in the same cell. These quantities are needed to rotate
the modes and to symmetrize the potentials.
\end{verbatim}
%.....sgam_ph is present in the old versions only....
%sgam_ph.f90 Finds the rtau vectors. These are Bravais lattice vectors that
% link an atom na to its rotated atom nb if these two atoms are
% not in the same cell. These quantities are needed to rotate
% the modes and to symmetrize the potentials.
%\end{verbatim}
Routines that manipulate or generate the irreducible representations,
the {\bf q}-point mesh and all the preparatory stuff that is needed by the
\phx\ code:
......
\documentclass[12pt,a4paper]{article}
\def\version{6.3}
\def\version{6.4}
\def\qe{{\sc Quantum ESPRESSO}}
\usepackage{html}
......
......@@ -39,7 +39,7 @@ SUBROUTINE check_initial_status(auxdyn)
! nsymq_iq : the order of the small group of q for each q
!
! The following variables are set by this routine on the basis of
! start_irr, last_irr, start_iq, last_iq, OR of modenum, OR of ifat and
! start_irr, last_irr, start_q, last_q, OR of modenum, OR of ifat and
! atomo:
!
! comp_iq : =.TRUE. if the q point is calculated in this run
......
......@@ -101,6 +101,7 @@ PROGRAM phonon
ENDIF
! YAMBO <
!
CALL unset_mpi_comm_4_solvers()
CALL stop_smoothly_ph( .TRUE. )
!
STOP
......
......@@ -31,7 +31,6 @@ SUBROUTINE stop_ph( flag )
!
CALL environment_end('PHONON')
!
CALL unset_mpi_comm_4_solvers()
CALL mp_global_end()
!
IF ( flag ) THEN
......
No preview for this file type
No preview for this file type
\documentclass[12pt,a4paper]{article}
\def\version{6.3}
\def\version{6.4}
\def\qe{{\sc Quantum ESPRESSO}}
\usepackage{html}
......
......@@ -1116,6 +1116,16 @@ input_description -distribution {Quantum Espresso} -package PWscf -program pw.x
}
}
var localization_thr -type REAL {
default {0.0 }
info {
Overlap threshold over which the exchange integral over a pair of localized orbitals
is included in the evaluation of EXX operator. Any value greater than 0.0 triggers
the SCDM localization and the evaluation on EXX using the localized orbitals.
Very small value of the threshold should yield the same result as the default EXX
evaluation }
}
var lda_plus_u -type LOGICAL {
default { .FALSE. }
status {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -165,7 +165,8 @@ NAMELIST: &CONTROL
The resulting format is portable to a different number
of processor, or different kind of parallelization
.FALSE. do not collect wavefunctions, leave them in temporary
.FALSE. OBSOLETE - NO LONGER IMPLEMENTED
do not collect wavefunctions, leave them in temporary
local files (one per processor). The resulting format
is readable only on the same number of processors and
with the same kind of parallelization used to write it.
......@@ -868,13 +869,16 @@ NAMELIST: &SYSTEM
Type: LOGICAL
Default: .FALSE.
Description: if (.TRUE.) do not discard symmetry operations with an
associated fractionary translation that does not send the
real-space FFT grid into itself. These operations are
incompatible with real-space symmetrization but not with the
new G-space symmetrization. BEWARE: do not use for phonons
and for hybrid functionals! Both still use symmetrization
in real space.
Description: if (.FALSE.) force real-space FFT grids to be commensurate with
fractionary translations of non-symmorphic symmetry operations,
if present (e.g.: if a fractional translation (0,0,c/4) exists,
the FFT dimension along the c axis must be multiple of 4).
if (.TRUE.) do not impose any constraints to FFT grids, even in
the presence of non-symmorphic symmetry operations.
BEWARE: use_all_frac=.TRUE. may lead to wrong results for
hybrid functionals and phonon calculations. Both cases use
symmetrization in real space that works for non-symmorphic
operations only if the real-space FFT grids are commensurate.
+--------------------------------------------------------------------
+--------------------------------------------------------------------
......@@ -1147,6 +1151,18 @@ NAMELIST: &SYSTEM
In QE =< 5.0.2 it defaulted to nqx1=nqx2=nqx3=1.
+--------------------------------------------------------------------
+--------------------------------------------------------------------
Variable: localization_thr
Type: REAL
Default: 0.0
Description: Overlap threshold over which the exchange integral over a pair of localized orbitals
is included in the evaluation of EXX operator. Any value greater than 0.0 triggers
the SCDM localization and the evaluation on EXX using the localized orbitals.
Very small value of the threshold should yield the same result as the default EXX
evaluation
+--------------------------------------------------------------------
+--------------------------------------------------------------------
Variable: lda_plus_u
......@@ -1710,9 +1726,13 @@ NAMELIST: &SYSTEM
Type: integer
Default: 3
Description: Version of Grimme implementation of Grimme-D3. Version=3 is Grimme-D3. Version=2
is the original Grimme-D2 parametrization. NOTE: not all functionals are
parametrized.
Description: Version of Grimme implementation of Grimme-D3:
Version=2 is the original Grimme-D2 parametrization
Version=3 is Grimme-D3 (zero damping)
Version=4 is Grimme-D3 (BJ damping)
Version=5 is Grimme-D3M (zero damping)
Version=6 is Grimme-D3M (BJ damping)
NOTE: not all functionals are parametrized.
+--------------------------------------------------------------------
+--------------------------------------------------------------------
......@@ -2652,6 +2672,9 @@ NAMELIST: &CELL
'all' :
all axis and angles are moved
'ibrav' :
all axis and angles are moved, but the lattice but be representable with the initial ibrav choice
'x' :
only the x component of axis 1 (v1_x) is moved
......@@ -3300,4 +3323,4 @@ CARD: ATOMIC_FORCES
===END OF CARD==========================================================
This file has been created by helpdoc utility on Tue Aug 21 17:08:53 CEST 2018
This file has been created by helpdoc utility on Wed Feb 27 11:34:54 CET 2019
No preview for this file type
......@@ -27,6 +27,7 @@ USE force_mod, ONLY: force, sigma
USE control_flags,ONLY: nstep, n_scf_steps, scf_error, conv_elec
USE fcp_variables,ONLY: fcp_mu, lfcpopt, lfcpdyn
USE extfield, ONLY: gate, etotgatefield, tefield, etotefield
USE input_parameters, ONLY: max_xml_steps
!-----------------------------------------------------------------------------
! END_GLOBAL_VARIABLES
!-----------------------------------------------------------------------------
......@@ -53,6 +54,17 @@ REAL(DP),TARGET :: potstat_contr_tgt, fcp_force_tgt, fcp_tot_charge_
REAL(DP),POINTER :: potstat_contr_ptr, fcp_force_ptr, fcp_tot_charge_ptr,&
demet_ptr, degauss_ptr, gatefield_en_ptr, efield_corr_ptr
!
INTEGER :: stride = 1, max_xml_steps_
IF ( max_xml_steps > 0 ) THEN
stride = nstep/max_xml_steps
max_xml_steps_ = max_xml_steps+2
ELSE
max_xml_steps_ = nstep
END IF
IF (.NOT. ( i_step == 1 .OR. MOD(i_step-1, stride) == 0 .OR. i_step == nstep)) RETURN
NULLIFY(potstat_contr_ptr, fcp_force_ptr, fcp_tot_charge_ptr, demet_ptr, degauss_ptr, &
gatefield_en_ptr, efield_corr_ptr)
!
......@@ -65,8 +77,8 @@ END IF
IF ( lfcpopt .OR. lfcpdyn ) THEN
potstat_contr_tgt = ef * tot_charge / e2
potstat_contr_ptr => potstat_contr_tgt
!FIXME ( again shouldn't we use Hartree units for this ? )
fcp_force_tgt = fcp_mu - ef
!
fcp_force_tgt = (fcp_mu - ef)/e2
fcp_force_ptr => fcp_force_tgt
!
fcp_tot_charge_tgt = tot_charge
......@@ -81,7 +93,7 @@ IF (tefield) THEN
efield_corr_tgt = etotefield/e2
efield_corr_ptr => efield_corr_tgt
END IF
CALL qexsd_step_addstep ( i_step, nstep, nsp, atm, ityp, nat, alat*tau, alat, alat*at(:,1), &
CALL qexsd_step_addstep ( i_step, max_xml_steps_, nsp, atm, ityp, nat, alat*tau, alat, alat*at(:,1), &
alat*at(:,2), alat*at(:,3), etot/e2, eband/e2, ehart/e2, vtxc/e2, etxc/e2, &
ewld/e2, degauss_ptr, demet_ptr, force/e2, sigma/e2, conv_elec, n_scf_steps, scf_error, &
FCP_FORCE = fcp_force_ptr , FCP_TOT_CHARGE = fcp_tot_charge_ptr,&
......
......@@ -60,7 +60,7 @@ SUBROUTINE electrons()
!
REAL(DP) :: &
charge, &! the total charge
ee, exxen ! used to compute exchange energy
exxen ! used to compute exchange energy
REAL(dp), EXTERNAL :: exxenergyace
INTEGER :: &
idum, &! dummy counter on iterations
......
......@@ -24,7 +24,7 @@ MODULE loc_scdm_k
IMPLICIT NONE
SAVE
REAL(DP), PARAMETER :: Zero=0.0d0, One=1.0d0, Two=2.0d0, Three=2.0d0
integer :: n_scdm
integer :: n_scdm = 1
CONTAINS
!
......
......@@ -40,17 +40,15 @@ SUBROUTINE external_wg_corr_force( rhor, force )
USE kinds, ONLY : DP
USE cell_base, ONLY : omega
USE ions_base, ONLY : nat, ntyp => nsp, ityp, tau, zv
use lsda_mod, only : nspin
USE gvect, ONLY : ngm, g
USE fft_base, ONLY : dfftp
USE fft_interfaces, ONLY : fwfft
!
USE martyna_tuckerman, ONLY : wg_corr_force
USE vlocal, ONLY : strf
!
IMPLICIT NONE
!
REAL( DP ), INTENT(IN) :: rhor ( dfftp%nnr, nspin )
REAL( DP ), INTENT(IN) :: rhor ( dfftp%nnr )
REAL( DP ), INTENT(OUT) :: force (3, nat)
!
! ... Local variables
......@@ -58,8 +56,7 @@ SUBROUTINE external_wg_corr_force( rhor, force )
COMPLEX (DP), ALLOCATABLE :: auxg( : ), auxr( : )
!
allocate(auxr(dfftp%nnr))
auxr = cmplx(rhor(:,1),0.0_dp)
if ( nspin .eq. 2 ) auxr = auxr + cmplx(rhor(:,2),0.0_dp)
auxr = cmplx(rhor,0.0_dp)
call fwfft ("Rho", auxr, dfftp)
!
allocate(auxg(ngm))
......@@ -87,20 +84,19 @@ SUBROUTINE external_force_lc( rhor, force )
USE ions_base, ONLY : nat, ityp, tau
USE fft_base, ONLY : dfftp
USE gvect, ONLY : ngm, gstart, ngl, igtongl, g
use lsda_mod, only : nspin
USE control_flags, ONLY : gamma_only
!
USE vlocal, ONLY : vloc
!
IMPLICIT NONE
!
REAL( DP ), INTENT(IN) :: rhor ( dfftp%nnr, nspin )
REAL( DP ), INTENT(IN) :: rhor ( dfftp%nnr )
REAL( DP ), INTENT(OUT) :: force ( 3, nat )
!
! ... Local variables
!
CALL force_lc( nat, tau, ityp, alat, omega, ngm, ngl, igtongl, &
g, rhor(:,1), dfftp%nl, gstart, gamma_only, vloc, force )
g, rhor, dfftp%nl, gstart, gamma_only, vloc, force )
!
RETURN
!
......
......@@ -246,7 +246,7 @@ MODULE pw_restart_new
n_opt_steps = istep
END IF
scf_has_converged = conv_elec
n_scf_steps = n_scf_steps
n_scf_steps_ = n_scf_steps
CASE ("nscf", "bands" )
n_opt_steps = 0
scf_has_converged = .FALSE.
......
......@@ -107,6 +107,7 @@ PROGRAM pwscf
!
END IF
!
CALL unset_mpi_comm_4_solvers()
CALL stop_run( exit_status )
CALL do_stop( exit_status )
!
......
......@@ -50,7 +50,6 @@ SUBROUTINE stop_run( exit_status )
!
CALL environment_end( 'PWSCF' )
!
CALL unset_mpi_comm_4_solvers()
CALL mp_global_end ()
!
END SUBROUTINE stop_run
......
......@@ -1043,56 +1043,39 @@ END SUBROUTINE v_hubbard_nc
SUBROUTINE v_h_of_rho_r( rhor, ehart, charge, v )
!----------------------------------------------------------------------------
!
! ... Hartree potential VH(r) from a density in R space n(r)
! ... Hartree potential VH(r) from a density in R space n(r)
!
USE kinds, ONLY : DP
USE fft_base, ONLY : dfftp
USE fft_interfaces, ONLY : fwfft
USE lsda_mod, ONLY : nspin
!
IMPLICIT NONE
!
! ... Declares variables