Commit Graph

49 Commits

Author SHA1 Message Date
sbraccia 832f8f0fb4 oops ...
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1015 c92efa57-630b-4861-b058-cf58834340f0
2004-06-26 17:00:02 +00:00
sbraccia f9ac58b70f diis_module.f90 recoded.
The following variant of the DIIS Residual Minimization Method, based
on three steps, has been implemented :
1) At the first "scf" step of the first "ionic" step, the diagonalization
   starts with an initialization procedure. Two (or more) sweeps on all
   the bands are performed. A sweep consists in two (or more if required)
   unconstrained trial steps (steepest descent steps) followed by a
   subspace rotation. If convergence is not achieved in this phase a
   final trial step is done.
   In all the other cases the initialization procedure consists in a
   subspace rotation followed by a trial step.
2) Diagonalization based on the DIIS algorithm is performed on the lowest
   ( nbnd - 2 ) bands. Orthogonalization of the eigenvectors is done at
   each step. The possibility of orthogonalizing a given band only to
   those inside an energy window is also implemented.
3) The topmost two bands are converged using a standard
   conjugate-gradient procedure. This ensures that eventual holes
   left by the DIIS algorithm can be identified and filled.
   If two holes have been found this procedure is repeated on the
   topmost two bands (previously optimized with the DIIS algorithm).
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1014 c92efa57-630b-4861-b058-cf58834340f0
2004-06-26 16:48:36 +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
sbraccia e2f9ed9dc0 NEB: stdout (which is redirected on file) is always flushed.
The flush() is preprocessed (on AIX it is called flush_).
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@998 c92efa57-630b-4861-b058-cf58834340f0
2004-06-25 12:06:53 +00:00
ballabio b81c8db26a cleanup [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@993 c92efa57-630b-4861-b058-cf58834340f0
2004-06-24 09:53:32 +00:00
ballabio 93a1f09187 small changes in output format, to make it easier for check_example
[Gerardo]


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@986 c92efa57-630b-4861-b058-cf58834340f0
2004-06-21 15:39:23 +00:00
sbraccia d1579c66ec Removed references (not yet everywhere) to module basis for those variables already in module ions_base.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@953 c92efa57-630b-4861-b058-cf58834340f0
2004-06-12 13:44:18 +00:00
degironc 2cc18d09d3 24 May 2004 density/potential mixing procedure in presence of an electric
field has been changed.
              - Density mixing is now available.
              - Explicit mixing of the dipole moment in potential mixing has
                been removed (in my opinion it was spurious).
              If anybody experiences bad convergence with the present scheme
              please let me know. (SdG)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@908 c92efa57-630b-4861-b058-cf58834340f0
2004-05-24 16:00:40 +00:00
sbraccia 12079048da A new check has been added in move_ions in the case of BFGS+LSDA: if when the convergence is achieved the absolute magnetization (computed in electrons and now saved in the module lsda_mod) is less than 1.D-8 a new scf cycle is performed starting from atomic potential and wcfs and the BFGS convergence is checked again. To be tested.
Removed some unused variables from pwscf.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@905 c92efa57-630b-4861-b058-cf58834340f0
2004-05-21 11:15:39 +00:00
sbraccia 1ab31b8fdc Yet another version of the DIIS algorithm (it substitutes the previous one). This version is slower (but not dramatically) than davidson for small systems, faster for large systems (the cross-over is around 300 bands), but there is space for further improvements. A gamma-point version is also implemented (previously missing). An "holes-sniffer" is implemented to prevent holes in the eigenvalues spectrum.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@876 c92efa57-630b-4861-b058-cf58834340f0
2004-05-11 08:11:52 +00:00
giannozz 18658b544f Cleanup: zv moved to module "basis"
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@809 c92efa57-630b-4861-b058-cf58834340f0
2004-04-21 17:14:38 +00:00
sbraccia 8d870d4cea The exit_file is no longer a parameter (set in io_files.f90 to "EXIT"), but an internal variable
set in input.f90 to "prefix.EXIT".
This is necessary to allow the user to stop the "correct" job when several jobs are
running on the same working directory.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@798 c92efa57-630b-4861-b058-cf58834340f0
2004-04-14 13:48:54 +00:00
sbraccia 5f4676dda1 Cleanup: all references to varie replaced by references to control_flags
(also when varie is indirectly called by pwcom).
Fake module varie has been removed from pwcom.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@761 c92efa57-630b-4861-b058-cf58834340f0
2004-04-02 13:01:15 +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
sbraccia df371533ce Tests on cpu time and soft exit adaptet to "parallel" NEB.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@746 c92efa57-630b-4861-b058-cf58834340f0
2004-03-25 12:09:40 +00:00
sbraccia 2a99b6fdac 1) An experimental parallelization of NEB images has been implemented.
This required a deep modification of the parallelism in PWscf:
there are two new communicators (intra_image_comm and inter_image_comm) and the
existing "pool" communicators (intra_pool_comm and inter_pool_comm) are now vectors
of length given by the number of parallel images. #ifdef __PARA is no longer
needed because all "parallel" variables are always initialized for a serial run
and all parallel routines are, in the case of a serial run, dummy routines.
The wrappers to MPI routines used only by PWscf are in the PW/para.f90 file.
The others (mp_***) are in the Modules/mp.f90. All explicit referencies to mpif.h
should be replaced by an "USE parallel_include" (in a serial run parallel_include
is simply a dummy module).

