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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/natom.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 natom.c
 
3
  \ingroup (CHKPT)
 
4
*/
 
5
 
 
6
#include "chkpt.h"
 
7
#include <psifiles.h>
 
8
#include <libpsio/psio.h>
 
9
 
 
10
/*!
 
11
**  int chkpt_rd_natom() 
 
12
**  Reads in the total number of atoms.
 
13
**
 
14
**  returns: natom = total number of atoms.
 
15
** \ingroup (CHKPT)
 
16
*/
 
17
 
 
18
int chkpt_rd_natom(void)
 
19
{  
 
20
  int natom;
 
21
 
 
22
  psio_read_entry(PSIF_CHKPT, "::Num. atoms", (char *) &natom, sizeof(int));
 
23
  return natom;
 
24
}
 
25
 
 
26
 
 
27
/*!
 
28
**  void chkpt_wt_natom(int) 
 
29
**  Writes out the total number of atoms.
 
30
**
 
31
**  \param natom = total number of atoms.
 
32
**
 
33
** returns: none
 
34
** \ingroup (CHKPT)
 
35
*/
 
36
 
 
37
void chkpt_wt_natom(int natom)
 
38
{  
 
39
  psio_write_entry(PSIF_CHKPT, "::Num. atoms", (char *) &natom, sizeof(int));
 
40
}
 
41