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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/ecorr.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2006-09-10 14:01:33 UTC
  • Revision ID: james.westby@ubuntu.com-20060910140133-ib2j86trekykfsfv
Tags: upstream-3.2.3
ImportĀ upstreamĀ versionĀ 3.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
  \file ecorr.c
 
3
  \ingroup (CHKPT)
 
4
*/
 
5
 
 
6
#include <stdio.h>
 
7
#include "chkpt.h"
 
8
#include <psifiles.h>
 
9
#include <libciomr/libciomr.h>
 
10
#include <libpsio/psio.h>
 
11
 
 
12
/*!
 
13
** chkpt_rd_ecorr():  Reads in the correlated energy.
 
14
**
 
15
** takes no arguments.
 
16
**
 
17
** returns: e_corr = the correlated energy.  To get some
 
18
**        information (a label) on the type of correlated wavefunction
 
19
**        used to get this energy, see rd_corr_lab().
 
20
** \ingroup (CHKPT)
 
21
*/
 
22
double chkpt_rd_ecorr(void)
 
23
{
 
24
  double ecorr;
 
25
 
 
26
  psio_read_entry(PSIF_CHKPT, "::Correlation energy", (char *) &ecorr,
 
27
                  sizeof(double));
 
28
 
 
29
  return ecorr;
 
30
}
 
31
 
 
32
 
 
33
/*!
 
34
** chkpt_wt_ecorr():  Writes out the correlated energy.
 
35
**
 
36
** \param e_corr = the correlated energy.  To get some
 
37
**        information (a label) on the type of correlated wavefunction
 
38
**        used to get this energy, see rd_corr_lab().
 
39
**
 
40
** returns: none
 
41
** \ingroup (CHKPT)
 
42
*/
 
43
void chkpt_wt_ecorr(double ecorr)
 
44
{
 
45
  psio_write_entry(PSIF_CHKPT, "::Correlation energy", (char *) &ecorr,
 
46
                   sizeof(double));
 
47
}
 
48