Commit Graph

101 Commits

Author SHA1 Message Date
degironc 5bf570513b bfgs minimization has been added to the vc-relax calculation.
Scaled (crystal) coordinates (+ cell if needed) are used in the relazation.
In the normal case it shouls behave exactly as usual.
CVSexample has been updated adding an example for this feature...
Once reasonably tested and robust it may be better to move these cases in
exanple03 that contains other relaxation examples.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4536 c92efa57-630b-4861-b058-cf58834340f0
2007-12-19 14:41:24 +00:00
giannozz 45ae58d60b All occurrences of d0, d+N, d-N, replaced with fortran-90 style _DP.
Please do not re-introduce old-style syntax. A uniform syntax allows
if the need arises to change the precision in less than no time.
Courtesy of Pascal Thibeaudeau. Modules/ directory only.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3964 c92efa57-630b-4861-b058-cf58834340f0
2007-06-11 17:13:15 +00:00
cavazzon b08fadb543 - clean-up, unused subroutines removed,
more comments and source readability


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3835 c92efa57-630b-4861-b058-cf58834340f0
2007-03-05 09:56:01 +00:00
giannozz e0a4d3df06 In the triclinic case (ibrav=1) the translation from traditional cell
parameters a, b, c, cosab, cosac, cosbc, to celldm was not correct.
Documentation updated. Courtesy of Marco Fornari.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3763 c92efa57-630b-4861-b058-cf58834340f0
2007-02-08 11:08:48 +00:00
kkudin 4a7205a54b An update on check-in [4430]. New vc constraints are removed from CPV (due to
lack of sufficient clarity). PW vc code is updated. For some reason vc-relax
rotates cell vectors a little (i.e. there seem to be a pure rotation in
the dispacement), somebody with more experise should look at that.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3685 c92efa57-630b-4861-b058-cf58834340f0
2007-01-17 17:29:07 +00:00
kkudin 54ba47fe8a Kind of added cell optimization constraints for 'vc-relax' into PW
similarly to CP code via "cell_dofree" (and iforceh). So "cell_dofree"
now appears to be working for PW, and has a couple of new options
'xyt' and 'xyzt' which should allow to optimize only (x1,x2,y2) and
(x1,x2,y2,x3,y3,z3) components of the lattice vectors. If these added
constraints really do work properly in PW - only time will tell ...

It would be nice to merge "cell_base_init" from CPV to PW, and also
"cellmd" module of PW into "cell_base" of CPV. Otherwise these seem to
exist and be updated separately despite having identical
functionality.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3680 c92efa57-630b-4861-b058-cf58834340f0
2007-01-16 20:09:37 +00:00
giannozz 3a98e2d9d4 More patches from Axel:
- correct an unquoted string (iosys) in PW/input.f90:483
(this was the cause of tonight compilation failere)
- correct a few incorrect format strings
- make more use of the constants module and thus
  provide more consistent units. NOTE, this has some
  numerical changes in the outputs, as in some places
  rather low precision and inconsistent numbers were
  used for unit conversion.
- convert all(?) single precision constants to double
  using the attached little perl program.
  exceptions: efermi.f90 (as it is supposed to be rewritten
  anyways), plotbands.f90 (it uses single precision everywhere,
  which may result in saving a significant amount of memory,
  so i converted the two double precision constants to single).
