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

« back to all changes in this revision

Viewing changes to src/nwdft/rt_tddft/openshell/zfock_os_core_scalarzora.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
C
 
2
C     zfock_os_core_scalarzora.F
 
3
C
 
4
C     Calculates 1 electron scalar ZORA part (Hcore) of a openn shell
 
5
C     complex Fock matrix.  Note that input is the real part of the
 
6
C     density matrix, and output is real part of the Fock matrix.
 
7
C
 
8
      subroutine zfock_os_core_scalarzora (params, g_densre, g_fcore)
 
9
      implicit none
 
10
 
 
11
#include "rtdb.fh"
 
12
#include "bas.fh"
 
13
#include "errquit.fh"
 
14
#include "mafdecls.fh"
 
15
#include "stdio.fh"
 
16
#include "cdft.fh"
 
17
#include "global.fh"
 
18
#include "zora.fh"
 
19
#include "rt_tddft.fh"
 
20
 
 
21
      
 
22
C     == Inputs ==
 
23
      type(rt_params_t), intent(in) :: params
 
24
      integer, intent(in)           :: g_densre(2)
 
25
 
 
26
      
 
27
C     == Outputs ==
 
28
      integer, intent(in)           :: g_fcore(2) 
 
29
 
 
30
      
 
31
C     == Parameters ==
 
32
      character(*), parameter  :: pname = "zfock_os_core_scalarzora: "
 
33
 
 
34
      
 
35
C     == Variables ==
 
36
      double precision elapsed
 
37
      integer g_sf(2)           ! ZORA scalar arrays; real nbf_ao x nbf_ao
 
38
      integer g_scale_sf(2)     ! ZORA scalar energy scaling arrays; real nbf_ao x nbf_ao
 
39
      character*255 fname
 
40
 
 
41
 
 
42
C     == External ==
 
43
      logical, external ::  dft_zora_read
 
44
 
 
45
 
 
46
      if (.not. do_zora)
 
47
     $     call errquit (pname//"called without ZORA active",0,0)
 
48
 
 
49
      call rt_tddft_os_confirm (params)
 
50
 
 
51
      if (params%prof) call prof_start (elapsed)
 
52
 
 
53
C
 
54
C     Allocation
 
55
C
 
56
      if (.not. ga_create(mt_dbl, params%nbf_ao, params%nbf_ao,
 
57
     $     "sf(1)", 0, 0, g_sf(1)))
 
58
     $     call errquit (pname//"couldnt make g_sf(1)", 0, GA_ERR)
 
59
      if (.not. ga_create(mt_dbl, params%nbf_ao, params%nbf_ao,
 
60
     $     "sf(2)", 0, 0, g_sf(2)))
 
61
     $     call errquit (pname//"couldnt make g_sf(2)", 0, GA_ERR)
 
62
 
 
63
      if (.not. ga_create(mt_dbl, params%nbf_ao, params%nbf_ao,
 
64
     $     "scale sf(1)", 0, 0, g_scale_sf(1)))
 
65
     $     call errquit (pname//"couldnt make g_sf(1)", 0, GA_ERR)
 
66
      if (.not. ga_create(mt_dbl, params%nbf_ao, params%nbf_ao,
 
67
     $     "scale sf(2)", 0, 0, g_scale_sf(2)))
 
68
     $     call errquit (pname//"couldnt make g_sf(2)", 0, GA_ERR)
 
69
 
 
70
 
 
71
C
 
72
C     Get ZORA data from file.  If we can't read it, quit--rebuilding it
 
73
C     on the fly is far too slow.  We only use g_so and g_sf, as the
 
74
C     scaling arrays are only applied to the eigenvalues in the SCF.
 
75
C     
 
76
C     Note: this grabs the spin-orbit parts too, but we dont add them of
 
77
C     course.  This is done separately in the spin-orbit code.
 
78
C
 
79
      call util_file_name ("zora_sf", .false., .false., fname)
 
80
 
 
81
      call ga_zero (g_sf(1))
 
82
      call ga_zero (g_sf(2))
 
83
      call ga_zero (g_scale_sf(1))
 
84
      call ga_zero (g_scale_sf(2))
 
85
 
 
86
      if (ga_nodeid().eq.0)
 
87
     $     write (luout, *) pname//"todo: read in once only"
 
88
 
 
89
 
 
90
C     2 for ipol = 2 
 
91
      if (.not.dft_zora_read(fname, params%nbf_ao, 2,
 
92
     $     params%nbf_ao, mult, g_sf, g_scale_sf))
 
93
     $     call errquit (pname//
 
94
     $     "failed to read scalar ZORA data from: "//trim(fname), 0, 0)
 
95
      
 
96
      call ga_zero (g_fcore(1))
 
97
      call ga_zero (g_fcore(2))
 
98
      call ga_add (1d0, g_fcore(1), 1d0, g_sf(1), g_fcore(1))
 
99
      call ga_add (1d0, g_fcore(2), 1d0, g_sf(2), g_fcore(2))
 
100
 
 
101
      if (.not. ga_destroy (g_sf(1)))
 
102
     $     call errquit (pname//"failed to destroy g_sf(1)", 0, 0)
 
103
      if (.not. ga_destroy (g_sf(2)))
 
104
     $     call errquit (pname//"failed to destroy g_sf(1)", 0, 0)
 
105
 
 
106
      if (.not. ga_destroy (g_scale_sf(1)))
 
107
     $     call errquit (pname//"failed to destroy g_scale_sf(1)", 0, 0)
 
108
      if (.not. ga_destroy (g_scale_sf(2)))
 
109
     $     call errquit (pname//"failed to destroy g_scale_sf(1)", 0, 0)
 
110
 
 
111
      if (params%prof)
 
112
     $     call prof_end (elapsed, "Fock CS core scalar ZORA")
 
113
      
 
114
      end subroutine