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

« back to all changes in this revision

Viewing changes to src/nwdft/xc/xc_camxlsd.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:
13
13
     &                       Amat2, nq, ipol, Ex, qwght, ldew, func)
14
14
#endif
15
15
c
16
 
C$Id: xc_camxlsd.F 20247 2011-04-28 18:58:49Z d3y133 $
 
16
C$Id: xc_camxlsd.F 23681 2013-03-03 03:46:09Z d3y133 $
17
17
c
18
18
      Implicit none
19
19
#include "errquit.fh"
70
70
            if (rho(n,1).gt.tol_rho)then
71
71
             rho13=rho(n,1)**one_third
72
72
             Etmp = rho(n,1)*rho13*P2*fac
73
 
             if(ldew)func(n) = func(n) + rho(n,1)*rho13*fac*P2
74
73
             Atmp = rho13*P1*fac
75
74
             Ctmp = 0.d0
76
75
             call xc_att_xc(rho(n,1),ipol,Etmp,Atmp,Ctmp)
 
76
             if(ldew)func(n) = func(n) + Etmp
 
77
             Ex = Ex + qwght(n)*Etmp
 
78
             Amat(n,1) = Amat(n,1) + Atmp
77
79
#ifdef SECOND_DERIV
78
80
             A2tmp = (rho13/rho(n,1))*2.0d0*one_third*P1*fac
79
81
             C2tmp = 0.d0
82
84
     &           C2tmp,C3tmp)
83
85
             Amat2(n,D2_RA_RA) = Amat2(n,D2_RA_RA) + A2tmp
84
86
#endif
85
 
             Ex = Ex + qwght(n)*Etmp
86
 
             Amat(n,1) = Amat(n,1) + Atmp
87
87
            endif
88
88
   10    continue
89
89
c
93
93
c
94
94
         do 20 n = 1,nq
95
95
           if (rho(n,1).gt.tol_rho)then
96
 
             rho32=0.0d0
97
 
             rho33=0.0d0
98
 
             if (rho(n,2).gt.tol_rho) rho32=rho(n,2)**one_third
99
 
             if (rho(n,3).gt.tol_rho) rho33=rho(n,3)**one_third
 
96
             rho32=max(rho(n,2),0.0d0)**one_third
 
97
             rho33=max(rho(n,3),0.0d0)**one_third
100
98
c
101
99
             Etmp = rho32*rho(n,2)*P4*fac
102
100
             Atmp = P3*rho32*fac
104
102
             call xc_att_xc(rho(n,2),ipol,Etmp,Atmp,Ctmp)
105
103
             Amat(n,1) = Amat(n,1) + Atmp
106
104
             Ex = Ex + qwght(n)*Etmp
 
105
             if(ldew)func(n) = func(n) + Etmp
107
106
#ifdef SECOND_DERIV
108
107
             A2tmp = 0.d0
109
108
             C2tmp = 0.d0
122
121
             call xc_att_xc(rho(n,3),ipol,Etmp,Atmp,Ctmp)
123
122
             Amat(n,2) = Amat(n,2) + Atmp
124
123
             Ex = Ex + qwght(n)*Etmp
 
124
             if(ldew)func(n) = func(n) + Etmp
125
125
#ifdef SECOND_DERIV
126
126
             A2tmp = 0.d0
127
127
             C2tmp = 0.d0
134
134
             Amat2(n,D2_RB_RB) = Amat2(n,D2_RB_RB) + A2tmp
135
135
#endif
136
136
c
137
 
             if (ldew)func(n) = func(n) + ( rho32*rho(n,2) + 
138
 
     &                                      rho33*rho(n,3)   )*P4*fac
 
137
c            if (ldew)func(n) = func(n) + ( rho32*rho(n,2) + 
 
138
c    &                                      rho33*rho(n,3)   )*P4*fac
139
139
            endif
140
140
   20    continue
141
141