Commit Graph

79 Commits

Author SHA1 Message Date
ccavazzoni 91f8899bc4 - bug fix, OpenMP parallelization: missing !$omp barrier
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5615 c92efa57-630b-4861-b058-cf58834340f0
2009-06-17 15:17:22 +00:00
ccavazzoni 4a565880a2 - bug fix in OpenMP parallelization
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5613 c92efa57-630b-4861-b058-cf58834340f0
2009-06-16 12:10:32 +00:00
ccavazzoni f1c391fa58 - OpenMP parallelization
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5567 c92efa57-630b-4861-b058-cf58834340f0
2009-05-24 17:33:58 +00:00
obm d5d9929aa8 This is the first iteration in trying to implement a real space treatment of
projectors in USPPs. Hopefully this will allow one to study larger systems.
The modifications are done primarily keeping TDDFPT code in mind
(a branch of QE, you may see detailed explanation in qe-forge which I am trying
to keep tightly integrated). Please do not modify/beautify/make more elegant
 the corresponding subroutines without prior notice, due to their dependencies.
I have tested that the current modifications do not alter the behaviour of pw.x
other than designed with a number of small tests in HG1.
Some Pointers:
-All the new subroutines reside in PW/realus.f90
-A new flag real_space in &electrons control the implementation
-tqr flag is treated seperately.
-The implementation works only for (serial) gamma point single point calculations.
ToDo:
-I have written K point and task groups implementations of most of the corresponding routines, but did not have time to implement.
-Parallelism issues are still to be checked.
-The discrepancy in total energy is <0.002 eV for cutoff of 55Ry/550Ry however,
there are some strange force components. I do not know how this will effect
a possible optimization scheme.

Other:
Trying the compile CVS version in HG1 of sissa, using the "default" compiler
sets, I encountered a very strange compiler bug. Please have a look at
Modules/read_cards.f90 for details. Remove the stupid workaround to your liking.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5493 c92efa57-630b-4861-b058-cf58834340f0
2009-04-02 16:05:09 +00:00
dalcorso a2b5ab5e50 Minor partial cleanup. Many routines declared unused variables. Many others
could be cleaned.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5445 c92efa57-630b-4861-b058-cf58834340f0
2009-02-25 15:58:53 +00:00
cavazzon b5ece34b51 - Task groups bug fix, array tg_rho was not cleared at every k point cycle.
This was causing problems with some combinations of "-npool" and "-ntg".


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5217 c92efa57-630b-4861-b058-cf58834340f0
2008-10-05 07:48:08 +00:00
dalcorso 0375acce30 Variable so(nt) removed: so(nt) -> upf(nt)%has_so.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4929 c92efa57-630b-4861-b058-cf58834340f0
2008-05-15 12:58:11 +00:00
paulatto 848217bc9f HWF energy + PAW should work again, better initial becsum.
Added documentation for cell_dynamics='bfgs' in INPUT_PW
Many random fixes and, mostly paw-related.
LP


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4681 c92efa57-630b-4861-b058-cf58834340f0
2008-02-07 13:48:46 +00:00
paulatto ccc6a71a8f Bugfix: PAW should work in parallel with pools
Bugfix: PAW stress should work in parallel, even with pools
Bugfix: vc-bfgs should have a consistent convergence threshold (by SdG)
        (its existence should be reported in INPUT_PW too!)

Note: I had to move some initialization from allocate_nlpot to a new function
      pre_init that I've put in PW/setup.f90; it's called by setup and read_file
Note: the scf_mod part of PAW is now much better, becsum and rho%bec are NOT
      the same any more (rho%bec is mixed and recollected among pools,
      becsum is not).

