Commit Graph

62 Commits

Author SHA1 Message Date
dalcorso fb6d1f0d62 Other routines with unused variables, and removed old unused routines.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5448 c92efa57-630b-4861-b058-cf58834340f0
2009-02-25 16:51:30 +00:00
degironc 83f2bfae65 new files and modifications needed to extract a TB hamiltonian in order to
perform a DFT+DMFT calculation.
contributed by Dmtry Korotin, V.I. Anisimov, N. Binggeli et al.
The DMFT part will be loaded separately into QE-forge.

SdG


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5397 c92efa57-630b-4861-b058-cf58834340f0
2009-02-12 08:07:11 +00:00
giannozz 6f52984cd2 Only one random number generator is used everywhere ("randy", which
seems to be the most uniform). Beware all kinds of unexpected side
effects.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5272 c92efa57-630b-4861-b058-cf58834340f0
2008-11-05 20:25:20 +00:00
giannozz c1bd349664 name redirection in moduli should be avoided unless strictly necessary
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5179 c92efa57-630b-4861-b058-cf58834340f0
2008-09-05 17:11:25 +00:00
giannozz faf814c72b Wavefunction extrapolation should work for all cases (not sure about PAW).
Some cleanup in the allocation of bec(i,j) = <beta_i|psi_j> .


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4488 c92efa57-630b-4861-b058-cf58834340f0
2007-12-03 13:31:04 +00:00
giannozz 885410ba15 Some cleanup in the various diagonalization routines, h_psi and s_psi.
Note that both the electric enthalpy term and the noncollinear routines
are called by h_psi and s_psi. Changes should be harmless.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4470 c92efa57-630b-4861-b058-cf58834340f0
2007-11-22 21:28:22 +00:00
giannozz bdae2b6cb1 Cleanup of wavefunction initialization. Since I wasted two hours hunting
for a bug, before I realized that there were two copies of "gamma_only",
I wasted two more hours to iuse a single value of "gamma_only" (the one
oin control_flags).


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4468 c92efa57-630b-4861-b058-cf58834340f0
2007-11-22 14:23:04 +00:00
giannozz be4afd197a startingwfc='atomic-safe' was ignored (the variable was 6 characters!)
Now it works (i.e. it does something, as opposed to doing nothing)
with a more descriptive and less promising name: startingwfc='atomic+random'
Some cleanup of Berry phase and electric fields stuff - shouldn't change
anything. More descriptive message about surviving static dimensions.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4439 c92efa57-630b-4861-b058-cf58834340f0
2007-11-16 17:35:48 +00:00
giannozz 6992817ba4 Added 'atomic-safe' starting wavefunction. Not sure it works, though.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4404 c92efa57-630b-4861-b058-cf58834340f0
2007-11-06 15:26:13 +00:00
giannozz c5f14b460d Calculation of atomic wavefunctions merged into a single routine
Preliminary operations aimed at introducing yet another choice of
initial wavefunctions


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4392 c92efa57-630b-4861-b058-cf58834340f0
2007-11-05 13:39:28 +00:00
giannozz 369da2a000 Some minor changes in the output:
- obscure printout of misc variables removed from allocate_wfc,
  moved to less random places with hopefully less obscure meaning
- added printout of memory usage of main arrays


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4013 c92efa57-630b-4861-b058-cf58834340f0
2007-07-10 11:15:31 +00:00
giannozz 6f8c1fbe53 reduce_io (logical) replaced by io_level (integer)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3810 c92efa57-630b-4861-b058-cf58834340f0
2007-02-22 11:22:57 +00:00
giannozz 0a862b7402 Added possibility (not yet activated) of keeping wavefunctions in memory.
File buffers.f90 contains replacements - with different names and syntax -
for diropn (open_buffer) and davcio (get_buffer, save_buffer). If you have
better names, please go ahead. Works for a single buffer right now.

