Commit Graph

53 Commits

Author SHA1 Message Date
ccavazzoni 0fb135c52b - more cleanups of old fpmd stuff
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6193 c92efa57-630b-4861-b058-cf58834340f0
2009-11-22 08:26:59 +00:00
giannozz 2c0c6c2248 Removal of f_efs.h, explicit typing of CMPLX, lowercase blas/lapack
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5802 c92efa57-630b-4861-b058-cf58834340f0
2009-08-03 07:29:20 +00:00
cavazzon 0f004f12d3 - cleanup: removed duplicate subroutines, removed the awkward section
in the restart subroutine related to the possibility of "correclty"
  restart a simulation setting to zero the velocities of some degree
  of freedom.
  Simple tests shows that if a simulation is restarted setting to
  zero the velocities of electrons without setting to zero the velocities
  of ions and vice versa, the generated trajectories of ions contain
  unphysical fast oscillations.
- Some improvement in the parallelism when cell dynamics is active.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5122 c92efa57-630b-4861-b058-cf58834340f0
2008-08-21 17:01:46 +00:00
giannozz a2f2848f92 More static arrays and dimensions removed: rho_at rho_atc natx nbndxx
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4365 c92efa57-630b-4861-b058-cf58834340f0
2007-10-24 15:36:52 +00:00
cavazzon 2f2b88494a - same eletronic occupations array between FPMD/CPV
- lot of subroutines taken out from modules and
   corresponding interface added


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3305 c92efa57-630b-4861-b058-cf58834340f0
2006-08-03 17:47:35 +00:00
giannozz 737ce089cf More spherical bessel cleanup
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3297 c92efa57-630b-4861-b058-cf58834340f0
2006-07-27 17:06:26 +00:00
cavazzon 8e763f9676 - bug fix, "kkbeta" mistakenly used in place of "mesh" in non local
core correction integrals.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3231 c92efa57-630b-4861-b058-cf58834340f0
2006-06-30 10:21:18 +00:00
cavazzon f44cd08e1b - cleanups of unused features/source lines/modules
- blue gene fix (suggested by C. Bekas)
- CP postprocessing documentation
- small changes to restart file to allow CP restart from
  PW run (at gamma).


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3149 c92efa57-630b-4861-b058-cf58834340f0
2006-06-01 10:51:33 +00:00
giannozz 3ee41c0115 Various fixes for compilation on Alphas (courtesy of Giovanni Cantele)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3129 c92efa57-630b-4861-b058-cf58834340f0
2006-05-18 16:09:47 +00:00
giannozz 308f8ac999 Incorrect limit for x -> 0 in the calculation of derivatives of spherical
harmonics could lead to loss of precision in stress calculation (noticed
by Kostya)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3083 c92efa57-630b-4861-b058-cf58834340f0
2006-05-05 12:23:15 +00:00
cavazzon 948471052a - polarization is now written again to file prefix.pol
- cp stress: local and hartree term computed only
  for the 6 independent component (instead of all 9 components)
- more BGL porting


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3053 c92efa57-630b-4861-b058-cf58834340f0
2006-04-27 15:50:46 +00:00
giannozz aae190c672 - write to out.N disabled (can be re-enabled by changing environment.f90)
- cleanup in stress: sph_bes is the only routine calculating j_l(x) .
  It wasn't properly called in previous versions for meshes starting
  at r=0 (output was one index off). Now it should really work in all
  cases (please test)
- call to bess in qqberry replaced by call to sph_bes (please test)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3048 c92efa57-630b-4861-b058-cf58834340f0
2006-04-27 13:53:56 +00:00
kkudin 8f6755ce5c Tracked down the differences between the stress in the ancient CP and
in the recent CVS. For a small test, the stress for USPPs now agrees
much better with the ancient CP code. All the interested parties
please test.

 For the fix, backported the old CP's "bess" routine, since the logic
for "sph_bes" was the cause of the differences. Please be careful when
making "sph_bes" work for tpre=.true.

 Another puzzle - converged CP energies were identical from the
