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

« back to all changes in this revision

Viewing changes to src/tce/tce_init.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:
1
1
      subroutine tce_init(rtdb)
2
2
c
3
 
c $Id: tce_init.F 21623 2011-12-21 00:13:01Z bert $
 
3
c $Id: tce_init.F 24228 2013-05-16 22:37:56Z bhas990 $
4
4
c
5
5
c     Initialize for many-electron calculations.
6
6
c
22
22
#include "tce_prop.fh"
23
23
#include "tce_restart.fh"
24
24
#include "dra.fh"
 
25
 
 
26
#ifdef MRCC_METHODS
 
27
#include "./mrcc/include/tce_mrcc.fh"
 
28
#endif
 
29
 
25
30
c
26
31
      integer rtdb             ! RTDB handle
27
32
      integer nbf_verify       ! nbf read from movecs_read_header
59
64
      double precision fac,xxx
60
65
      double precision pi
61
66
      parameter(pi = 3.14159265358979323846264338327950288419D0)
 
67
#ifdef MRCC_METHODS
 
68
ckbn mrcc-r-1 -3
 
69
      integer imrcc
 
70
#endif
 
71
 
62
72
c
63
73
c
64
74
      nodezero=(ga_nodeid().eq.0)
129
139
     1    call errquit('tce_init: failed to read nocc',0,RTDB_ERR)
130
140
        if (.not.rtdb_get(rtdb,'dft:mult',mt_int,1,mult))
131
141
     1    call errquit('tce_init: failed to read mult',0,RTDB_ERR)
 
142
c *** debug-kk ***
 
143
        if(nodezero) then
 
144
         write(6,*)'ipol= ',ipol
 
145
         call util_flush(6)
 
146
        end if
 
147
c ****************
132
148
        if (ipol.eq.1) then
133
149
          restricted = .true.
134
150
        else
135
151
          restricted = .false.
136
152
        endif
 
153
c *** debug-kk ***
 
154
        if(nodezero) then
 
155
         write(6,*)'restricter= ',restricted
 
156
         write(6,*)'ROHF= ',rohf
 
157
         call util_flush(6)
 
158
        end if
 
159
c ****************
137
160
      else if (reference.eq.1) then
138
161
        if (.not.rtdb_get(rtdb,'scf:nclosed',mt_int,1,nclosed))
139
162
     1    call errquit('tce_init: failed to read nclosed',0,RTDB_ERR)
157
180
          rohf = .true.
158
181
          ipol = 2
159
182
        endif
 
183
#ifdef MRCC_METHODS
 
184
ckbn mrcc-r-1 -3
 
185
        if(.not.rtdb_get(rtdb,'tce:mrcc',mt_int,1,imrcc)) imrcc = 0
 
186
        if(imrcc .eq. 1) then
 
187
         if (hftype.eq.'UHF') then
 
188
          call errquit(
 
189
     +     'tce_init: tce mrcc works only with rhf and rohf',0,CALC_ERR)
 
190
         endif
 
191
c         if(nodezero) then
 
192
c          write(LuOut,'(A,I10,A,I10,A,I10,A,I10)') "Bnocc(1) ",nocc(1),
 
193
c     +     " nocc(2) ",nocc(2)," mult ",mult," nopen ",nopen
 
194
c         endif
 
195
         if(nodezero) write(LuOut,"('WARNING!!!!!!!!',
 
196
     1     ' ROHF FOR MRCC CODE. OCC HAS BEEN CHANGED.')")
 
197
c        nocc(1) = nclosed+(nopen/2)
 
198
c        nocc(2) = nocc(1)
 
199
c        mult = 1
 
200
         nocc(1) = nclosed + nopen
 
201
         nocc(2) = nclosed
 
202
         mult = nopen + 1
 
203
ckbn Check whether number of electrons is even
 
204
         if( mod((nocc(1) + nocc(2)),2)  .ne. 0) 
 
205
     +    call errquit
 
206
     +   ('tce_init: Current tce mrcc works only with even number of e'
 
207
     +    ,0,CALC_ERR)
 
208
 
 
209
         if(nodezero) then
 
210
          write(LuOut,'(A,A,I10,A,I10,A,I10,A,I10)') 
 
211
     +     "Occupation",
 
212
     +     " nocc(1) ",nocc(1),
 
213
     +     " nocc(2) ",nocc(2)," mult ",mult," nopen ",nopen
 
214
         endif
 
215
         restricted = .false.
 
216
         ipol=2
 
217
         rohf = .true.
 
218
c        if(nodezero)
 
219
c     +   write(LuOut,*)"nocc ",nocc(1),nocc(2),mult,restricted,ipol,rohf
 
220
         call util_flush(LuOut)
 
221
        endif
 
222
#endif
160
223
      endif
161
224
c     ---------
162
225
c     TCE input
1158
1221
     2      (module.ne.'umbpt4'))
1159
1222
     3    call errquit('tce_init: umbpt/umbpt4 module overridden',0,
1160
1223
     4    UNKNOWN_ERR)
 
1224
#ifdef MRCC_METHODS
 
1225
ckbn mrcc-r-1 -3
 
1226
      else if (model.eq.'bwccsd') then
 
1227
        ctype=
 
1228
     1    'State Specific Multireference Brillouin-Wigner CCSD theory'
 
1229
      else if (model.eq.'mkccsd') then
 
1230
        ctype='State Specific Multireference Mukherjee''s CCSD theory'
 
1231
#endif
1161
1232
      else
1162
1233
        call errquit('tce_init: unknown theory',0,CAPMIS_ERR)
1163
1234
      endif