~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

Viewing changes to src/bin/ccdensity/fold.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
 
#define EXTERN
2
 
#include "globals.h"
3
 
 
4
 
/* FOLD(): Fold the Fock matrix contributions to the energy (or energy
5
 
** derivative) into the two-particle density matrix.  Here we are
6
 
** trying to convert from an energy expression of the form:
7
 
**
8
 
** E = sum_pq Dpq fpq + 1/4 sum_pqrs Gpqrs <pq||rs>
9
 
**
10
 
** to the form:
11
 
**
12
 
** E = sum_pq Dpq hpq + 1/4 sum_pqrs Gpqrs <pq||rs>
13
 
**
14
 
** We do this by shifting some one-particle density matrix components
15
 
** into appropriate two-particle density matrix components:
16
 
**
17
 
** G'pmrm = Dpr + 4 * Gpmrm
18
 
**
19
 
** One problem is that we need to make sure the resulting density,
20
 
** G'pqrs, is still antisymmetric to permutation of p and q or r and
21
 
** s.  So, for example, for the Gimkm component we compute:
22
 
**
23
 
** G'pmrm = Dpr + Gpmrm
24
 
** G'mprm = Dpr - Gmprm
25
 
** G'pmmr = Dpr - Gpmmr
26
 
** G'mpmr = Dpr + Gmpmr
27
 
** */
28
 
 
29
 
void fold_ROHF(struct RHO_Params rho_params);
30
 
void fold_UHF(struct RHO_Params rho_params);
31
 
 
32
 
void fold(struct RHO_Params rho_params)
33
 
{
34
 
  if(params.ref == 0 || params.ref == 1) fold_ROHF(rho_params);
35
 
  else if(params.ref == 2) fold_UHF(rho_params);
36
 
}