~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

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