3 #include "latlib/hypercache.h"
 
   4 #include "latlib/progress.h"
 
   6 o815::sim::sim(o815 *_O815, const int& _confmemSize) {
 
   9   hypercache::initC(O815->programid, O815->comargs.nequi, O815->comargs.nskip, O815->comargs.confcache.first, &confMem, _confmemSize, O815->comargs.confcache.second, log);
 
  10   nequi = O815->comargs.nequi;
 
  11   nskip = O815->comargs.nskip;
 
  12   confmemSize = confmemSize;
 
  15 void o815::sim::nextConfig() {
 
  17   int nequileftReadConfig;
 
  18   bool skippedInEqui = false;
 
  19   bool readNoSingleConfig = true;
 
  20   bool createdNoNewConfigs = true;
 
  21   bool readAtLeastOneConfig;
 
  23   readAtLeastOneConfig = hypercache::readC();
 
  25   /* equilibrate if necessary */
 
  26   if (hypercache::getNEquiLeft() > 0) {
 
  27     *log << "SIM: Starting equilibration." << endl << flush;
 
  28     if (hypercache::getNEquiLeft() != nequi)
 
  29       *log << "SIM: " << hypercache::getNEquiLeft() << " of " << nequi << " equilibration steps left after virtual equilibration." << endl << flush;
 
  30     progress equiProg(hypercache::getNEquiLeft());
 
  31     for ( int iequi = 0; iequi < hypercache::getNEquiLeft(); iequi++ ) {
 
  33       while( equiProg.madeStep(iequi) ) *log << "SIM: " << equiProg.done()*100 << "% of equilibration done." << endl << flush;
 
  36     createdNoNewConfigs = false;
 
  39   /* make skip if no config could be read */
 
  40   if ( (! readAtLeastOneConfig) ) {
 
  41     cout << "SKIPPING" << endl;
 
  42     for (int iskip=0; iskip<nskip; iskip++) {
 
  45     createdNoNewConfigs = false;
 
  48   if (! createdNoNewConfigs) {
 
  49     cout << "::" << hypercache::getNEquiLeft() << endl;
 
  53   cout << hypercache::getNEquiLeft() << endl;