本文整理汇总了C++中QueryMolecule::removeAtoms方法的典型用法代码示例。如果您正苦于以下问题:C++ QueryMolecule::removeAtoms方法的具体用法?C++ QueryMolecule::removeAtoms怎么用?C++ QueryMolecule::removeAtoms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryMolecule
的用法示例。
在下文中一共展示了QueryMolecule::removeAtoms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _aromatizeRGroupFragment
bool QueryMoleculeAromatizer::_aromatizeRGroupFragment (QueryMolecule &fragment,
bool add_single_bonds, const AromaticityOptions &options)
{
// Add additional atom to attachment points
int additional_atom = fragment.addAtom(new QueryMolecule::Atom(QueryMolecule::ATOM_RSITE, 1));
// Connect it with attachment points
int maxOrder = fragment.attachmentPointCount();
for (int i = 1; i <= maxOrder; i++)
{
int pointIndex = 0;
int point;
while (true)
{
point = fragment.getAttachmentPoint(i, pointIndex);
if (point == -1)
break;
if (fragment.findEdgeIndex(point, additional_atom) == -1)
{
AutoPtr<QueryMolecule::Bond> bond;
if (add_single_bonds)
bond.reset(new QueryMolecule::Bond(QueryMolecule::BOND_ORDER, BOND_SINGLE));
else
bond.reset(new QueryMolecule::Bond());
fragment.addBond(point, additional_atom, bond.release());
}
pointIndex++;
}
}
bool aromatized = _aromatizeBonds(fragment, additional_atom, options);
QS_DEF(Array<int>, indices);
indices.clear();
indices.push(additional_atom);
fragment.removeAtoms(indices);
return aromatized;
}