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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/fgeom.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
double **Chkpt::rd_fgeom(void)
 
18
{
 
19
        int nallatom;
 
20
        double **fgeom;
 
21
        char *keyword;
 
22
        keyword = build_keyword("Full cartesian geometry");
 
23
 
 
24
        nallatom = rd_nallatom();
 
25
        fgeom = matrix<double>(nallatom,3);
 
26
 
 
27
        psio->read_entry(PSIF_CHKPT, keyword, (char *) fgeom[0],
 
28
                                        (int) 3*nallatom*sizeof(double));
 
29
 
 
30
        free(keyword);
 
31
        return  fgeom;
 
32
}
 
33
 
 
34
void Chkpt::wt_fgeom(double **fgeom)
 
35
{
 
36
        int nallatom;
 
37
        char *keyword;
 
38
        keyword = build_keyword("Full cartesian geometry");
 
39
 
 
40
        nallatom = rd_nallatom();
 
41
 
 
42
        psio->write_entry(PSIF_CHKPT, keyword, (char *) fgeom[0],
 
43
                (int) 3*nallatom*sizeof(double));
 
44
 
 
45
        free(keyword);
 
46
}
 
47
 
 
48
extern "C" {
 
49
/*!
 
50
** chkpt_rd_fgeom():  Reads in full cartesian geometry including dummy atoms
 
51
**
 
52
** takes no arguments.
 
53
** returns: double **full_geom;
 
54
** \ingroup CHKPT    
 
55
*/
 
56
        double **chkpt_rd_fgeom(void)
 
57
        {
 
58
                return _default_chkpt_lib_->rd_fgeom();
 
59
        }
 
60
 
 
61
/*!
 
62
** chkpt_wt_fgeom():  Writes out full cartesian geometry including dummy atoms
 
63
**
 
64
** arguments: 
 
65
**   \param full_geom = Matrix for cartesian coordinates
 
66
**
 
67
** returns: none
 
68
** \ingroup CHKPT 
 
69
*/
 
70
        void chkpt_wt_fgeom(double **fgeom)
 
71
        {
 
72
                _default_chkpt_lib_->wt_fgeom(fgeom);
 
73
        }
 
74
}