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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/clsdpi.cc

  • 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
 
3
  \ingroup CHKPT
 
4
*/
 
5
 
 
6
#include <cstdio>
 
7
#include <cstdlib>
 
8
#include <psifiles.h>
 
9
#include <libpsio/psio.hpp>
 
10
extern "C" {
 
11
        #include <libchkpt/chkpt.h>
 
12
}
 
13
#include <libchkpt/chkpt.hpp>
 
14
 
 
15
using namespace psi;
 
16
 
 
17
int *Chkpt::rd_clsdpi(void)
 
18
{
 
19
        int nirreps;
 
20
        int *clsdpi;
 
21
        char *keyword;
 
22
        keyword = build_keyword("Closed shells per irrep");
 
23
 
 
24
        nirreps = rd_nirreps();
 
25
        clsdpi = array<int>(nirreps);
 
26
 
 
27
        psio->read_entry(PSIF_CHKPT, keyword, (char *) clsdpi, 
 
28
                nirreps*sizeof(int));
 
29
 
 
30
        free(keyword);
 
31
        return clsdpi;
 
32
}
 
33
 
 
34
void Chkpt::wt_clsdpi(int *clsdpi)
 
35
{
 
36
        int nirreps;
 
37
        char *keyword;
 
38
        keyword = build_keyword("Closed shells per irrep");
 
39
 
 
40
        nirreps = rd_nirreps();
 
41
 
 
42
        psio->write_entry(PSIF_CHKPT, keyword, (char *) clsdpi, 
 
43
                nirreps*sizeof(int));
 
44
 
 
45
        free(keyword);
 
46
}
 
47
 
 
48
extern "C" {
 
49
/*!
 
50
** chkpt_rd_clsdpi():  Reads in the number of closed-shell orbitals in each 
 
51
**   irrep.
 
52
**
 
53
**  Parameters: none
 
54
**
 
55
**  Returns:
 
56
**    int *clsdpi, an array which has an element for each irrep of the
 
57
**                 point group of the molecule (n.b. not just the ones
 
58
**                 with a non-zero number of basis functions). each 
 
59
**                 element contains the number of closed-shell orbitals for
 
60
**                 that irrep.
 
61
** \ingroup CHKPT
 
62
*/
 
63
        int *chkpt_rd_clsdpi(void)
 
64
        {
 
65
                int *clsdpi;
 
66
                clsdpi = _default_chkpt_lib_->rd_clsdpi();
 
67
                return clsdpi;
 
68
        }
 
69
 
 
70
 
 
71
/*!
 
72
** chkpt_wt_clsdpi():  Writes the number of closed-shell orbitals in each irrep.
 
73
**
 
74
** \param clsdpi = an array which has an element for each irrep of the
 
75
**                 point group of the molecule (n.b. not just the ones
 
76
**                 with a non-zero number of basis functions). each 
 
77
**                 element contains the number of closed-shell orbitals for
 
78
**                 that irrep.
 
79
**
 
80
** returns: none
 
81
** \ingroup CHKPT
 
82
*/
 
83
        void chkpt_wt_clsdpi(int *clsdpi)
 
84
        {
 
85
                _default_chkpt_lib_->wt_clsdpi(clsdpi);
 
86
        }
 
87
}
 
88