~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/bin/ccresponse/init_X.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2006-09-10 14:01:33 UTC
  • Revision ID: james.westby@ubuntu.com-20060910140133-ib2j86trekykfsfv
Tags: upstream-3.2.3
ImportĀ upstreamĀ versionĀ 3.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <string.h>
 
3
#include <libdpd/dpd.h>
 
4
#define EXTERN
 
5
#include "globals.h"
 
6
 
 
7
void denom1(dpdfile2 *X1, double omega);
 
8
void denom2(dpdbuf4 *X2, double omega);
 
9
void local_filter_T1(dpdfile2 *T1, double omega);
 
10
void local_filter_T2(dpdbuf4 *T2, double omega);
 
11
 
 
12
void init_X(char *pert, char *cart, int irrep, double omega)
 
13
{
 
14
  char lbl[32];
 
15
  dpdfile2 mu1, X1, FAE, FMI;
 
16
  dpdbuf4 X2, mu2;
 
17
 
 
18
  sprintf(lbl, "%sBAR_%1s_IA", pert, cart);
 
19
  dpd_file2_init(&mu1, CC_OEI, irrep, 0, 1, lbl);
 
20
  sprintf(lbl, "X_%s_%1s_IA (%5.3f)", pert, cart, omega);
 
21
  dpd_file2_copy(&mu1, CC_OEI, lbl);
 
22
  dpd_file2_close(&mu1);
 
23
 
 
24
  sprintf(lbl, "X_%s_%1s_IA (%5.3f)", pert, cart, omega);
 
25
  dpd_file2_init(&X1, CC_OEI, irrep, 0, 1, lbl);
 
26
  if(params.local && local.filter_singles) local_filter_T1(&X1, omega);
 
27
  else denom1(&X1, omega);
 
28
  dpd_file2_close(&X1);
 
29
 
 
30
  sprintf(lbl, "%sBAR_%1s_IjAb", pert, cart);
 
31
  dpd_buf4_init(&mu2, CC_LR, irrep, 0, 5, 0, 5, 0, lbl);
 
32
  sprintf(lbl, "X_%s_%1s_IjAb (%5.3f)", pert, cart, omega);
 
33
  dpd_buf4_copy(&mu2, CC_LR, lbl);
 
34
  dpd_buf4_close(&mu2);
 
35
 
 
36
  sprintf(lbl, "X_%s_%1s_IjAb (%5.3f)", pert, cart, omega);
 
37
  dpd_buf4_init(&X2, CC_LR, irrep, 0, 5, 0, 5, 0, lbl);
 
38
  if(params.local) local_filter_T2(&X2, omega);
 
39
  else denom2(&X2, omega);
 
40
  dpd_buf4_close(&X2);
 
41
}