2) The extrapolation of both potential and wavefunctions has been rewritten in
order to be smarter than before: on the basis of the required extrapolation
order, on the basis of the history and on the basis of which files are really
present on the disk, the algorithm chooses the extrapolation order.
All the algorithms in which ions are moved can use the extrapolation.

These are both unstable features: I need the help of everybody to test them.

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@742 c92efa57-630b-4861-b058-cf58834340f0
2004-03-24 09:36:50 +00:00
cavazzon c880a0a848 - Almost all neb routines moved to Modules
- New module check_stop used by all codes
  to check for exit conditions ( maximum time
  or EXIT file )


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@718 c92efa57-630b-4861-b058-cf58834340f0
2004-03-15 00:08:26 +00:00
degironc ce9d9804c9 14 feb 2004 LDA+U: variable starting_ns_eigenvalue has been added in
order to allow to specify how to fill starting ns occupation
             matrices. Useful when the default choice take the wrong
             (or not desired) path.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@598 c92efa57-630b-4861-b058-cf58834340f0
2004-02-14 08:39:34 +00:00
sbraccia 83abad3ff7 Call to the flush subroutine back to its place: too many "nonlocal effects" in using cpflush().
Modification postponed.
Note that the actual version is not compiled on sp4 when the -DFLUSH precompiler flag is used.
stdout is flushed instead of unit 6.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@534 c92efa57-630b-4861-b058-cf58834340f0
2004-01-27 17:08:51 +00:00
sbraccia ea34246f80 The flush subroutine (Vax Lib) gives problems on sp4. Substituted with our cpflush().
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@531 c92efa57-630b-4861-b058-cf58834340f0
2004-01-27 15:33:36 +00:00
giannozz 5afc497863 Rather serious bug in PW/dynamics.f90 (subroutine thermalize) fixed
Misc. cleanup (PG)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@529 c92efa57-630b-4861-b058-cf58834340f0
2004-01-27 14:41: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
ballabio 8eac8ef670 typo fixed [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@508 c92efa57-630b-4861-b058-cf58834340f0
2004-01-22 16:48:22 +00:00
sbraccia fc230d7a2a I apologize for the orrible mistake in the previous commit
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@499 c92efa57-630b-4861-b058-cf58834340f0
2004-01-21 15:13:56 +00:00
sbraccia 47ddca9eaf Fixed some problems with ethr. Comments have been added here and there.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@498 c92efa57-630b-4861-b058-cf58834340f0
2004-01-21 14:41:25 +00:00
sbraccia 2efd90d37f General cleanup. The threshold for diagonalization (ethr) is now fixed to 1.D-5 at the first scf iteration (iter=1). A check is then performed to verify that the resulting density is adeguate (dr2/nelec > ethr). If it is not the diagonalization goes on with a smaller ethr. For iter > 1 ethr is updated with the old recipe. Also added a warning in update_pot that indicates "problems" in the wfc extrapolation. This problem has not yet been fixed.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@495 c92efa57-630b-4861-b058-cf58834340f0
2004-01-20 12:26:22 +00:00
giannozz 3eae140f76 More uninitialized variables have been initialized
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@467 c92efa57-630b-4861-b058-cf58834340f0
2004-01-06 16:53:55 +00:00
sbraccia 2f4d7baded PW, Gamma and NEB are now unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@449 c92efa57-630b-4861-b058-cf58834340f0
2003-12-10 14:57:07 +00:00
giannozz 9c97c84c9c Compilation problems (residual "units" modules) fixed
Documentation and ChangeLog updated


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@384 c92efa57-630b-4861-b058-cf58834340f0
2003-11-10 08:30:54 +00:00
cavazzon 9ce7263953 - bug (alpha compiler) reported by Sergey has been fixed
- module filnam in pwcom moved to io_files module
- module units in pwcom moved to io_file

From now on, all file names and their unit and attributes (i.e. reclen)
should be defined in Modules/io_files.f90


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@382 c92efa57-630b-4861-b058-cf58834340f0
2003-11-09 18:30:08 +00:00
cavazzon c5d8ff2f66 - unit 6 replaced by stdout in CPV
- ^M removed from pseudo files
- wavefunctions arrais moved to module
  wavefunctions_module, common to all codes
  this is required to reduce duplicated subroutine
- new lapack subroutine, called from PWCOND,
  added to lib/lapack.f lib/lapack_ibm.f


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@381 c92efa57-630b-4861-b058-cf58834340f0
2003-11-09 10:42:50 +00:00
sbraccia 24ce939aeb Unit stdout (set in Modules/io_global.f90) is used to write on standard output
instead of 6 or *.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@365 c92efa57-630b-4861-b058-cf58834340f0
2003-11-04 10:53:05 +00:00
sbraccia 70b8aba121 A bug that I introduced in electrons.f90 (line 145 "==" instead of ">=" ) has been fixed.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@339 c92efa57-630b-4861-b058-cf58834340f0
2003-10-22 08:24:00 +00:00
giannozz ecc6fd0eda sp4 compilation glitches
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@335 c92efa57-630b-4861-b058-cf58834340f0
2003-10-16 17:41:11 +00:00
giannozz bba38fd761 bfgs modified to work with arbitrary components of the atomic positions
kept fixed (Carlo Sbraccia)
"Total force" now prints a more sensible quantity:
\sqrt(\sum_{i,n} f_i(n)^2) instead of \sum_{i,n} |f_i(n)|
Cleanup in several routines and in modules.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@334 c92efa57-630b-4861-b058-cf58834340f0
2003-10-16 16:30:12 +00:00
cavazzon 1d34b5c0a8 non collinear spin version of PW,
contributed by Adriano Mosca Conte,
added to the repository.
The non collinear code has required
a new module "wavefunctions" containing
"psic" and "evc", that no longer belong
to pwcom.

use: cvs update -d

there's a new example (example13), that is not
yet complete, I'm waiting for the appropriate
pseudopotential from Adriano


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@322 c92efa57-630b-4861-b058-cf58834340f0
2003-10-03 14:01:11 +00:00
cavazzon cbff0f48de different modules containing filenames and directories
substituted by common module:
Modules/io_files.f90


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@317 c92efa57-630b-4861-b058-cf58834340f0
2003-09-23 14:45:12 +00:00
degironc 0deeeaba5b 30 Jul 2003 indexing of the occupation matrices (ns,nsnew, etc) used in
LDA+U has been redefined in a more natural order:
             ns(na,is,ldim,ldim) -> ns(ldim,ldim,is,na)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@281 c92efa57-630b-4861-b058-cf58834340f0
2003-07-31 12:54:09 +00:00
dalcorso 9de24e53b5 Energy and forces with a finite electric field.
Added the possibility to subtract the dipole field
for slab or molecule calculation.
(See  PRB 59, 12 301 (1999) and PRB 63, 205426 (2001).)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@252 c92efa57-630b-4861-b058-cf58834340f0
2003-06-30 14:09:05 +00:00
dieguez d6193c5491 *** empty log message ***
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@226 c92efa57-630b-4861-b058-cf58834340f0
2003-06-11 20:07:53 +00:00
giannozz c511ef1c70 CP: some cleanup for occupancy and empty state calculation
PW:  some cleanup in c_bands, timing, documentation
     removed obsolete "scf in/out correction"


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@214 c92efa57-630b-4861-b058-cf58834340f0
2003-05-19 17:46:44 +00:00
giannozz 2970fd4810 Makefiles updated, Gamma updated, misc
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@198 c92efa57-630b-4861-b058-cf58834340f0
2003-05-02 13:23:14 +00:00
degironc c830a68c37 22 apr 2003 All setv statements in PW repalaced by f90 constructs.
Minor changes in PW & PH (code readability).


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@178 c92efa57-630b-4861-b058-cf58834340f0
2003-04-22 16:03:45 +00:00
degironc 63c59eb8b1 08 apr 2003 g_psi, g_psi_mod: new preconditioning (better behaved when
hdiag-e*sdiag is close to zero) used in cegterg. This
             removes most of the warning messages when using Davidson
             diagonalization. Although the overall performance (number of
             h_psi performed) does not seem to change very much in small
             tests, except pathological cases like ni.band.in in example1,
             it should be wise to have a more stable preconditioning.
             cegterg: use always GEMM instead of GEMV in the update.
             electrons: in a relaxation run perform accurately the first
             iteration after ionic move but reset the diagonalization
             threshold according to the actual self-consistence for the
             following ones.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@147 c92efa57-630b-4861-b058-cf58834340f0
2003-04-08 06:44:33 +00:00
giannozz ab5b6af5e5 D3/Makefile : missing add_efield added
cegterg, regterg: use GEMM instead of GEMV, do not require
any longer evc, et to be dimensioned nbndx (et is now
dimensioned (nbnd,nkstot)) - misc. cleanup

Il calcolo di (H-eS)*psi ('update') nella diagonalizzazione iterativa
prendeva un tempo esagerato. L'ho modificata in modo da usare prodotti
matrice-matrice su tutti gli psi invece che matrice-vettore su ogni
psi, se piu' di 1/4 dei vettori non e' a convergenza. La cosa e' fatta
a naso e richiede ulteriori di prove, ma mi sembra che apporti dei
miglioramenti.

In TODO ho messo una lista di cose da fare.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@145 c92efa57-630b-4861-b058-cf58834340f0
2003-04-07 12:55:29 +00:00
giannozz 9e3a2de758 Support for lahey compiler added: "error" renamed to "errore", "rnd" to "rndx"
bug in io_base fixed
PARA => __PARA
cinterpolate moved into interpolate


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@86 c92efa57-630b-4861-b058-cf58834340f0
2003-02-21 14:57:00 +00:00
degironc 5cfeb5079b 10 feb 2003 lda+u stuff modified in order to work also for non-d
localized orbitals. Hubbard_l=0,1,2,3 are now possible.
             It has been tested that calculations done for Hubbard_l=2
             are reproduced. More testing on non-d material needed.
             SdG + Gabriele Balducci


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@57 c92efa57-630b-4861-b058-cf58834340f0
2003-02-10 08:58:33 +00:00
giannozz d852392cab module allocate, calls to mallocate, mfree removed
pointers replaced by allocatable whenever possible


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@56 c92efa57-630b-4861-b058-cf58834340f0
2003-02-07 16:04:36 +00:00
giannozz ac9f2144c0 O-sesame
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2 c92efa57-630b-4861-b058-cf58834340f0
2003-01-19 21:58:50 +00:00