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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/gfutex/examples/scf/oneel.C

  • 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
#include <ga.h>
 
2
 
 
3
#include "cscc.h"
 
4
#include "scf.h"
 
5
#include "oneel.h"
 
6
 
 
7
void oneel(double schwmax, double *eone, int nproc)
 
8
{
 
9
  int lo[2], hi[2], i, j, iloc, jloc, ld;
 
10
  double work[ichunk][ichunk],tfock[ichunk][ichunk];
 
11
  int dotask;
 
12
 
 
13
  //     fill in the one-electron part of the fock matrix and;
 
14
  //     compute the one-electron energy contribution;
 
15
 
 
16
  GA_Zero(g_counter);
 
17
  dotask = next_chunk(lo, hi);
 
18
  ld = ichunk;
 
19
  while (dotask) {
 
20
    NGA_Get(g_schwarz, lo, hi, work, &ld);
 
21
 
 
22
    for (i = lo[0];i <= hi[0];i++) {
 
23
      iloc = i - lo[0];
 
24
      for (j = lo[1]; j <= hi[1]; j++) {
 
25
        jloc = j - lo[1];
 
26
 
 
27
        tfock[iloc][jloc] = 0.00;
 
28
        if ((work[iloc][jloc] * schwmax) > tol2e) {
 
29
          tfock[iloc][jloc] = h(i, j);
 
30
        }
 
31
      }
 
32
    }
 
33
    NGA_Put(g_fock, lo, hi, tfock, &ld);
 
34
 
 
35
    dotask = next_chunk(lo, hi);
 
36
  }
 
37
  *eone = 0.50 * contract_matrices(g_fock, g_dens);
 
38
} // oneel