LP


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4657 c92efa57-630b-4861-b058-cf58834340f0
2008-01-24 17:02:01 +00:00
cavazzon 259fe1b6e7 - celanup, poolreduce replaced by mp_sum(...,inter_pool_comm)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4643 c92efa57-630b-4861-b058-cf58834340f0
2008-01-23 16:53:17 +00:00
dalcorso 7fc900d5a9 Variable tqr moved to control flag and written in the xml file.
It was not initialized by the postprocessing programs.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4610 c92efa57-630b-4861-b058-cf58834340f0
2008-01-06 11:54:52 +00:00
cavazzon cf0a201273 - task groups implemented also for non collinear spins,
but only in h_psi, and not yet in sum_bands


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4602 c92efa57-630b-4861-b058-cf58834340f0
2008-01-04 18:32:24 +00:00
cavazzon d983674c35 - further cleanup to save some memory
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4590 c92efa57-630b-4861-b058-cf58834340f0
2008-01-02 18:00:00 +00:00
cavazzon cac89b2b3c - another fix for PGI bug (that is exploited in contained subrotuines that access
array arguments of the mother sub. with explicit dimensions)
- task groups implemented for k points too.
- task groups implemented also in the loop over bands contained in sum_band
- task groups NOT YET implemented for non collinear spin and meta dft


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4587 c92efa57-630b-4861-b058-cf58834340f0
2008-01-02 11:47:04 +00:00
giannozz 755d0199ea New interface "calbec" for calculation of <beta|psi>. Less clumsy than the
previous ones, might be useful the day such arrays will be distributed.
Allows calculation of overlap matrices as well. Requires properly dimensioned
arrays on input! old routines ccalbec, ccalbec_nc, pw_gemm are still there.
Also: minor bug in Berry phase fixed, I think (the various npw, npw0, npw1
were inconsistently used; electric field was not affected). Please check for
collateral damages.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4503 c92efa57-630b-4861-b058-cf58834340f0
2007-12-05 14:14:12 +00:00
giannozz 25a3f97092 More cleanup (?) in <beta|psi> calculation
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4489 c92efa57-630b-4861-b058-cf58834340f0
2007-12-03 15:52:40 +00:00
giannozz 2cbc30aa26 Cleanup of cpu time printout; start_clock and stop_clock modified to avoid
trouble if label is longer than expected


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4473 c92efa57-630b-4861-b058-cf58834340f0
2007-11-23 16:00:25 +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
paulatto dce5f820da Paw code moved around and unused functions removed; old grid_paw code removed.
This is the first step of code cleanup. Actually nothing should change.

rad_paw_routines -> paw_onecenter (2 functions went to paw_init)
grid_paw_variables -> paw_variables (with some additions from rad_paw_routines)
grid_paw_routines -> paw_init (merged with 2 init functions from rad_paw)

Probably there are a few random fixes around.

Next step: remove ndmx and ntpx.

LP


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4422 c92efa57-630b-4861-b058-cf58834340f0
2007-11-12 14:49:09 +00:00
degironc a6b0fea63d more changes in scf_mod. mix_rho is getting simpler and more transparent,
scf_mod contains more stuff, but it should be rather simple.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4419 c92efa57-630b-4861-b058-cf58834340f0
2007-11-10 15:07:51 +00:00
degironc a675f2d7ca scf_mod again
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4414 c92efa57-630b-4861-b058-cf58834340f0
2007-11-09 12:54:39 +00:00
paulatto e8706afc54 Added routine to symmetrize becsum when PAW calculation is being performed. It still needs some test. As a collateral effect d1,d2 and d3 variables in modules symme (pwcom.f90) are now marked as TARGET. File make.depend updated accordingly.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4412 c92efa57-630b-4861-b058-cf58834340f0
2007-11-09 12:45:43 +00:00
degironc 79f0fd08c0 more scf_mod changes
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4398 c92efa57-630b-4861-b058-cf58834340f0
2007-11-06 10:26:07 +00:00
degironc fab8c49e9c scf_mod again..
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4382 c92efa57-630b-4861-b058-cf58834340f0
2007-11-01 11:19:31 +00:00
giannozz 216c32ccd3 The following pseudopotential-related variables in module uspp_param:
zp, psd, dion, betar, jjj, qqq, qfunc, qfcoef, vloc_at, rinner,
   nbeta, kkbeta, nqf, nqlc, lll, tvanp
