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

« back to all changes in this revision

Viewing changes to src/bin/cints/Default_Deriv1/deriv1.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<libipv1/ip_lib.h>
 
3
#include<math.h>
 
4
#include<libciomr/libciomr.h>
 
5
#include<libint/libint.h>
 
6
#include<pthread.h>
 
7
 
 
8
#include"defines.h"
 
9
#define EXTERN
 
10
#include"global.h"
 
11
#include"moinfo.h"
 
12
#include"compute_scf_opdm.h"
 
13
#include"read_gen_opdm.h"
 
14
#include"enuc_deriv1.h"
 
15
#include"oe_deriv1.h"
 
16
#include"te_deriv1_scf.h"
 
17
#include"te_deriv1_corr.h"
 
18
#include"symmetrize_deriv1.h"
 
19
#include"rot_inv.h"
 
20
#include"file11.h"
 
21
 
 
22
pthread_mutex_t deriv1_mutex;
 
23
double **grad_te;
 
24
 
 
25
void deriv1()
 
26
{
 
27
  /*--- Gradient in the canonical frame ---*/
 
28
  Grad = block_matrix(Molecule.num_atoms,3);
 
29
 
 
30
  if (Molecule.num_atoms != 0) {
 
31
    if (!strcmp(UserOptions.wfn,"SCF")) {
 
32
      init_moinfo();
 
33
      compute_scf_opdm();
 
34
    }
 
35
    else
 
36
      read_gen_opdm();
 
37
    enuc_deriv1();
 
38
    oe_deriv1();
 
39
    if (!strcmp(UserOptions.wfn,"SCF"))
 
40
      te_deriv1_scf();
 
41
    else
 
42
      te_deriv1_corr();
 
43
    symmetrize_deriv1();
 
44
    check_rot_inv();
 
45
    if (!strcmp(UserOptions.wfn,"SCF"))
 
46
      cleanup_moinfo();
 
47
  }
 
48
 
 
49
  file11();
 
50
  chkpt_wt_grad(Grad[0]);
 
51
  free_block(Grad);
 
52
 
 
53
  return;
 
54
}
 
55