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

« back to all changes in this revision

Viewing changes to src/bin/mocube/delta.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
/* * returns values of mos at a grid point, RAK, Nov. 2002
 
2
** hacked from cusp: delta() ** TDC, June 2001
 
3
*/
 
4
 
 
5
#include <stdio.h>
 
6
#include <stdlib.h>
 
7
#include <libipv1/ip_lib.h>
 
8
#include <libciomr/libciomr.h>
 
9
#include <libchkpt/chkpt.h>
 
10
#include <libqt/qt.h>
 
11
#define EXTERN
 
12
#include "mocube.h"
 
13
 
 
14
void compute_phi(double *phi, double x, double y, double z);
 
15
 
 
16
void compute_mos(double *movals, double x, double y, double z,
 
17
    double **scf, double **u)
 
18
{
 
19
  int i, j, nmo, nao;
 
20
  double *phi_ao, *phi_so, *phi_mo, tval;
 
21
 
 
22
  nmo = params.nmo;
 
23
  nao = params.nao;
 
24
 
 
25
  /* setup_delta(); */
 
26
 
 
27
  phi_ao = init_array(nao);  /* AO function values */
 
28
  phi_so = init_array(nmo);  /* SO function values */
 
29
  phi_mo = init_array(nmo);  /* MO function values */
 
30
 
 
31
  compute_phi(phi_ao, x, y, z);
 
32
 
 
33
  /* Transform the basis function values to the MO basis */
 
34
  C_DGEMV('n', nmo, nao, 1.0, &(u[0][0]), nao, &(phi_ao[0]), 1,
 
35
          0.0, &(phi_so[0]), 1);
 
36
 
 
37
  C_DGEMV('t', nmo, nmo, 1.0, &(scf[0][0]), nmo, &(phi_so[0]), 1,
 
38
          0.0, &(phi_mo[0]), 1);
 
39
 
 
40
  free(phi_ao);
 
41
  free(phi_so);
 
42
 
 
43
  for (i=0; i<cube.nmo_to_plot; ++i)
 
44
    movals[i] = phi_mo[ cube.mos_to_plot[i] ];
 
45
 
 
46
  free(phi_mo);
 
47
  return;
 
48
}
 
49