~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/atom_dummy.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 <cstdlib>
 
7
#include <psifiles.h>
 
8
#include <libpsio/psio.hpp>
 
9
extern "C" {
 
10
#include <libchkpt/chkpt.h>
 
11
}
 
12
#include <libchkpt/chkpt.hpp>
 
13
 
 
14
using namespace psi;
 
15
 
 
16
int* Chkpt::rd_atom_dummy(void)
 
17
{
 
18
        int num_allatoms;
 
19
        int *atom_dummy;
 
20
        char *keyword;
 
21
        keyword = build_keyword("Dummy atom flags");
 
22
 
 
23
        num_allatoms = rd_nallatom();
 
24
        atom_dummy = (int *) malloc(sizeof(int)*num_allatoms);
 
25
 
 
26
        psio->read_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
 
27
                num_allatoms*sizeof(int));
 
28
 
 
29
        free(keyword);
 
30
        return atom_dummy;
 
31
}
 
32
 
 
33
void Chkpt::wt_atom_dummy(int* atom_dummy)
 
34
{
 
35
        int num_allatoms = rd_nallatom();
 
36
        char *keyword;
 
37
        keyword = build_keyword("Dummy atom flags");
 
38
 
 
39
        psio->write_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
 
40
                num_allatoms*sizeof(int));
 
41
 
 
42
        free(keyword);
 
43
}
 
44
 
 
45
extern "C" {
 
46
/*!
 
47
** chkpt_rd_atom_dummy()
 
48
**
 
49
** Reads the array of flags which indicate whether the atom in full_geom 
 
50
** is dummy
 
51
**
 
52
** Parameters: none
 
53
**
 
54
** Returns: atom_dummy = array of integers nallatom long.
 
55
** \ingroup CHKPT
 
56
*/
 
57
        int* chkpt_rd_atom_dummy(void)
 
58
        {
 
59
                return _default_chkpt_lib_->rd_atom_dummy();
 
60
        }
 
61
 
 
62
 
 
63
/*!
 
64
** chkpt_wt_atom_dummy()
 
65
**
 
66
** Writes the array of flags which indicate whether the atom in full_geom 
 
67
** is dummy
 
68
**
 
69
** \param atom_dummy = array of integers nallatom long.
 
70
**
 
71
** Returns: none
 
72
** \ingroup CHKPT
 
73
*/
 
74
        void chkpt_wt_atom_dummy(int* atom_dummy)
 
75
        {
 
76
                _default_chkpt_lib_->wt_atom_dummy(atom_dummy);
 
77
        }
 
78
}
 
79