ancient CP through CP in PWSCF v2.1, but now are slightly different
(same machine, compiler, etc.) The biggest difference is the
exchange-correlation energy. Does anyone know what is the EXACT reason
for this?

 Kostya


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3046 c92efa57-630b-4861-b058-cf58834340f0
2006-04-27 02:22:21 +00:00
cavazzon 25b02439aa - fix for NLCC contribution to forces and stress
- more BGL porting
- clean-ups


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3020 c92efa57-630b-4861-b058-cf58834340f0
2006-04-18 07:33:11 +00:00
cavazzon ab37050da2 - bug fix, fpmd wasn't able to manage pseudo with radial grid
starting from 0.
- more static array removed
- clean-ups and mergings


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3010 c92efa57-630b-4861-b058-cf58834340f0
2006-04-09 23:38:56 +00:00
cavazzon 0a736de497 - important bug fix, one of the component of the stress in CP (not fpmd),
was carrying a wrong sign. Now checked and working with NCPP,
  to be further checked with USPP. The stress was wrong when using
  PP with nonlocality P or greather.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2987 c92efa57-630b-4861-b058-cf58834340f0
2006-04-01 15:43:55 +00:00
cavazzon cff1f9680c - static arrays dimensioned with natx removed
- nproc substituted with nproc_image
- mpime substituted with me_image
- roor substituted with root_image
- some clean-ups


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2960 c92efa57-630b-4861-b058-cf58834340f0
2006-03-24 18:51:06 +00:00
cavazzon dd93c6ad14 - group communicator variable substituted with intra_image_comm,
first step needed to parallelize neb over images also for CP.
  Next we need to add the right communicator to all communications
- subroutine reduce substituted everywhere with mp_sum
- mp_sum for array with 4dims added in mp.f90
- workaround for xlf compiler, it has problems compiling file with
  initialization of large array in the definition line,
  see Modules/input_parameters.f90 , initialization moved to
  Modules/read_cards.f90 .


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2946 c92efa57-630b-4861-b058-cf58834340f0
2006-03-23 09:19:43 +00:00
giannozz 4bcb74d408 - combined index instead of two symmetric indices for array dqrad
- the logic of the combined index for US PP is now the same everywhere
  (i.e in PW, CP, and in the pseudopotential format):
     do iv=1,N
        do jv=iv,N
           ijv=jv*(jv-1)/2+iv
  (in PW the indices are called nb, mb). In order to get ijv from (iv,jv):
     if (iv > jv) then
         ijv=iv*(iv-1)/2+jv
     else
         ijv=jv*(jv-1)/2+iv
     end if
- the above change also fixes a serious bug affecting Vanderbilt US PP
  in UPF format (only half of the qfcoef array was present, but not the
  good half)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2916 c92efa57-630b-4861-b058-cf58834340f0
2006-03-15 11:23:03 +00:00
cavazzon d77f5709f9 - bug fix in fill_qrl, to be further examined
- fill_qrl from cplib to pseudopot
- ortho: mxma substituted with dgemm and pmatmul (parallel)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2900 c92efa57-630b-4861-b058-cf58834340f0
2006-03-10 16:02:42 +00:00
giannozz 4c174a6787 Memory saving in US PP and small boxes: packed form for more arrays
PLEASE NOTE: the logic for packed index is as follows everywhere
do i=1,N
   do j=1,i
      ij = (i-1)*i/2 + j
This is equivalent to
ij = 0
do i=1,N
   do j=1,i
      ij = ij + 1
This is not (yet) the same as used in PW, though


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2871 c92efa57-630b-4861-b058-cf58834340f0
2006-03-07 10:15:27 +00:00
giannozz aa7aa03999 - memory usage of arrays qradb, dqrad reduced whenever the maximum number
of beta functions is smaller than the fixed maimum nbrx
- routines for herman-skillman integration moved together to other
  integration routines in flib/ . We should one day decide which one of
  these routines should be used: they all do basically the same thing
- routine reading ultrasoft PP in the old Vanderbilt format moved to
  Modules/. More USPP cleanup coming soon.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2868 c92efa57-630b-4861-b058-cf58834340f0