have been replaced by the corresponding variables in structure 'upf'.
There shouldn't be any side effects, but who knows. There is still a
copy of the above variables that will be removed sooner or later.
Basically : variable([i,j,k,..,]n) => upf(n)%variable [(i,j,k,..)]
Note that upf%qfunc has for the time being three indices instead of two,
and that upf%kkbeta is the analogous of kkbeta and not what it used to be.
The logic of this operation will be clearer when it will be completed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4308 c92efa57-630b-4861-b058-cf58834340f0
2007-10-05 09:26:23 +00:00
dalcorso 31c3c54d31 Old versions of these routines was commited yesterday, so the noncollinear
stuff was not working any more. Reverted to the new version.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4265 c92efa57-630b-4861-b058-cf58834340f0
2007-09-19 14:16:57 +00:00
paulatto 08fedbe2f0 SCF with Projector-Augmented Wave Pseudopotential (PAW) routines added.
This means that a lot of routines have been modified and a few files have
been added. During the year several people have contributed to this code,
mainly Guido Fratesi, Ricardo Mazzarello, Stefano de Gironcoli, Andrea Dal
Corso and me (Lorenzo Paulatto).

A brief report of modified or added files follows, further down you will
find a loger report of modifications that was necessary to merge develop_PAW
branch with the current CVS version.

Current version is not 100% functional, but it doesn't brake anything else and
can be used to generate and test PAW pseudopotential.

      *************************************
      *** Brief report of modifications ***
      *************************************
Modified files:
PW/clean_pw.f90
PW/electrons.f90
PW/print_clock_pw.f90
PW/hinit0.f90
PW/potinit.f90
PW/newd.f90
PW/summary.f90
PW/setup.f90
PW/read_pseudo.f90
PW/init_us_1.f90
PW/init_run.f90
PW/mix_rho.f90
atomic/atomic_paw.f90
atomic/write_paw_recon.f90
atomic/ld1_writeout.f90
atomic/write_resultsps.f90
atomic/ld1inc.f90
atomic/ld1_readin.f90
atomic/gener_pseudo.f90
atomic/parameters.f900
atomic/run_pseudo.f900
atomic/set_rho_core.f90
atomic/pseudovloc.f90
Modules/read_upf.f90
Modules/uspp.f90
Modules/pseudo_types.f90
Modules/parameters.f90

Added files:
PW/grid_paw_routines.f90
PW/rad_paw_routines.f90
Modules/grid_paw_variables.f90
Modules/read_paw.f90

Added files that will be removed:
PW/rad_paw_trash.f90
PW/paw_xc.f90

Examples:
examples/PAWexample contains a full test of PAW pseudopotential
for Oxygen. The test consist in these tasks:
 - 2 norm conserving, 2 US and 4 PAW pseudopotentials are
   generated and tested in ld1
 - pw test for an isolated O atom at different cutoffs
 - pw test for an O2 molecule at different O-O distance
please read examples/PAWexample/README for (a few) details.

NOTES:
1. new modifications to atomic_paw (and related) from ADC have been rolled
   back, as they were breaking a lot of things, I will reintroduce them
   later when I am sure that everything works properly.
2. the files PW/paw_xc.f90 and Modules/rad_paw_trash.f90 will be removed in
   the next few weeks.

TODO:
1. use new ld1 XC code as much as possible, and remove legacy XC routines
   from rad_paw_routines
2. full self-consistency with radial energies
3. make new Harris-Foulkes estimate paw-aware
4. provide some kind error estimate
5. FORCES and stress!! (require symmetrization of becsums)
6. cleanup

    ************************
    *** merge of PW code ***
    ************************
Versions notation:
OLD=version from 2 years ago used as reference to generate the patches
NEW=CURRENT=current trunk version
PAW=current develop_PAW version