Unused routine 'set_fft_grid' removed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3602 c92efa57-630b-4861-b058-cf58834340f0
2006-12-14 08:53:47 +00:00
giannozz 6e55c387ee Axel's patch: removal of unused variables, replacement of variable "index"
with a less dangerous "idx" ("index" is an intrinsic: some compilers may
complain, or even do strange things)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3574 c92efa57-630b-4861-b058-cf58834340f0
2006-11-27 15:06:51 +00:00
giannozz ff405e66ec Cleanup in constants: factem => 1/k_boltzmann
Some unused formats removed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3380 c92efa57-630b-4861-b058-cf58834340f0
2006-09-12 17:11:36 +00:00
giannozz 65a7670b85 Minor cleanup of unused variables and of constants
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3202 c92efa57-630b-4861-b058-cf58834340f0
2006-06-23 13:46:13 +00:00
giannozz e6e461d59d terahertz and au_terahertz merged
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3185 c92efa57-630b-4861-b058-cf58834340f0
2006-06-16 10:21:05 +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 e817d7c43c - removed old mpi wrappers reduce.f90, that was used in CP
- more changes for parallelization over images


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2965 c92efa57-630b-4861-b058-cf58834340f0
2006-03-27 17:01:30 +00:00
giannozz 201b68ac9a UMA => AMU everywhere . For people not speaking latin-derived languages
the connection between UMA and Atomic Mass Units is not obvious.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2359 c92efa57-630b-4861-b058-cf58834340f0
2005-10-25 13:08:29 +00:00
sbraccia 7fcbb32dd0 CP: the reciprocal lattice vectors bg were in the wrong units (different from those
used in PW for the same variable). C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2333 c92efa57-630b-4861-b058-cf58834340f0
2005-10-21 15:42:30 +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
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
ballabio a37cc545b2 moved & in continued line to 6th position, ifort9 wants it [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2105 c92efa57-630b-4861-b058-cf58834340f0
2005-08-17 12:59:12 +00:00
sbraccia d6742230b2 Added a routine that initialise the cp code (previously done in cpr). This routine is called by
cpr_loop. This has required some variables previously local to cpr to be moved into modules.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2016 c92efa57-630b-4861-b058-cf58834340f0
2005-07-12 20:08:01 +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
ballabio 74467026df more end subroutine --> end subroutine name [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1873 c92efa57-630b-4861-b058-cf58834340f0
2005-05-18 09:38:45 +00:00
ballabio 315a100b4b more end --> end function [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1869 c92efa57-630b-4861-b058-cf58834340f0
2005-05-17 17:07:57 +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 8bf1d7a48f - more CP/FPMD merging, clean-ups.
- Standard output hopfully made more clear and common between CP/FPMD
 - common CP/FPMD initialization
 - fix for nat checking in cploop


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1775 c92efa57-630b-4861-b058-cf58834340f0
2005-03-30 18:08:01 +00:00
cavazzon b8a7f0bd86 - FPMD/CP90 ionic and electronic nose' thermostat merged
- clean-up


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1763 c92efa57-630b-4861-b058-cf58834340f0
2005-03-26 15:29:07 +00:00
cavazzon ebcbc01dd7 - fix of an odd sintax construct pointed out by alpha compiler
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1708 c92efa57-630b-4861-b058-cf58834340f0
2005-03-14 17:03:35 +00:00
cavazzon ba5d5e7915 - FPMD/CP check and warning andded when cell parameters are specified
multiple times in input file


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1706 c92efa57-630b-4861-b058-cf58834340f0
2005-03-14 14:11:19 +00:00
cavazzon 878a9ebece - more cpv/fpmd merging
- FFT grid (nr1,nr2,nr3 nr1s,nr2s,nr3s) now can be specified in the
  input


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1671 c92efa57-630b-4861-b058-cf58834340f0
2005-03-02 10:03:55 +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
cavazzon 1733abe068 - more CP90/FPMD merging: fft high level driver, iosys, exchange-correlation
- some subroutine shortened and simplyfied to make compilation easy


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1559 c92efa57-630b-4861-b058-cf58834340f0
2005-01-15 10:53:46 +00:00
cavazzon e32ce9b074 - common xc and gga functionals subroutines for all code PW/CP/FPMD
- Few more functionals has been added to file more_functionals.f90
  since in PW BLYP/LSDA were not implemented .
  In the same file, temporary, are stored old CP90 subroutines
  for testing purpose ( in CP functionals were vectorized!! ).
  The small program PP/xctest.f90 can be used to make a comparative
  test between new and old routines, in case someone suspect a problem
  there.
- buon anno!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1533 c92efa57-630b-4861-b058-cf58834340f0
2004-12-31 11:14:32 +00:00
cavazzon 87700b86cc - some more changes relative to FPMD files
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1481 c92efa57-630b-4861-b058-cf58834340f0
2004-11-25 15:43:24 +00:00
cavazzon 242e9454bf - more merging CP/FPMD
- cleanups


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1412 c92efa57-630b-4861-b058-cf58834340f0
2004-11-01 16:43:29 +00:00
cavazzon 95f13e2304 - fix suggested by PG in subroutines Modules/cell_base.f90
and CPV/wf.f90
- More mergings between CPV and FPMD (init, grids setup)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1340 c92efa57-630b-4861-b058-cf58834340f0
2004-09-27 10:05:50 +00:00
cavazzon 5e5b2e6139 - same cell dynamics subroutines used in CP and FPMD
- input pressure in GPa ( both code )
- Output stress in GPa ( both code )
- Output layout made more similar:
  energies, positions, forces, cell
  displayed in the same way
- Zero velocities after a restart implemented in CP
- Nose and damped dynamics for cell implemented
  in FPMD like in CP
carlo


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1260 c92efa57-630b-4861-b058-cf58834340f0
2004-09-13 08:49:06 +00:00
cavazzon 1be2feeb88 - more mergings between CP and FPMD
- initialization (both code uses the same ggen)
- now FPMD initializes the small-boxes too (required for untrasoft pseudo)
- print out


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1186 c92efa57-630b-4861-b058-cf58834340f0
2004-08-27 10:20:42 +00:00
cavazzon e163a007ef - further merging of low level subroutine between FPMD and CP
( cell_move in Module/cell_base.f90 )
- More input parameters check in Module/read_namelists
- For CP, restart file is saved in working directory like in FPMD
  and not in output_dir where MD data are saved, this is because
  usually one keep MD trajectories in home dir.
- added pseudopotential for wannier dynamics example
- added Wannier postprocessing (from Manu Sharma )
- fixed a small bug for FPMD and 'diis' electron dynamics


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1083 c92efa57-630b-4861-b058-cf58834340f0
2004-07-19 17:19:16 +00:00
cavazzon abb62bd0e5 - added module cp_mass (for car-parrinello electronic mass)
- cpr.f90 lot of staff moved to subroutines


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1073 c92efa57-630b-4861-b058-cf58834340f0
2004-07-15 10:48:54 +00:00
giannozz e277741dc8 First steps in USPP merge between CP and PW:
PW: nqfm => nqfx, some us variables and aainit moved to Modules/uspp.f90 (new)
CP: lx, lqx => lqmax, lix => lmaxx+1, variables moved, aainit not yet merged
invmat moved to flib/ and merged with invmat3 of CP/FPMD,
rndm and ylmr2 moved to flib/ in rranf.f90


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@793 c92efa57-630b-4861-b058-cf58834340f0
2004-04-13 21:49:51 +00:00
giannozz 5b74c1aa22 Cleanup: integer conversion to real performed with "dble" everywhere
minor things here and there


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@765 c92efa57-630b-4861-b058-cf58834340f0
2004-04-03 13:24:17 +00:00
cavazzon dabaf5d817 celldm/alat/at input parameters in FPMD/CPV read
and set as in PW .


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@748 c92efa57-630b-4861-b058-cf58834340f0
2004-03-27 14:15:43 +00:00
cavazzon 744fb1cbb2 - neb basic routines moved to Modules, to be shared among codes
- basic cell and ionic variables moved frpm pwcom to
  cell_base and ions_base .
  cell_base modules and ions_base modules should be initialized
  through the use of cell_base_init and ions_base_init, this after
  having read the namelists and the cards .
  IN THE FUTURE NONE OF THE VARIABLES IN THE BASIC MODULES SHOULD
  BE SET IN THE MAIN CODES, BUT THROUGH A CALL TO SOME INIT
  FUNCTIONS CONTAINED IN THE BASIC MODULE ITSELF.
  THE IDEA IS THAT THE BASIC VARIABLES SHOULD BE USED AS
  READ-ONLY. UNFORTUNATELY IN F90 THERE IS NO POSSIBILITY
  TO SET A READ ONLY ATTRIBUTE.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@702 c92efa57-630b-4861-b058-cf58834340f0
2004-03-08 08:43:25 +00:00
cavazzon 6ca8b2ce58 more merging, "only" keyword added to many "use"
io_base: strings with the name of the data sections added to the
restart file, this will allow R/W of data sections in any order


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@257 c92efa57-630b-4861-b058-cf58834340f0
2003-07-06 21:47:17 +00:00
cavazzon de9a865b6c subroutine latgen and volume moved to flib
and used by all codes,
as common latgen it has been used the one contained in CPV,
sice this version solve some problems related to left-handed cell

new common module ions_base with ionic basic variables


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@247 c92efa57-630b-4861-b058-cf58834340f0
2003-06-25 12:43:25 +00:00
cavazzon 21187430a4 More common modules for grid dimensioning,
recips.f90 moved to flib and used by all codes


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@245 c92efa57-630b-4861-b058-cf58834340f0
2003-06-24 21:38:49 +00:00
cavazzon 1491227547 more merging, recvecs module
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@239 c92efa57-630b-4861-b058-cf58834340f0
2003-06-16 10:41:12 +00:00
cavazzon daad304857 - Cleanup
- similar subroutines and variables merged together


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@223 c92efa57-630b-4861-b058-cf58834340f0
2003-06-02 20:55:14 +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
cavazzon 6485045722 1) directory flib now contains only commons general pourpose subroutines,
all FPMD related subs moved back to FPMD directory.
2) All Make.fpmd... merged with Make.cp... and removed.
3) "use parameter .."  added to all cft_3 subroutines .
4) hpsort.f90 erf.f90 simpson.f90 moved to flib .

everything seem to compile fine,
at least on IBM
carlo


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@67 c92efa57-630b-4861-b058-cf58834340f0
2003-02-13 23:10:25 +00:00
cavazzon aa8d833a4f - new common module "cell_base.f90" containing basic
types and subroutines related to the simulation cell

carlo


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@63 c92efa57-630b-4861-b058-cf58834340f0
2003-02-11 23:19:35 +00:00