2006-03-06 10:39:38 +00:00
giannozz e90b3c2658 Replaced several allocations with fixed dimensions with dimensions
calculated at run-time; combined index instead of two symmetric indices
in some PP arrays. Should save a sizable amount of memory.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2864 c92efa57-630b-4861-b058-cf58834340f0
2006-03-03 14:17:46 +00:00
giannozz b7214a5bd4 Do not allocate memory used by variable-cell if doing fixed-cell
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2862 c92efa57-630b-4861-b058-cf58834340f0
2006-03-02 18:25:40 +00:00
giannozz ec9478d16c Module "qrl" no longer needed, removed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2698 c92efa57-630b-4861-b058-cf58834340f0
2006-01-13 13:53:35 +00:00
giannozz 9d4b0c3387 Do not allocate large arrays that are not used with fixed cell
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2697 c92efa57-630b-4861-b058-cf58834340f0
2006-01-12 21:03:17 +00:00
giannozz e0a17780ba The qrl functions, i.e. Q_ij(r) split into l-components, are now fit to
the "conventional" Vanderbilt (qfunc+qfcoef) form if this is not available.
This removes a major difference between CP and PW in the treatment of USPP.
Only the 1.0.0 Vanderbilt format written by some obsolete version of the
Vanderbilt code should be affected, but beware unintended side effects!!!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2693 c92efa57-630b-4861-b058-cf58834340f0
2006-01-10 11:20:56 +00:00
giannozz aed2eca96f Cleanup of the Ultrasoft PP: variable "cmesh", used only for PP in the
archaic USPP format with Herman-Skilman grid, removed. The integration
is now performed used the same logic (but not yet the same routine) of
the other cases.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2536 c92efa57-630b-4861-b058-cf58834340f0
2005-12-01 17:25:22 +00:00
giannozz 8f9fae13dc The "qrl" array - used for compatibility with old Vanderbilt format -
takes 200Mb with default parameters! Reduced to almost half by using
the symmetry wrt index exchange.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2439 c92efa57-630b-4861-b058-cf58834340f0
2005-11-08 10:04:52 +00:00
giannozz 7e71136c35 Patch from Axel Kohlmeyer: mp-sum => mp_max, fixing a serious error
in parallel execution. PLEASE CHECK


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2399 c92efa57-630b-4861-b058-cf58834340f0
2005-11-01 22:23:07 +00:00
cavazzon 89fc5481fc - CP docs revised
- CP postprocessing ( cppp.x ) now properly read restart.xml and
  trajectory files to produce xcrysden files ( .xsf .axsf )


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2235 c92efa57-630b-4861-b058-cf58834340f0
2005-09-26 15:56:23 +00:00
cavazzon 2aa910dda7 - fix in stress calculation for non linear core correction
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2211 c92efa57-630b-4861-b058-cf58834340f0
2005-09-23 12:50:54 +00:00
cavazzon 41c665b82b - Executable fpmd.x no more built, new calculation "fpmd" added, to
execute cp.x with fpmd flavour
 - stress for LSD calculation fixed ( but more test required )


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2190 c92efa57-630b-4861-b058-cf58834340f0
2005-09-18 23:49:24 +00:00
cavazzon f88ba38509 - more CP/FPMD merging
- clean-up


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2183 c92efa57-630b-4861-b058-cf58834340f0
2005-09-15 16:51:35 +00:00
cavazzon f042695867 - added input parameter "refg" in the control namelist to set the
accurancy of the pseudopotential table for CP/FPMD (default values = 0.05Ryd)
  mmx now is calculated depending on refg and ecutrho


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2155 c92efa57-630b-4861-b058-cf58834340f0
2005-09-06 09:27:34 +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
cavazzon 08a4556d85 - added a subroutine to write the charge density in XML plane by plane
- minor fixes to PW/pw_restart
- Added the possibility to restart using CP from a PW run (at gamma),
  working but still sperimental.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2131 c92efa57-630b-4861-b058-cf58834340f0
