Пример #1
0
bool FuncSumHills::checkFilesAreExisting(const vector<string> & hills ){
	plumed_massert(hills.size()!=0,"the number of  files provided should be at least one" );
        IFile *ifile = new IFile();
        ifile->link(*this);
        for(unsigned i=0; i< hills.size();i++){  
          plumed_massert(ifile->FileExist(hills[i]),"missing file "+hills[i]);
        }
        return true; 

}
Пример #2
0
void PlumedMain::readInputFile(std::string str) {
  plumed_assert(initialized);
  log.printf("FILE: %s\n",str.c_str());
  IFile ifile;
  ifile.link(*this);
  ifile.open(str);
  ifile.allowNoEOL();
  std::vector<std::string> words;
  while(Tools::getParsedLine(ifile,words) && words[0]!="ENDPLUMED") readInputWords(words);
  log.printf("END FILE: %s\n",str.c_str());
  log.flush();

  pilots=actionSet.select<ActionPilot*>();
}