当前位置: 首页>>代码示例>>C++>>正文


C++ OptionParser::getConfFile方法代码示例

本文整理汇总了C++中OptionParser::getConfFile方法的典型用法代码示例。如果您正苦于以下问题:C++ OptionParser::getConfFile方法的具体用法?C++ OptionParser::getConfFile怎么用?C++ OptionParser::getConfFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OptionParser的用法示例。


在下文中一共展示了OptionParser::getConfFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: parseOptions


//.........这里部分代码省略.........
	if (OP.fail()) {
		opt.errorMessages = "phi1 not specified";
		opt.errorFlag = true;
	}
	opt.rpr_start = OP.getDouble("rpr_start");
	if (OP.fail()) {
		opt.errorMessages = "rpr not specified";
		opt.errorFlag = true;
	}
	opt.rpr_end = OP.getDouble("rpr_end");
	if (OP.fail()) {
		opt.errorMessages = "rpr not specified";
		opt.errorFlag = true;
	}
	opt.rpr_step = OP.getDouble("rpr_step");
	if (OP.fail()) {
		opt.errorMessages = "rpr not specified";
		opt.errorFlag = true;
	}
	opt.pitch_start = OP.getDouble("pitch_start");
	if (OP.fail()) {
		opt.errorMessages = "pitch not specified";
		opt.errorFlag = true;
	}
	opt.pitch_end = OP.getDouble("pitch_end");
	if (OP.fail()) {
		opt.errorMessages = "pitch not specified";
		opt.errorFlag = true;
	}
	opt.pitch_step = OP.getDouble("pitch_step");
	if (OP.fail()) {
		opt.errorMessages = "pitch not specified";
		opt.errorFlag = true;
	}
	opt.nRes = OP.getInt("nRes");
	if (OP.fail()) {
		opt.errorMessages = "number of residues not specified";
		opt.errorFlag = true;
	}
	opt.symmetry = OP.getString("symmetry");
	if (OP.fail()) {
		opt.errorMessages = "symmetry not specified";
		opt.errorFlag = true;
	}
	opt.N = OP.getInt("N");
	if (OP.fail()) {
		opt.errorMessages = "N not specified";
		opt.errorFlag = true;
	}
	opt.rotamerLibrary = OP.getString("rotamerLibrary");
	if (OP.fail()) {
		opt.errorMessages = "rotamerLibrary not specified";
		opt.errorFlag = true;
	}
	opt.outputfile = OP.getString("outputfile");
	if (OP.fail()) {
		opt.errorMessages = "outputfile not specified";
		opt.errorFlag = true;
	}

	/*
	opt.testNo = OP.getInt("testNo");
	if (OP.fail()) {
		opt.errorMessages = "testNo not specified";
		opt.errorFlag = true;
	}
	*/

	opt.rotamerSamplingSize = OP.getString("rotamerSamplingSize");
	opt.seed = OP.getInt("seed");
	opt.runDEE = OP.getBool("runDEE");
	opt.runEnum = OP.getBool("runEnum");
	opt.runSCMF = OP.getBool("runSCMF");
	opt.runMCO = OP.getBool("runMCO");
	opt.setState = OP.getBool("setState");
	opt.rotamerStates = OP.getUnsignedIntVector("rotamerStates");

	opt.rerunConf = "########################################################\n";
	opt.rerunConf += "#  This configuration file was automatically generated,\n";
	opt.rerunConf += "#  it will rerun this job with the same options. Run as:\n";
	opt.rerunConf += "#\n";
	opt.rerunConf += "#  Run as:\n";
	opt.rerunConf += "#\n";
	opt.rerunConf += "#    % " + programName + " --configfile " + opt.rerunConfFile + "\n";
	opt.rerunConf += "#\n";
	opt.rerunConf += "#  Job started on " + (string)ctime(&start_time);
	opt.rerunConf += "#  on host " + opt.host + ", path " + opt.pwd + "\n";
	if (opt.seed == 0) {
		opt.rerunConf += "#  seed " + MslTools::intToString(opt.seed) + " (time based)\n";
	} else {
		opt.rerunConf += "#  seed " + MslTools::intToString(opt.seed) + "\n";
	} 
	opt.rerunConf += "########################################################\n";
	opt.rerunConf += "\n";
	opt.rerunConf += OP.getConfFile();

	// return the Options structure
	return opt;

}
开发者ID:Suncuss,项目名称:mslib,代码行数:101,代码来源:coiledCoilBuilder.cpp


注:本文中的OptionParser::getConfFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。