~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/bin/cclambda/WmbejL2.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
**    (all six contractions are unique for ROHF and UHF orbitals)
32
32
**
33
33
** TDC, July 2002
 
34
**
 
35
** For RHF contractions, we evaluate the contractions as follows:
 
36
**
 
37
** + L(jb,ME) W(IA,ME) + L(jb,me) W(IA,me)                I
 
38
** + L(jA,Me) W(Ib,Me) + L(Ib,mE) W(jA,mE)           II   +   III
 
39
** + L(IA,ME) W(jb,ME) + L(IA,me) W(jb,me)               IV
 
40
**
 
41
** Similar to what we did in ccenergy/WmbejT2.c, the AB L2 terms labelled I and IV
 
42
** above may be written as (apart from index swapping):
 
43
**
 
44
** 1/2 [2 L(jb,ME) - L(jB,Me)] [2 W(me,IA) + W(Me,Ia)] + 1/2 L(jB,Me) W(Me,Ia)
 
45
**
 
46
** Terms II and III are exactly the same as the last term above, apart from the
 
47
** factor of 1/2 and index swapping.  So, for RHF orbitals, we need to evaluate two
 
48
** contractions.
 
49
**
 
50
** TDC, March 2004
 
51
** 
34
52
*/
35
53
 
36
54
void WmbejL2(int L_irr)
38
56
  dpdbuf4 newL2, L2, W, Z, Z2;
39
57
 
40
58
  /* RHS += P(ij)P(ab)Limae * Wjebm */
41
 
  if(params.ref == 0 || params.ref == 1) { /** RHF/ROHF **/
 
59
  if(params.ref == 0) { /** RHF **/
 
60
 
 
61
    dpd_buf4_init(&Z, CC_TMP0, L_irr, 10, 10, 10, 10, 0, "Z(Ib,jA)");
 
62
    dpd_buf4_init(&W, CC_HBAR, 0, 10, 10, 10, 10, 0, "WMbeJ");
 
63
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "LIbjA");
 
64
    dpd_contract444(&W, &L2, &Z, 0, 1, 1, 0);
 
65
    dpd_buf4_close(&L2);
 
66
    dpd_buf4_close(&W);
 
67
    dpd_buf4_sort(&Z, CC_TMP0, psrq, 10, 10, "Z(IA,jb) III");
 
68
    dpd_buf4_close(&Z);
 
69
 
 
70
    dpd_buf4_init(&Z, CC_TMP0, L_irr, 10, 10, 10, 10, 0, "Z(IA,jb) I");
 
71
 
 
72
    dpd_buf4_init(&W, CC_HBAR, 0, 10, 10, 10, 10, 0, "2 W(ME,jb) + W(Me,Jb)");
 
73
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "2 LIAjb - LIbjA");
 
74
    dpd_contract444(&W, &L2, &Z, 0, 1, 0.5, 0);
 
75
    dpd_buf4_close(&L2);
 
76
    dpd_buf4_close(&W);
 
77
 
 
78
    dpd_buf4_init(&Z2, CC_TMP0, L_irr, 10, 10, 10, 10, 0, "Z(Ib,jA)");
 
79
    dpd_buf4_axpy(&Z2, &Z, 0.5);
 
80
    dpd_buf4_close(&Z2);
 
81
 
 
82
    dpd_buf4_init(&Z2, CC_TMP0, L_irr, 10, 10, 10, 10, 0, "Z(IA,jb) III");
 
83
    dpd_buf4_axpy(&Z2, &Z, 1);
 
84
    dpd_buf4_close(&Z2);
 
85
 
 
86
    dpd_buf4_sort_axpy(&Z, CC_LAMBDA, prqs, 0, 5, "New LIjAb", 1);
 
87
    dpd_buf4_sort_axpy(&Z, CC_LAMBDA, rpsq, 0, 5, "New LIjAb", 1);
 
88
    dpd_buf4_close(&Z);
 
89
 
 
90
  }
 
91
  else if(params.ref == 1) { /** ROHF **/
42
92
 
43
93
    dpd_buf4_init(&Z, CC_TMP0, L_irr, 10, 10, 10, 10, 0, "Z(IA,JB)");
44
94
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "LIAJB");