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

« back to all changes in this revision

Viewing changes to src/bin/cscf/dmat_2.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
 
/* $Log$
2
 
 * Revision 1.1  2000/02/04 22:52:29  evaleev
3
 
 * Initial revision
4
 
 *
5
 
/* Revision 1.2  1999/08/17 19:04:14  evaleev
6
 
/* Changed the default symmetric orthogonalization to the canonical
7
 
/* orthogonalization. Now, if near-linear dependencies in the basis are found,
8
 
/* eigenvectors of the overlap matrix with eigenvalues less than 1E-6 will be
9
 
/* left out. This will lead to num_mo != num_so, i.e. SCF eigenvector is no
10
 
/* longer a square matrix. Had to rework some routines in libfile30, and add some.
11
 
/* The progrem prints out a warning if near-linear dependencies are found. TRANSQT
12
 
/* and a whole bunch of other codes has to be fixed to work with such basis sets.
13
 
/*
14
 
/* Revision 1.1.1.1  1999/04/12 16:59:26  evaleev
15
 
/* Added a version of CSCF that can work with CINTS.
16
 
/* -Ed
17
 
 * */
18
 
 
19
 
static char *rcsid = "$Id: dmat_2.c 2 2000-02-04 22:50:39Z evaleev $";
20
 
 
21
 
#define EXTERN
22
 
#include "includes.h"
23
 
#include "common.h"
24
 
 
25
 
void dmat_2(opblk)
26
 
   int opblk;
27
 
 
28
 
{
29
 
   int i,j,k,l,ij,n;
30
 
   int ndocc;
31
 
   double ptempc,ctmp;
32
 
   struct symm *s;
33
 
 
34
 
   for (l=0; l < num_ir ; l++) {
35
 
      s = &scf_info[l];
36
 
      if (n=s->num_so) {
37
 
         ndocc = s->nclosed;
38
 
         if (l == opblk) ndocc++;
39
 
         
40
 
         ij=0;
41
 
         for (i=0; i < n ; i++) {
42
 
            for (j=0; j < i; j++,ij++) {
43
 
               ptempc=0.0;
44
 
               for (k=0; k < ndocc ; k++) {
45
 
                  ptempc += 4.0*s->cmat[i][k]*s->cmat[j][k];
46
 
                  }
47
 
               if(opblk==opblk1) s->pmato2[ij] = ptempc;
48
 
               else s->pmat2[ij] = ptempc;
49
 
               }
50
 
            ptempc=0.0;
51
 
            for (k=0; k < ndocc ; k++) {
52
 
               ctmp=s->cmat[i][k];
53
 
               ptempc += 2.0*ctmp*ctmp;
54
 
               }
55
 
            if(opblk==opblk1) s->pmato2[ij] = ptempc;
56
 
            else s->pmat2[ij] = ptempc;
57
 
            ij++;
58
 
            }
59
 
         if(print & 4) {
60
 
            if(opblk==opblk1) {
61
 
               fprintf(outfile,
62
 
                       "\ndensity matrix 1 for irrep %s",s->irrep_label);
63
 
               print_array(s->pmato2,n,outfile);
64
 
               }
65
 
            else {
66
 
               fprintf(outfile,
67
 
                       "\ndensity matrix 1 for irrep %s",s->irrep_label);
68
 
               print_array(s->pmat2,n,outfile);
69
 
               }
70
 
            }
71
 
         }
72
 
      }
73
 
   }