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


C++ Keywords类代码示例

本文整理汇总了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)");
}
开发者ID:BingqingCheng,项目名称:plumed2,代码行数:7,代码来源:Action.cpp

示例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;
    }
  }
}
开发者ID:4og,项目名称:avango,代码行数:29,代码来源:FileAccumulator.cpp

示例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;
	}
}
开发者ID:pradeepkodical,项目名称:pkParser,代码行数:27,代码来源:Program.cpp

示例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");
}
开发者ID:apoma,项目名称:plumed2,代码行数:7,代码来源:PathMSDBase.cpp

示例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");
}
开发者ID:edoardob90,项目名称:plumed2,代码行数:8,代码来源:GridPrintingBase.cpp

示例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");
}
开发者ID:JFDama,项目名称:plumed2,代码行数:8,代码来源:ActionWithValue.cpp

示例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.");
}
开发者ID:GiovanniBussi,项目名称:test-travis-ci,代码行数:8,代码来源:SetupMolInfo.cpp

示例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");
}
开发者ID:yongwangCPH,项目名称:plumed2,代码行数:9,代码来源:ActionVolume.cpp

示例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");
}
开发者ID:JFDama,项目名称:plumed2,代码行数:9,代码来源:ActionWithAveraging.cpp

示例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");
}
开发者ID:BingqingCheng,项目名称:plumed2,代码行数:9,代码来源:Bias.cpp

示例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;
  } 
}
开发者ID:apoma,项目名称:plumed2,代码行数:9,代码来源:ActionRegister.cpp

示例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;
  }
}
开发者ID:apoma,项目名称:plumed2,代码行数:9,代码来源:ActionRegister.cpp

示例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");
}
开发者ID:edoardob90,项目名称:plumed2,代码行数:10,代码来源:ManyRestraintsBase.cpp

示例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;
}
开发者ID:edoardob90,项目名称:plumed2,代码行数:11,代码来源:VesselRegister.cpp

示例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.");
}
开发者ID:psolsson,项目名称:plumed2,代码行数:11,代码来源:Mapping.cpp


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