本文整理汇总了C++中AtomIterator::setCharge方法的典型用法代码示例。如果您正苦于以下问题:C++ AtomIterator::setCharge方法的具体用法?C++ AtomIterator::setCharge怎么用?C++ AtomIterator::setCharge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AtomIterator
的用法示例。
在下文中一共展示了AtomIterator::setCharge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
Log.info() << "molecules: " << system.countMolecules() << endl;
Log.info() << "proteins: " << system.countProteins() << endl;
Log.info() << "fragments: " << system.countFragments() << endl;
Log.info() << "atoms: " << system.countAtoms() << endl;
}
// check for uassigned type names
AtomIterator it;
int count = 0;
for (it = system.beginAtom(); +it; ++it)
{
count++;
if (it->getElement().getSymbol() == "?")
{
Log.info() << "Got symbol \"?\": " << it->getFullName() << endl;
}
if (it->getCharge() > 8.0)
{
Log.error() << "Mysterious charge: " << it->getCharge() << "\t"
<< it->getFullName() << "\t" << count << "\t" << it->getElement().getSymbol() << endl;
}
}
// scale charges
if (verbosity > 0)
{
Log.info() << "Scaling receptor charges by " << receptor_charge_scaling_factor << endl;
}
if (parpars.has("s"))
{
for (it = protein->beginAtom(); +it; ++it)
{
it->setCharge(it->getCharge() * receptor_charge_scaling_factor);
}
}
if (verbosity > 0)
{
Log.info() << "Scaling ligand charges by " << ligand_charge_scaling_factor << endl;
}
if (parpars.has("t"))
{
for (it = ligand->beginAtom(); +it; ++it)
{
it->setCharge(it->getCharge() * ligand_charge_scaling_factor);
}
}
String options_file_name = parpars.get("op");
if (options_file_name != CommandlineParser::NOT_FOUND)
{
options.readOptionFile(options_file_name);
configuration_string += "read_options_file " + options_file_name;
}
String lj_parameter_file_name = parpars.get("lj");
if (lj_parameter_file_name == CommandlineParser::NOT_FOUND)
{
lj_parameter_file_name = "Amber/amber94gly.ini";
}
else
{
configuration_string = configuration_string + "lj_parameter_file_name " + lj_parameter_file_name;
}