Pitfalls: nwordwfc is now defined as the number of complex words, no longer
of real words, but only in PW/, so mixing routines from PW with routines from
other codes may run into trouble (although I didn't see any side effect).
Restart may no longer work in some specific cases.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3800 c92efa57-630b-4861-b058-cf58834340f0
2007-02-21 13:01:31 +00:00
giannozz f4b24be5e8 I/O reduction for non-scf and electric-field calculations.
I am not especially happy with the way it is achieved but
couldn't find anything better.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3764 c92efa57-630b-4861-b058-cf58834340f0
2007-02-08 11:59:13 +00:00
sbraccia 625f93ebea Clock was not properly stopped. C.S.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3735 c92efa57-630b-4861-b058-cf58834340f0
2007-02-01 16:46:48 +00:00
giannozz 45c4046097 calculation of kinetic energy extracted and done in a separate routine;
some restructuring here and there; uninitialized variable (PGI only) fixed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3728 c92efa57-630b-4861-b058-cf58834340f0
2007-01-31 15:51:32 +00:00
cavazzon 0b465b777f - erf was not defined (PGI complains about that)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3725 c92efa57-630b-4861-b058-cf58834340f0
2007-01-30 16:59:58 +00:00
giannozz 6428be9581 There is no reason to write to file the number of planewaves per k-point:
it is stored in memory anyway


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3705 c92efa57-630b-4861-b058-cf58834340f0
2007-01-22 16:38:47 +00:00
giannozz fcaa7e6c59 c_bands simplified (sort of). A routine that diagonalizes wavefunctions
for a single k-point without reading or writing anything is now available.
The functionality of c_bands should remain the same (please check).
Obsolete non-collinear DIIS diagonalization routines removed.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3683 c92efa57-630b-4861-b058-cf58834340f0
2007-01-17 15:32:57 +00:00
giannozz 133eaabb18 Initialization of wave functions simplified. A routine that produces
the starting wavefunctions from the atomic ones for a single k-point
without reading or writing anything is now available.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3652 c92efa57-630b-4861-b058-cf58834340f0
2007-01-13 17:37:47 +00:00
umari 546d765916 Changement to the treatment of the Berry's phase electric
field. Now the projectors for the hermitean el. field operator
which depend on the wavefunctions,
are calculated just once and store on disk for every diagonalization

It permits much faster execution in particular for cg minimization.

P.U.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3607 c92efa57-630b-4861-b058-cf58834340f0
2006-12-15 23:18:19 +00:00
giannozz 1e235af88b More patches by Axel: all occurrences of "index" replaced by "idx".
"index" is an instrinsic and shouldn't be used as a variable.
control-M characters removed from qexml.f90


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3585 c92efa57-630b-4861-b058-cf58834340f0
2006-12-01 14:41:55 +00:00
giannozz ffb671c18b wfcatom and swfcatom have two indices also in the noncollinear case,
in analogy to evc.

Apparently swfcatom_nc was used but not allocated in noncollinear
calculations with LDA+U (not sure it was implemented, though)

There is still something I don't understand in wfcinit: the starting
wavefunctions needs to be set to 0 for n>npw at the end of the routine,
while it should be sufficient to clean them at the beginning. This might
be a sign that we are overwriting a zone that should not be overwritten.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3582 c92efa57-630b-4861-b058-cf58834340f0
2006-11-28 17:25:00 +00:00
giannozz 914e901c3d Wavefunctions in pwscf are stored also for the noncollinear case
as the usual two-index array evc(2*npwx,nbnd), no longer as a
different three-index array evc_nc(npwx,2,nbnd).

I am not really sure that this way is better than the previous
one: sometimes it is more convenient, sometimes it is less, but
I think that having the same array makes easier the transition
to a code that keeps everything in memory. Apologies to anybody
preferring three indices: anyway the physical memory layout
hasn't changed, so the transition from three-index to two-index
arrays shouldn't be a major problem


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3572 c92efa57-630b-4861-b058-cf58834340f0
2006-11-27 12:47:25 +00:00
degironc 282f153388 unit name change: iunat => iunsat (it contains S * atomic wfc)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3511 c92efa57-630b-4861-b058-cf58834340f0
2006-11-05 02:47:07 +00:00
giannozz 6c40185885 - outdir is set by default to the value of the $ESPRESSO_TMPDIR
environment variable, or to './' (as before) if this is not set
- pseudo_dir is set by default to the value of $ESPRESSO_PSEDIR,
  to $HOME/espresso/pseudo/ otherwise
- documentation updated to reflect the new defaults
Note that the 'capture' of $HOME/pw/pseudo using a call to 'getenv'
was already present in pwscf but it was not working (pseudo_dir was
overwritten) so nothing susceptible to create new problems was added.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3309 c92efa57-630b-4861-b058-cf58834340f0
2006-08-08 18:05:16 +00:00
sbraccia 86e4f72b8c Fixed a bug related to the opening and closing of the wavefunctions unit
(iunwfc). Added additional tests on the IO units.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2911 c92efa57-630b-4861-b058-cf58834340f0
2006-03-13 17:21:46 +00:00
sbraccia a5eeeee8c5 All functions used to generate random number collected in a single module. Added two routines
random numbers from a normal distribution.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2725 c92efa57-630b-4861-b058-cf58834340f0
2006-01-25 04:24:49 +00:00
giannozz 305e02a222 The current index of k-point, used in exact-exchange and electric-field
calculations, is saved in variable current_k


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2310 c92efa57-630b-4861-b058-cf58834340f0
2005-10-20 07:34:39 +00:00
giannozz f533b052d5 dbl => DP (defined as previously dbl was)
syntax for declarations: real(DP), without "kind="


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2135 c92efa57-630b-4861-b058-cf58834340f0
2005-08-28 14:09:42 +00:00
giannozz bf4bfe222f General cleanup of intrinsic functions:
conversion to real    => DBLE
(including real part of a complex number)
conversion to complex => CMPLX
complex conjugate     => CONJG
imaginary part        => AIMAG

All functions are uppercase.
CMPLX is preprocessed by f_defs.h and performs an explicit cast:
#define CMPLX(a,b)  cmplx(a,b,kind=DP)
This implies that 1) f_defs.h must be included whenever a CMPLX is present,
2) CMPLX should stay in a single line, 3) DP must be defined.

