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


C++ AtomIterator::getCharge方法代码示例

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


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

示例1: compareMolecules

bool compareMolecules(Molecule& mol1, Molecule& mol2)
{
	if(mol1.countAtoms()!=mol2.countAtoms())
		return false;
	if(mol1.countBonds()!=mol2.countBonds())
		return false;

	AtomIterator ai;
	vector<Vector3> pos1;
	vector<float> q1;
	BALL_FOREACH_ATOM(mol1, ai)
	{
		pos1.push_back(ai->getPosition());
		q1.push_back(ai->getCharge());
	}
开发者ID:PierFio,项目名称:ball,代码行数:15,代码来源:DockResultFile_test.C

示例2: main


//.........这里部分代码省略.........
			polar_radius_rule_file_name = tmp;
		}
		if (verbosity > 0)
		{
			Log.info() << "Using " << polar_radius_rule_file_name << " as polar radius rule file" << endl;
		}

		INIFile radius_ini(polar_radius_rule_file_name);
		radius_ini.read();
		RadiusRuleProcessor radius_rules(radius_ini);
		system.apply(radius_rules);
	}

	if (verbosity > 8)
	{
		Log.info() << "system statistics:" << endl;
		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);
		}
	}

开发者ID:HeyJJ,项目名称:ball,代码行数:65,代码来源:SLICK.C


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