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

« back to all changes in this revision

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