~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/bin/ccdensity/add_ref.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <stdio.h>
2
 
#include <libiwl/iwl.h>
3
 
#define EXTERN
4
 
#include "globals.h"
5
 
 
6
 
void add_ref(struct iwlbuf *OutBuf)
7
 
{
8
 
  int i,j;
9
 
  int nfzc, nclsd, nopen;
10
 
 
11
 
  nfzc = moinfo.nfzc;
12
 
  nclsd = moinfo.nclsd;
13
 
  nopen = moinfo.nopen;
14
 
 
15
 
  /*** One-electron component ***/
16
 
 
17
 
  for(i=0; i < (nfzc + nclsd); i++)
18
 
      moinfo.opdm[i][i] += 2.0;
19
 
 
20
 
  for(i=nfzc + nclsd; i < (nfzc + nclsd + nopen); i++)
21
 
      moinfo.opdm[i][i] += 1.0;
22
 
 
23
 
 
24
 
  /*** Two-electron component ***/
25
 
 
26
 
  /* docc-docc */
27
 
  for(i=0; i < (nfzc + nclsd); i++) {
28
 
      iwl_buf_wrt_val(OutBuf, i, i, i, i, 1.0, 0, outfile, 0);
29
 
      for(j=0; j < i; j++) {
30
 
          iwl_buf_wrt_val(OutBuf, i, i, j, j, 2.0, 0, outfile, 0);
31
 
          iwl_buf_wrt_val(OutBuf, i, j, j, i,-1.0, 0, outfile, 0);
32
 
        }
33
 
    }
34
 
 
35
 
  /* socc-docc && socc-socc*/
36
 
  for(i=(nfzc + nclsd); i < (nfzc + nclsd + nopen); i++) {
37
 
      for(j=0; j < (nfzc + nclsd); j++) {
38
 
          iwl_buf_wrt_val(OutBuf, i, i, j, j, 1.0, 0, outfile, 0);
39
 
          iwl_buf_wrt_val(OutBuf, i, j, j, i,-0.5, 0, outfile, 0);
40
 
        }
41
 
      for(j=(nfzc + nclsd); j < i; j++) {
42
 
          iwl_buf_wrt_val(OutBuf, i, i, j, j, 0.5, 0, outfile, 0);
43
 
          iwl_buf_wrt_val(OutBuf, i, j, j, i,-0.5, 0, outfile, 0);
44
 
        }
45
 
    }
46
 
}