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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/frzcpi.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
/*!
 
2
  \file frzcpi.c
 
3
*/
 
4
 
 
5
#include <stdio.h>
 
6
#include "chkpt.h"
 
7
#include <psifiles.h>
 
8
#include <libciomr/libciomr.h>
 
9
#include <libpsio/psio.h>
 
10
 
 
11
/*!
 
12
** chkpt_rd_frzcpi():  Reads in the number of frozen doubly occupied molecular orbitals in each irrep.
 
13
**
 
14
**   takes no arguments.
 
15
**
 
16
**   returns:
 
17
**     int *frzcpi  an array which has an element for each irrep of the
 
18
**                 point group of the molecule (n.b. not just the ones
 
19
**                 with a non-zero number of basis functions). each 
 
20
**                 element contains the number of frozen doubly occupied
 
21
**                 molecular orbitals for
 
22
**                 that irrep. Also, see chkpt_rd_sopi().
 
23
*/
 
24
 
 
25
int *chkpt_rd_frzcpi(void)
 
26
{
 
27
  int nirreps;
 
28
  int *frzcpi;
 
29
 
 
30
  nirreps = chkpt_rd_nirreps();
 
31
  frzcpi = init_int_array(nirreps);
 
32
 
 
33
  psio_read_entry(PSIF_CHKPT, "::Frozen DOCC per irrep", (char *) frzcpi, 
 
34
                  nirreps*sizeof(int));
 
35
 
 
36
  return frzcpi;
 
37
}
 
38
 
 
39
 
 
40
/*!
 
41
** chkpt_wt_frzcpi():  Writes the number of frozen doubly occupied molecular orbitals in each irrep.
 
42
**
 
43
** \param frzcpi = an array which has an element for each irrep of the
 
44
**                 point group of the molecule (n.b. not just the ones
 
45
**                 with a non-zero number of basis functions). each 
 
46
**                 element contains the number of frozen doubly occupied molecular orbitals for
 
47
**                 that irrep. Also, see chkpt_rd_sopi().
 
48
**
 
49
** returns: none
 
50
*/
 
51
 
 
52
void chkpt_wt_frzcpi(int *frzcpi)
 
53
{
 
54
  int nirreps;
 
55
 
 
56
  nirreps = chkpt_rd_nirreps();
 
57
 
 
58
  psio_write_entry(PSIF_CHKPT, "::Frozen DOCC per irrep", (char *) frzcpi, 
 
59
                   nirreps*sizeof(int));
 
60
}