~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/nwdft/rt_tddft/openshell/zfock_os_coulcdfit.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_coulcdfit.F
 
3
C
 
4
C     Computes the Coulomb part of the complex open shell Fock Matrix
 
5
C     via charge density fitting.
 
6
C
 
7
      subroutine zfock_os_coulcdfit (params, g_densre, Ecoul, g_vc)
 
8
      implicit none
 
9
 
 
10
#include "errquit.fh"
 
11
#include "mafdecls.fh"
 
12
#include "stdio.fh"
 
13
#include "global.fh"
 
14
#include "msgids.fh"
 
15
#include "util.fh"
 
16
#include "cdft.fh"
 
17
#include "matutils.fh"
 
18
#include "rt_tddft.fh"
 
19
 
 
20
C     == Inputs ==
 
21
      type(rt_params_t), intent(in) :: params
 
22
      integer, intent(in)           :: g_densre(2) !alpha, beta
 
23
 
 
24
      
 
25
C     == Ouputs ==
 
26
      double precision, intent(out) :: Ecoul
 
27
      integer, intent(in)           :: g_vc(2)
 
28
 
 
29
      
 
30
C     == Parameters ==
 
31
      character(*), parameter :: pname = "zfock_os_coulcdfit: "
 
32
      integer, parameter      :: iVcoul_opt = 1 !XXX HARDCODED
 
33
 
 
34
 
 
35
C     == Variables ==
 
36
      integer lcd_coef, icd_coef
 
37
      double precision elapsed
 
38
      integer g_densre_tot
 
39
 
 
40
      
 
41
C      call rt_tddft_os_confirm (params)
 
42
 
 
43
      
 
44
      if (params%prof) call prof_start (elapsed)
 
45
 
 
46
      
 
47
C
 
48
C     Allocations.
 
49
C
 
50
      if (.not.ma_Push_Get (mt_dbl,nbf_cd,"cd_coef",lcd_coef, icd_coef))
 
51
     $     call errquit (pname//"cannot allocate cd_coef", 0, MA_ERR)
 
52
 
 
53
      if (.not.ga_duplicate (g_densre(1), g_densre_tot, "Ptot"))
 
54
     $     call errquit (pname//"cannot allocate Ptot", 1, GA_ERR)
 
55
 
 
56
 
 
57
C
 
58
C     Compute total dens mat.
 
59
C
 
60
      call ga_add (1d0, g_densre(1), 1d0, g_densre(2), g_densre_tot)
 
61
 
 
62
 
 
63
C
 
64
C     Fit charge density with CD basis.
 
65
C
 
66
      call dft_fitcd (1, dbl_mb(icd_coef), dbl_mb(params%k_3ceri),
 
67
     $     Ecoul, g_densre_tot, params%ntotel, params%n_batch,
 
68
     $     params%n3c_int, int_mb(params%k_3cwhat), params%n3c_dbl,
 
69
     $     params%iwhat_max, params%n_semi_bufs, params%fd,
 
70
     $     params%iolgc, params%natoms, .false., 0d0, .false.)
 
71
 
 
72
      
 
73
C
 
74
C     Compute Vcoul using least squares fitting; store in alpha part.
 
75
C
 
76
      call dft_getvc(dbl_mb(icd_coef), dbl_mb(params%k_3ceri),
 
77
     $     Ecoul, g_vc(1), iVcoul_opt, params%n_batch,
 
78
     $     params%n3c_int, int_mb(params%k_3cwhat), params%n3c_dbl,
 
79
     $     params%iwhat_max, params%n_semi_bufs, params%fd,
 
80
     $     params%iolgc, .false., 1)
 
81
 
 
82
 
 
83
C
 
84
C     Copy to coulomb part of Fock mat to beta part.
 
85
C
 
86
      call ga_copy (g_vc(1), g_vc(2))
 
87
 
 
88
      
 
89
C
 
90
C     Clean up.
 
91
C       
 
92
      if (.not. ma_chop_stack (lcd_coef))
 
93
     $     call errquit (pname//"failed to chop stack", 0, MA_ERR)
 
94
 
 
95
      if (.not.ga_destroy (g_densre_tot))
 
96
     $     call errquit (pname//"cannot destroy Ptot", 1, GA_ERR)
 
97
 
 
98
      
 
99
      if (params%prof) call prof_end(elapsed, "Fock OS CD fitting coul")
 
100
 
 
101
      end subroutine
 
102
 
 
103