atom_dummy.cc

Go to the documentation of this file.
00001 
00006 #include <stdlib.h>
00007 #include <psifiles.h>
00008 #include <libpsio/psio.hpp>
00009 extern "C" {
00010 #include <libchkpt/chkpt.h>
00011 }
00012 #include <libchkpt/chkpt.hpp>
00013 
00014 using namespace psi;
00015 
00016 int* Chkpt::rd_atom_dummy(void)
00017 {
00018         int num_allatoms;
00019         int *atom_dummy;
00020         char *keyword;
00021         keyword = build_keyword("Dummy atom flags");
00022 
00023         num_allatoms = rd_nallatom();
00024         atom_dummy = (int *) malloc(sizeof(int)*num_allatoms);
00025 
00026         psio->read_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
00027                 num_allatoms*sizeof(int));
00028 
00029         free(keyword);
00030         return atom_dummy;
00031 }
00032 
00033 void Chkpt::wt_atom_dummy(int* atom_dummy)
00034 {
00035         int num_allatoms = rd_nallatom();
00036         char *keyword;
00037         keyword = build_keyword("Dummy atom flags");
00038 
00039         psio->write_entry(PSIF_CHKPT, keyword, (char *) atom_dummy, 
00040                 num_allatoms*sizeof(int));
00041 
00042         free(keyword);
00043 }
00044 
00045 extern "C" {
00057         int* chkpt_rd_atom_dummy(void)
00058         {
00059                 return _default_chkpt_lib_->rd_atom_dummy();
00060         }
00061 
00062 
00074         void chkpt_wt_atom_dummy(int* atom_dummy)
00075         {
00076                 _default_chkpt_lib_->wt_atom_dummy(atom_dummy);
00077         }
00078 }
00079 

Generated on Wed Feb 13 16:35:39 2008 for PSI by  doxygen 1.5.4