All occurrences of real, float, dreal, dfloat, dconjg, dimag, dcmplx
removed - please do not reintroduce any of them.
Tested only with ifc7 and g95 - beware unintended side effects

Maybe not the best solution (explicit casts everywhere would be better)
but it can be easily changed with a script if the need arises.
The following code might be used to test for possible trouble:

program test_intrinsic

  implicit none
  integer, parameter :: dp = selected_real_kind(14,200)
  real (kind=dp) :: a = 0.123456789012345_dp
  real (kind=dp) :: b = 0.987654321098765_dp
  complex (kind=dp) :: c = ( 0.123456789012345_dp, 0.987654321098765_dp)

  print *, '      A = ', a
  print *, ' DBLE(A)= ', DBLE(a)
  print *, '      C = ', c
  print *, 'CONJG(C)= ', CONJG(c)
  print *, 'DBLE(c),AIMAG(C)  = ', DBLE(c), AIMAG(c)
  print *, 'CMPLX(A,B,kind=dp)= ', CMPLX( a, b, kind=dp)

end program test_intrinsic

Note that CMPLX and REAL without a cast yield single precision numbers on
ifc7 and g95 !!!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2133 c92efa57-630b-4861-b058-cf58834340f0
2005-08-26 17:44:42 +00:00
degironc 4e415a05d4 Bug Fix in LDA+U:
orthoatmwfc (the routine that set LDA+U projectors)
        should always be called in wfcinit even if startingwfc=='file'
