~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/nwdft/xc/xc_perdew86.F

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
     ,     qwght, ldew, ffunc)
9
9
#endif
10
10
c
11
 
c$Id: xc_perdew86.F 20247 2011-04-28 18:58:49Z d3y133 $
 
11
c$Id: xc_perdew86.F 22803 2012-08-30 05:26:01Z niri $
12
12
c
13
13
      implicit none
14
14
c
232
232
            d1d(1) = adp*d1z(1)
233
233
            d1d(2) = adp*d1z(2)
234
234
#ifdef SECOND_DERIV
235
 
            d2dt12 = FIVE3*TWO3*0.25d0*(
 
235
            if ((1.d0-zeta).lt.tol_rho) then
 
236
              d2dt12 = FIVE3*TWO3*0.25d0*(((ONE+zeta)*.5d0)**(-ONE3))
 
237
            else if ((1.d0+zeta).lt.tol_rho) then
 
238
              d2dt12 = FIVE3*TWO3*0.25d0*(((ONE-zeta)*.5d0)**(-ONE3))
 
239
            else
 
240
              d2dt12 = FIVE3*TWO3*0.25d0*(
236
241
     &         ((ONE+zeta)*.5d0)**(-ONE3) + ((ONE-zeta)*.5d0)**(-ONE3) )
 
242
            end if
 
243
c
237
244
            dpp =-0.5d0*adp/dt12*d1dt12
238
245
     &        + 2.d0**(-TWO3)*d2dt12/dsqrt(dt12)
239
246
            d2d(1) = dpp*d1z(1)*d1z(1) + adp*d2z(1)
422
429
            d1rs = -ONE3*rs/rhoval
423
430
#ifdef SECOND_DERIV
424
431
            d2rs = -FOUR3*d1rs/rhoval
425
 
            d2fz = d2fzeta(zeta)
 
432
            if ((1.d0-zeta).lt.tol_rho) then
 
433
              d2fz = (1.d0+zeta)**(-TWO3)
 
434
            else if ((1.d0+zeta).lt.tol_rho) then
 
435
              d2fz = (1.d0-zeta)**(-TWO3)
 
436
            else
 
437
              d2fz = (1.d0+zeta)**(-TWO3) + (1.d0-zeta)**(-TWO3)
 
438
            end if
 
439
            d2fz = d2fz*ONE3*FOUR3/(2.d0**FOUR3-2.d0)
 
440
c
426
441
            rrho2 = 2.d0/(rhoval*rhoval)
427
442
c           1 = aa, 2 = ab, 3 = bb
428
443
            d2zeta(1) =-rrho2*(1.d0-zeta)