Note: pseudo-potential input and allocation routines changed
      a lot in the last years, this is a diagram:
OLD:PW/readin ~~> PAW:PW/read_pseudo --> disappears
pops out --> PAW:PW/readin ~~> NEW:PW/read_pseudo

added files:
Modules/read_paw.f90    (contains module read_paw_module with subroutines
                         paw_io nullify_pseudo_paw, allocate_pseudo_paw and
                         deallocate_pseudo_paw previously in removed file
                         Modules/readpseudo.f90. Also contains module
                         paw_to_internal with subroutine set_pseudo_paw,
                         previously in upf_to_internal.f90)
PW/paw_xc.f90           (contains OLD=PAW xc and gcxc routines as adapting paw
                         grid code to use new routines was very error prone and
                         quite worthless, as it has to be removed anyway)

Conflicts reported by CVS during merge:
DONE */Makefiles                    (all replaced with new, redone by hand)

DONE  flib/functionals.f90          (nothing to do)

DONE Modules/functionals.f90        (RNV == replaced with NEW version)
DONE Modules/atom.f90               (trivial: duped rgrid)
DONE Modules/autopilot.f90          (trivial)
DONE Modules/bfgs_module.f90        (RNV)
DONE Modules/cell_base.f90          (RNV)
DONE Modules/check_stop.f90         (RNV)
DONE Modules/constants.f90          (RNV)
DONE Modules/constraints_module.f90 (RNV)
DONE Modules/energies.f90           (RNV)
DONE Modules/input_parameters.f90   (RNV)
DONE Modules/ions_base.f90          (RNV, has 3 new subs)
DONE Modules/ions_nose.f90          (RNV)
DONE Modules/parameters.f90         (actually RNV)
DONE Modules/path_base.f90          (RNV)
DONE Modules/path_opt_routines.f90  (RNV)
DONE Modules/path_reparametrisation.f90 (RNV)
DONE Modules/path_variables.f90     (RNV)
DONE Modules/pseudo_types.f90       (cleaned double def of paw_t)
DONE Modules/read_cards.f90         (RNV)
DONE Modules/read_namelists.f90     (checked and RNV)
DONE Modules/uspp.f90               (trivial)
DONE Modules/xml_io_base.f90        (RNV)

DONE PW/read_pseudo.f90             (merged by hand with PAW PW/readin)

DONE PW/bp_calc_btq.f90             (trivial)
DONE PW/c_bands.f90                 (actually RNV)
DONE PW/ccgdiagg.f90                (RNV)
DONE PW/cegterg.f90                 (RNV)
DONE PW/cft3s.f90                   (RNV)
DONE PW/cinitcgg.f90                (RNV)
DONE PW/c_phase_field.f90           (RNV)
DONE PW/divide_et_impera.f90        (nothing to do?)
DONE PW/exx.f90                     (RNV)
DONE PW/hinit0.f90                  (easy)
DONE PW/h_psi.f90                   (RNV)
DONE PW/init_run.f90                (easy)
DONE PW/kpoint_grid.f90             (nothing to do?)
DONE PW/newd.f90                    (required mod in newd_paw_grid, CHECK!!)
DONE PW/openfil.f90                 (actually RNV)
DONE PW/paw.f90                     (actually RNV)
DONE PW/punch.f90                   (RNV)
DONE PW/pwscf.f90                   (quite RNV)
DONE PW/set_kup_and_kdw.f90         (RNV)
DONE PW/setup.f90                   (RNV + 2 line merged by hand)
DONE PW/sgama.f9                    (actually RNV)
DONE PW/sgam_at_mag.f90             (actually RNV)
DONE PW/stop_run.f90                (actually RNV)
DONE PW/stres_gradcorr.f90          (actually RNV)
DONE PW/symrho_mag.f90              (nothing to do)
DONE PW/v_of_rho.f90                (RNV)