2005-08-26 09:28:33 +00:00
cavazzon 260828432d - FPMD: pseudopotential variable wsg, wnl, fnl substituted with
dion, beta, bec everyware.
- subroutines formfn, compute_beta, nlsm1, nlsm2, ecc ... now are common
  between FPMD and CPV, a lot of clean ups!
- Changes in stdout: relevant physical quantities ( positions velocities an cell )
  are now printed with the seme format of the corresponding input card,
  like in PW, as was suggested by SdG.
- exemple23 updated to reflect the new input namelist "wannier"
- Subroutine init_run now is used in FPMD too.
- WARNING in the stress computed with CP, for a pseudo with core-corrections,
  a contribution is missing! Not yet fixed, I need to talk with PG for the
  box staff.
- WARNING the examples reference are not updated, I'm on the IBM sp, and
  I prefer to update them from a linux machine.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2110 c92efa57-630b-4861-b058-cf58834340f0
2005-08-22 14:14:13 +00:00
cavazzon b5fa8ee14b - cell_base, added support for cell input units, ex: CELL_PARAMETERS (angstrom)
- core charge, same module between CPV and FPMD
- Makefile: added dependency between "mods" and "libiotk"
- Makefile: fix for dependencies in PH and Gamma when __NEWPUNCH is defined


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1995 c92efa57-630b-4861-b058-cf58834340f0
2005-07-04 10:34:44 +00:00
cavazzon dbf279e1c3 - restart tags now using those suggested by CS
- flags for core cor. (nlcc, nlcc_any) used in FPMD too
- fixed a bug in read_pseudo.f90 ( related to nlcc )
- other merging anc clean-ups


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1971 c92efa57-630b-4861-b058-cf58834340f0
2005-06-22 08:28:08 +00:00
cavazzon e1097e16e2 - in CP/FPMD added the possibility to specify input with
command line parameter -input like in PW
- restart file layout modified


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1945 c92efa57-630b-4861-b058-cf58834340f0
2005-06-08 21:30:34 +00:00
cavazzon 856d5ced1f - fpmd2upf made more user friendly
- sph_bes, check on small G changed to avoid
  problems with log. atomic grid , that are dense near 0


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1921 c92efa57-630b-4861-b058-cf58834340f0
2005-05-27 13:49:19 +00:00
cavazzon d3aabc5972 - pseudopotential base modules uspp_param and uspp now used
also in FPMD, for norm-conserving pseudo (like in CP)
- Few clean-ups in pseudopotential parameters initialization


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1880 c92efa57-630b-4861-b058-cf58834340f0
2005-05-18 21:01:05 +00:00
sbraccia a00aac0e25 header containing the GPL license added where missing and made omogeneous.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1865 c92efa57-630b-4861-b058-cf58834340f0
2005-05-16 19:19:04 +00:00
cavazzon 06b27d95f6 - ylmr2 (from flib) nown used to compute spherical harmonics in FPMD and
qqberry too.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1851 c92efa57-630b-4861-b058-cf58834340f0
2005-05-08 21:10:20 +00:00
cavazzon f98847f085 - subroutines formfn, compute_rhops have been made code independent and used
by both CP and FPMD
- Now FPMD and CP use the same random wave functions initialization,
  which is also independent from the number of processors,
  very useful for debugging.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1836 c92efa57-630b-4861-b058-cf58834340f0
2005-04-28 15:27:41 +00:00
cavazzon 193516156e - clean-ups, comments and merging
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1829 c92efa57-630b-4861-b058-cf58834340f0
2005-04-22 15:23:19 +00:00
cavazzon 0219a46b4c - CP clean-ups: eigr, ei1, ei2, ei3, eigrb, ... arrays
now have the same layout (equal to the layout they have in PW)
- iotk files in Modules have been removed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1801 c92efa57-630b-4861-b058-cf58834340f0
2005-04-14 21:08:53 +00:00
cavazzon 2047ff6986 - more CP90/FPMD merging
- fix in the FPMD xc functionals wrapper


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1575 c92efa57-630b-4861-b058-cf58834340f0
2005-01-26 10:15:04 +00:00