本文整理汇总了C++中Keywords类的典型用法代码示例。如果您正苦于以下问题:C++ Keywords类的具体用法?C++ Keywords怎么用?C++ Keywords使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Keywords类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerKeywords
void Action::registerKeywords( Keywords& keys ) {
plumed_assert( keys.size()==0 );
keys.add( "hidden", "LABEL", "a label for the action so that its output can be referenced in the input to other actions. Actions with scalar output are referenced using their label only. Actions with vector output must have a separate label for every component. Individual componets are then refered to using label.component" );
keys.reserve("optional","UPDATE_FROM","Only update this action from this time");
keys.reserve("optional","UPDATE_UNTIL","Only update this action until this time");
keys.reserve("optional","RESTART","allows per-action setting of restart (YES/NO/AUTO)");
}
示例2: input
void shade::FileAccumulator::add_file(const std::string& file)
{
if (file.empty())
return;
if (m_seen_files.find(file) == m_seen_files.end())
{
std::string content = m_resolver.load(file);
m_seen_files.insert(file);
typedef std::map<std::string, std::string> Keywords;
Keywords keywords;
std::istringstream input(content);
m_content += io::parse_input(input, keywords);
Keywords::const_iterator glsl_version = keywords.find("glsl_version");
if (glsl_version != keywords.end())
{
m_glsl_version = std::max(m_glsl_version, boost::lexical_cast<int>(glsl_version->second));
}
Keywords::const_iterator gpu_shader4_ext = keywords.find("GL_EXT_gpu_shader4");
if (gpu_shader4_ext != keywords.end())
{
if (gpu_shader4_ext->second == "require")
m_requires_gpu_shader4_ext = true;
}
}
}
示例3: PrintExpression
void PrintExpression(string &infix)
{
try
{
Keywords keywords;
double results = 0;
keywords.ResolveKeywords(infix);
Expression *exp = PkParser::Solve(infix);
cout <<"Equation: " << exp->toString(0) <<endl;
results = exp->Solve();
cout << results <<endl;
delete exp;
}
catch(PkException *exp)
{
cout << "Exception:" << exp->toString() <<endl;
}
catch(...)
{
cout << "Unknown Error"<<endl;
}
}
示例4: registerKeywords
void PathMSDBase::registerKeywords(Keywords& keys){
Colvar::registerKeywords(keys);
keys.add("compulsory","LAMBDA","the lambda parameter is needed for smoothing, is in the units of plumed");
keys.add("compulsory","REFERENCE","the pdb is needed to provide the various milestones");
keys.add("optional","NEIGH_SIZE","size of the neighbor list");
keys.add("optional","NEIGH_STRIDE","how often the neighbor list needs to be calculated in time units");
}
示例5: registerKeywords
void GridPrintingBase::registerKeywords( Keywords& keys ){
Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys );
keys.add("compulsory","GRID","the action that creates the grid you would like to output");
keys.add("compulsory","STRIDE","0","the frequency with which the grid should be output to the file. The default "
"value of 0 ensures that the grid is only output at the end of the trajectory");
keys.add("compulsory","FILE","density","the file on which to write the grid.");
keys.add("optional","FMT","the format that should be used to output real numbers");
}
示例6: registerKeywords
void ActionWithValue::registerKeywords(Keywords& keys) {
keys.setComponentsIntroduction("By default the value of the calculated quantity can be referenced elsewhere in the "
"input file by using the label of the action. Alternatively this Action can be used "
"to be used to calculate the following quantities by employing the keywords listed "
"below. These quanties can be referenced elsewhere in the input by using this Action's "
"label followed by a dot and the name of the quantity required from the list below.");
keys.addFlag("NUMERICAL_DERIVATIVES", false, "calculate the derivatives for these quantities numerically");
}
示例7: registerKeywords
void SetupMolInfo::registerKeywords( Keywords& keys ) {
ActionSetup::registerKeywords(keys);
keys.add("compulsory","STRUCTURE","a file in pdb format containing a reference structure. "
"This is used to defines the atoms in the various residues, chains, etc . "
"For more details on the PDB file format visit http://www.wwpdb.org/docs.html");
keys.add("compulsory","MOLTYPE","protein","what kind of molecule is contained in the pdb file - usually not needed since protein/RNA/DNA are compatible");
keys.add("atoms","CHAIN","(for masochists ( mostly Davide Branduardi ) ) The atoms involved in each of the chains of interest in the structure.");
}
示例8: registerKeywords
void ActionVolume::registerKeywords( Keywords& keys ){
VolumeGradientBase::registerKeywords( keys );
if( keys.reserved("VMEAN") ) keys.use("VMEAN");
keys.use("MEAN"); keys.use("LESS_THAN"); keys.use("MORE_THAN");
keys.use("BETWEEN"); keys.use("HISTOGRAM");
keys.add("compulsory","SIGMA","the width of the function to be used for kernel density estimation");
keys.add("compulsory","KERNEL","gaussian","the type of kernel function to be used");
keys.addFlag("OUTSIDE",false,"calculate quantities for colvars that are on atoms outside the region of interest");
}
示例9: registerKeywords
void ActionWithAveraging::registerKeywords( Keywords& keys ) {
Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); ActionAtomistic::registerKeywords( keys );
ActionWithArguments::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithVessel::registerKeywords( keys );
keys.add("compulsory","STRIDE","1","the frequency with which the data should be collected and added to the quantity being averaged");
keys.add("compulsory","CLEAR","0","the frequency with which to clear all the accumulated data. The default value "
"of 0 implies that all the data will be used and that the grid will never be cleared");
keys.add("optional","LOGWEIGHTS","list of actions that calculates log weights that should be used to weight configurations when calculating averages");
keys.addFlag("UNORMALIZED",false,"output the unaveraged quantity/quantities."); keys.remove("NUMERICAL_DERIVATIVES");
}
示例10: registerKeywords
void Bias::registerKeywords( Keywords& keys ) {
Action::registerKeywords(keys);
ActionPilot::registerKeywords(keys);
ActionWithValue::registerKeywords(keys);
ActionWithArguments::registerKeywords(keys);
keys.add("hidden","STRIDE","the frequency with which the forces due to the bias should be calculated. This can be used to correctly set up multistep algorithms");
componentsAreNotOptional(keys);
keys.addOutputComponent("bias","default","the instantaneous value of the bias potential");
}
示例11: printManual
bool ActionRegister::printManual( const std::string& action ){
if ( check(action) ){
Keywords keys; mk[action](keys);
keys.print_html(true); keys.destroyData();
return true;
} else {
return false;
}
}
示例12: printTemplate
bool ActionRegister::printTemplate( const std::string& action, bool include_optional ){
if( check(action) ){
Keywords keys; mk[action](keys);
keys.print_template(action, include_optional); keys.destroyData();
return true;
} else {
return false;
}
}
示例13: registerKeywords
void ManyRestraintsBase::registerKeywords( Keywords& keys ) {
Action::registerKeywords( keys );
ActionWithValue::registerKeywords( keys );
ActionWithVessel::registerKeywords( keys );
ActionWithInputVessel::registerKeywords( keys );
ActionPilot::registerKeywords( keys );
keys.add("hidden","STRIDE","the frequency with which the forces due to the bias should be calculated. This can be used to correctly set up multistep algorithms");
keys.remove("TOL");
keys.addOutputComponent("bias","default","the instantaneous value of the bias potentials");
}
示例14: create
Vessel* VesselRegister::create(std::string keyword, const VesselOptions&da){
Vessel* df;
if(check(keyword)){
Keywords keys; mk[keyword](keys);
VesselOptions nda( da,keys );
df=m[keyword](nda);
keys.destroyData();
}
else df=NULL;
return df;
}
示例15: registerKeywords
void Mapping::registerKeywords( Keywords& keys ){
Action::registerKeywords( keys );
ActionWithValue::registerKeywords( keys );
ActionWithArguments::registerKeywords( keys );
ActionAtomistic::registerKeywords( keys );
vesselbase::ActionWithVessel::registerKeywords( keys );
keys.add("compulsory","REFERENCE","a pdb file containing the set of reference configurations");
keys.add("compulsory","PROPERTY","the property to be used in the index. This should be in the REMARK of the reference");
keys.add("compulsory","TYPE","OPTIMAL","the manner in which distances are calculated");
keys.addFlag("DISABLE_CHECKS",false,"disable checks on reference input structures.");
}