DONE PW/compute_fes_grads.f90       (RNV)
DONE PW/gradcorr.f90                (RNV)
DONE PW/input.f90                   (RNV)
DONE PW/pw_restart.f90              (RNV)
DONE PW/read_ncpp.f90               (actually RNV)
DONE PW/summary.f90                 (RNV + inserted new PP type)
DONE PW/wfcinit.f90                 (RNV)

the hard ones:
DONE PW/electrons.f90   (adapted code to new syntaxes, a lot of cleanup, removed
                         some PAW junk that can be readded later, removed parts
                         that were applyed twice, or had been removed in trunk,
                         the rhog allocations and usage may need fixes)
DONE PW/mix_rho.f90     (merged tauk and paw additions, a bit of cleanup and smarter
                         variables names)
DONE PW/init_us_1.f90   (qtot redefined with "triangular" index nb,mb-->ijv)

modified for compiling:
Modules/io_files.f90    (depatched)
PW/pwcom.f90            (depatched)
Modules/parameters.f90  (temporary readded cp_lmax = lmaxx+1)
PW/newd.f90             (merge was wrong, redone mostly by hand)
PW/read_ncpp.f90        (depatched)
PW/read_pseudo          (small fixes)
PW/sgam_at_mag.f90      (depatched)
PW/sgama.f90            (depatched)
PW/stres_gradcorr.f90   (depatched)

modified for running:
PW/clean_pw.f90         (added call to deallocate_paw_internals)

Modifications to PAW routines:
1. compute_onecenter_charges and compute_onecenter_charges modified to
   comply with new structure of v_xc (in v_of_rho.f90), requiring new
   g-space densities to be saved and computed --> using old xc routines
   as this code will be removed.
2. qrad size has changed, prad and ptrad had to be changed accordingly.
3. several minor modifications to use new radial grid structure.
4. infomsg arguments changed, very funny bug followed.
5. added new routine deallocate_paw_internals, called by PW/clean_pw.f90
   required to run pp.x with more than one q-point(and good programming
   practice)


    *************************
    *** merge of LD1 code ***
    *************************
2nd try: atomic code replaced with current version, then merge by hand
the files that are used by paw subsystem:
* atomic_paw.f90        (replaced with most recent version from develop_PAW
                         routine us2paw and paw2us taken from newer trunk
                         version, a lot of minor changes.)
* gener_pseudo.f90      (fixes)
* ld1inc.f90            (PAW variables added)
* ld1_readin.f90        (PAW variables added, I am not sure if lpaw should go
                         in input or inputp namelist)
* ld1_writeout.f90      (it was only necessary to add a few lines)
* pseudovloc.f90        (nothing to do)
* run_pseudo.f90        (almost nothing to do)
* set_rho_core.f90      (readded a few lines for lnc2paw)
* write_paw_recon.f90   (nothing to do)
* write_resultsps.f90   (nothing to do: trunk version is more
                         PAW-aware than PAW version)

Main problems were found in subroutines run_pseudo and gen_pseudo,
a little code had to be rewritten to comply with new variable names
and fix with merge.

TODO: fix atomic_paw routines to use minimal allocated arrays insetad
of ndmx sized ones; try to use the pawet as much as possible. Remove
test lines and other garbage. Find a fix for PAW2.

The first week of september Andrea Dal Corso uploaded a few modifications to
the atomic_paw routines. I had to rollback them as the structure of atomic_paw
has changed a lot and reimplementing them is probably easier and definitely
safer than fixing everything. I will do it soon, I swear!

