#include <stdio.h>
#include <stdlib.h>
#include <libipv1/ip_lib.h>
#include <libciomr/libciomr.h>
#include <libpsio/psio.h>
#include <libchkpt/chkpt.h>
extern "C" {
FILE *infile, *outfile;
char *psi_file_prefix;
}
using namespace psi::MODULE_NAME;
int main(int argc, char* argv[])
{
int nmo;
double escf, etot;
double *evals;
double **scf;
psi_start(&infile, &outfile, &psi_file_prefix,
argc-1, argv+1, 0);
ip_cwk_add(":MODULE_NAME"); // MODULE_NAME all caps here
psio_init(); psio_ipv1_config();
/* to start timing, tstart(outfile); */
/*------------------------------------
now initialize the checkpoint structure
and begin reading info
------------------------------------*/
chkpt_init(PSIO_OPEN_OLD);
escf = chkpt_rd_escf();
evals = chkpt_rd_evals();
scf = chkpt_rd_scf();
nmo = chkpt_rd_nmo();
chkpt_wt_etot(-1000.0);
etot = chkpt_rd_etot();
chkpt_close();
/*--------------------------------------------
print out info to see what has been read in
--------------------------------------------*/
fprintf(outfile,"\n\n\tEscf = %20.10lf\n",escf);
fprintf(outfile,"\tEtot = %20.10lf\n",etot);
fprintf(outfile,"SCF EIGENVECTOR\n");
eivout(scf,evals,nmo,nmo,outfile);
psio_done();
tstop(outfile);
psi_stop(infile,outfile,psi_file_prefix);
}
/*-------------------------------------------------
dont forget to add the obligatory gprgid section
-------------------------------------------------*/
extern "C" {
char *gprgid()
{
char *prgid = ":MODULE_NAME";
return(prgid);
}
}