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

« back to all changes in this revision

Viewing changes to src/bin/ccresponse/init_X.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 <string.h>
3
 
#include <libdpd/dpd.h>
4
 
#include <libpsio/psio.h>
5
 
#define EXTERN
6
 
#include "globals.h"
7
 
 
8
 
void denom1(dpdfile2 *X1, double omega);
9
 
void denom2(dpdbuf4 *X2, double omega);
10
 
void local_filter_T1(dpdfile2 *T1, double omega);
11
 
void local_filter_T2(dpdbuf4 *T2, double omega);
12
 
 
13
 
void init_X(char *pert, char *cart, int irrep, double omega)
14
 
{
15
 
  char lbl[32];
16
 
  dpdfile2 mu1, X1, FAE, FMI;
17
 
  dpdbuf4 X2, mu2;
18
 
 
19
 
  sprintf(lbl, "%sBAR_%1s_IA", pert, cart);
20
 
  dpd_file2_init(&mu1, CC_OEI, irrep, 0, 1, lbl);
21
 
  sprintf(lbl, "X_%s_%1s_IA (%5.3f)", pert, cart, omega);
22
 
  if(!params.restart || !psio_tocscan(CC_OEI, lbl)) {
23
 
    dpd_file2_copy(&mu1, CC_OEI, lbl);
24
 
    dpd_file2_init(&X1, CC_OEI, irrep, 0, 1, lbl);
25
 
    if(params.local && local.filter_singles) local_filter_T1(&X1, omega);
26
 
    else denom1(&X1, omega);
27
 
    dpd_file2_close(&X1);
28
 
  }
29
 
  else fprintf(outfile, "\tUsing existing %s amplitudes.\n", lbl);
30
 
  dpd_file2_close(&mu1);
31
 
 
32
 
  sprintf(lbl, "%sBAR_%1s_IjAb", pert, cart);
33
 
  dpd_buf4_init(&mu2, CC_LR, irrep, 0, 5, 0, 5, 0, lbl);
34
 
  sprintf(lbl, "X_%s_%1s_IjAb (%5.3f)", pert, cart, omega);
35
 
  if(!params.restart || !psio_tocscan(CC_LR, lbl)) {
36
 
    dpd_buf4_copy(&mu2, CC_LR, lbl);
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
 
  }
42
 
  else fprintf(outfile, "\tUsing existing %s amplitudes.\n", lbl);
43
 
  dpd_buf4_close(&mu2);
44
 
}