LP


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4257 c92efa57-630b-4861-b058-cf58834340f0
2007-09-18 10:05:46 +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
degironc 42a12efcc8 The Meta-GGA available on cp.x has been ported to pw.x: scf and forces,
while stress must still be done. So far, NC PP only.
SdG + Koichiro Umemoto


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3779 c92efa57-630b-4861-b058-cf58834340f0
2007-02-13 21:39:20 +00:00
dalcorso cfef6c3be5 Phonon in the noncollinear and spin-orbit case. Changes in PW.
angle1, angle2 and starting_magnetization are saved in the punch file.
The transformation of angle1 and angle2 to radiants is done in input.f90.
Clean_up of sum_band.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3765 c92efa57-630b-4861-b058-cf58834340f0
2007-02-08 12:47:41 +00:00
giannozz bd6b07f386 Calculation of weights and Fermi energies is extracted from sum_band
and performed by a separate subroutine (weights).
More uniform behaviour of scf and non-scf case; some unneeded calls
(ppolreduce, sum_band) removed.
Subroutine punch minimized (should be removed)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3721 c92efa57-630b-4861-b058-cf58834340f0
2007-01-29 10:40:07 +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 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
sbraccia ea0935fb5f Fixed a bug in the definition of the diagonalization thresholds for empty
states. This bug (introduced at the end of May 2005) was responsible for
somehow wrong results in the case of calculations with many k-points.
Cleanup of diagonalization thresholds: wg_set variable removed and btype array
is now set in sum_band.
Added a logical input variable (diago_full_acc) to decide if the empty states
(defined as states with occupation < 1%) have to be converged at full accuracy
or not. Defaul is .FALSE. (I am not sure this is the best choice, comments
appreciated).
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3040 c92efa57-630b-4861-b058-cf58834340f0
2006-04-24 17:32:08 +00:00
dalcorso 9d56f1c6c9 Added the possibility to mix scalar relativistic and fully relativistic
pseudopotentials with lspinorb=.true. (Still experimental)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2630 c92efa57-630b-4861-b058-cf58834340f0
2005-12-21 16:30:00 +00:00
dalcorso fd9b3427db Bug fix.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2441 c92efa57-630b-4861-b058-cf58834340f0
2005-11-08 17:37:00 +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 dd49eab404 EXX: Gamma-specific part implemented,
kind of parallel implementation (untested)

SdG


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2101 c92efa57-630b-4861-b058-cf58834340f0
2005-08-17 08:43:37 +00:00
giannozz 24973f1941 Call to subroutine tweights was not updated after recent changes.
Fixed spin-up and spin-down occupancies should now work for tetrahedra
Who knows what bfield(3) is ?


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1900 c92efa57-630b-4861-b058-cf58834340f0
2005-05-24 17:17:27 +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
dalcorso 37a254eb00 Introduced some experimental constraints on the magnetization.
With i_cons = 3; A penalty functional is added to the
               total energy to constrain each component of the
               total magnetization.
               (Only in noncolinear version)

With i_cons = 4; a fixed magnetic field is added to the
               exchange and correlation magnetic field.
               (Only in noncolinear version)

With i_cons = 5; Uses the two Fermi energies feature to fix the
               magnetization as in the constrained-moment approach.
               mcons(3,1) fix the value of the total magnetization.
               (Only with nspin=2)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1720 c92efa57-630b-4861-b058-cf58834340f0
2005-03-18 10:42:56 +00:00
degironc 12e16f8852 new PW feature:
nelup and neldw variables can be read from input and used to set up
    the occupations of spin up and spin down electrons separately.
    It can be used with both metallic and fixed occupations.
    In the former case two Fermi energies are defined, in the latter
    nelup and neldw must be both integer.
    In all cases nelec must also be explicitely defined and
    nelup + neldw = nelec must hold.

    Not fully tested, please report problems and complaints to SdG


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1717 c92efa57-630b-4861-b058-cf58834340f0
2005-03-17 14:47:46 +00:00
sbraccia 52df1d07bf Typo fixed.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1645 c92efa57-630b-4861-b058-cf58834340f0
2005-02-16 08:44:49 +00:00
sbraccia 059ffd302b Small speed-up of the first diagonalisation (this at each ionic step).
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1639 c92efa57-630b-4861-b058-cf58834340f0
2005-02-11 13:06:08 +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 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 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