sdg


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2106 c92efa57-630b-4861-b058-cf58834340f0
2005-08-17 13:59:17 +00:00
sbraccia 71ff0f5039 cinitcgg_nc removed. Fixed a couple of bugs in the cg diagonalisation.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1808 c92efa57-630b-4861-b058-cf58834340f0
2005-04-15 16:17:35 +00:00
sbraccia ddb2067a1e Conjugate-gradient: added a routine for gamma-only calculations. collinear and noncollinear routines unified.
Davidson: minor improvements of the davidson algorithm. collinear and noncollinear routines unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1769 c92efa57-630b-4861-b058-cf58834340f0
2005-03-30 14:37:55 +00:00
giannozz 0bf090e4bc variable "okvan" moved to module "uspp" + minor cleanup
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1765 c92efa57-630b-4861-b058-cf58834340f0
2005-03-28 13:55:19 +00:00
giannozz 50decb486f Added copyright notice where missing (please check)
Modified copyright notice to make it compatible with script
"check_license"


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1730 c92efa57-630b-4861-b058-cf58834340f0
2005-03-21 14:01:19 +00:00
sbraccia 1036c6db69 k-points parallelisation was not working in the case of occupations from input
(gamma+LSDA). Fixed. C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1618 c92efa57-630b-4861-b058-cf58834340f0
2005-02-07 06:54:38 +00:00
dalcorso 6686c357dc Merging of PWNC and PW. Step II. These routines have been merged.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1540 c92efa57-630b-4861-b058-cf58834340f0
2005-01-05 16:43:26 +00:00
sbraccia d584658e8e At the first scf iteration band occupations are no longer set in wfcinit and ethr does not
depend any longer on the band occupation.
Fixed a bug occurring in the potential mixing (parallel case only).
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1508 c92efa57-630b-4861-b058-cf58834340f0
2004-12-14 08:43:07 +00:00
sbraccia ad29eabc42 Allocation of evc when starting from atomic wavefunctions modified so that evc contain only the real
number bands and not all the atomic wfcs (they can be much more than the number of bands).
setup.f90 for collinear and noncollinear case unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1282 c92efa57-630b-4861-b058-cf58834340f0
2004-09-14 15:25:27 +00:00
sbraccia baf961746b Fixed a bug (spotted by Guido) in the diagonalization with occupation-dependent thresholds:
now occupations are also computed at the end of the the wfcs initialization so that wg is always initialized.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1079 c92efa57-630b-4861-b058-cf58834340f0
2004-07-16 13:25:11 +00:00
sbraccia 0caeadbd7b Machine-dependent definitions are now contained in two different files (both in /include):
1) f_defs.h  for definitions to be included in FORTRAN files ONLY
   2) c_defs.h  for definitions to be included in C       files ONLY

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1012 c92efa57-630b-4861-b058-cf58834340f0
2004-06-25 17:25:37 +00:00
giannozz ffcadc34c1 Modules becmod, rbecmod (one variable each) merged into a single module
(with two variables...) - More USPP merge


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@954 c92efa57-630b-4861-b058-cf58834340f0
2004-06-12 20:37:01 +00:00
giannozz 47c5de62f8 More USPP_related variables moved to Modules/uspp.f90
Note that lqx => lmaxq for consistency with other names
(those ending in x are static dimensioning)
Beware unexpected side effects (PG)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@933 c92efa57-630b-4861-b058-cf58834340f0
2004-05-31 17:55:33 +00:00
giannozz 2da5c01765 becp = <beta|psi> allocated only when needed (except in phonon where it is
still allocated at the beginning) - misc cleanup


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@878 c92efa57-630b-4861-b058-cf58834340f0
2004-05-11 21:08:21 +00:00
sbraccia 764ce7f663 References to brilz replaced everywhere by cell_base.
There are still references to pwcom: please do not use pwcom in new code !!!
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@760 c92efa57-630b-4861-b058-cf58834340f0
2004-04-02 10:30:15 +00:00
fabris 73d33ae8ad Implementation of LDA+U gamma_only calculations.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@588 c92efa57-630b-4861-b058-cf58834340f0
2004-02-12 12:32:06 +00:00
giannozz 0b1a5c9fd8 Extensive module cleanup: DP moved from wrong place (parameters) to the
correct place (kinds); module "varie" replaced by "control_flags" (not
yet in pwcom, though) - many many files changed.
64-bit cpus (Opteron, maybe Itanium) should now work if __LINUX64 is defined


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@513 c92efa57-630b-4861-b058-cf58834340f0
2004-01-23 15:08:03 +00:00
sbraccia 0b32850e1f General Cleanup. Some problems related to the use of local pseudopotentials have been fixed.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@502 c92efa57-630b-4861-b058-cf58834340f0
2004-01-22 12:01:13 +00:00
giannozz 5a8c4a05dc Tabs removed (again)
NEB/ removed from makedeps.sh
plotrho: added possibility to have contour lines of various type
A few undefined variables defined (again)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@465 c92efa57-630b-4861-b058-cf58834340f0
2004-01-05 18:11:01 +00:00