本文整理汇总了C++中Bond::getEndAtomIdx方法的典型用法代码示例。如果您正苦于以下问题:C++ Bond::getEndAtomIdx方法的具体用法?C++ Bond::getEndAtomIdx怎么用?C++ Bond::getEndAtomIdx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bond
的用法示例。
在下文中一共展示了Bond::getEndAtomIdx方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setReactantBondPropertiesToProduct
void setReactantBondPropertiesToProduct(RWMOL_SPTR product,
const ROMol &reactant,
ReactantProductAtomMapping *mapping) {
ROMol::BOND_ITER_PAIR bondItP = product->getEdges();
while (bondItP.first != bondItP.second) {
Bond *pBond = (*product)[*(bondItP.first)];
++bondItP.first;
if (pBond->hasProp(common_properties::NullBond) ||
pBond->hasProp(common_properties::_MolFileBondQuery)) {
if (mapping->prodReactAtomMap.find(pBond->getBeginAtomIdx()) !=
mapping->prodReactAtomMap.end() &&
mapping->prodReactAtomMap.find(pBond->getEndAtomIdx()) !=
mapping->prodReactAtomMap.end()) {
// the bond is between two mapped atoms from this reactant:
unsigned begIdx = mapping->prodReactAtomMap[pBond->getBeginAtomIdx()];
unsigned endIdx = mapping->prodReactAtomMap[pBond->getEndAtomIdx()];
const Bond *rBond = reactant.getBondBetweenAtoms(begIdx, endIdx);
if (!rBond) continue;
pBond->setBondType(rBond->getBondType());
pBond->setBondDir(rBond->getBondDir());
pBond->setIsAromatic(rBond->getIsAromatic());
if (pBond->hasProp(common_properties::NullBond)) {
pBond->clearProp(common_properties::NullBond);
}
}
}
}
}
示例2: addMissingProductBonds
void addMissingProductBonds(const Bond &origB, RWMOL_SPTR product,
ReactantProductAtomMapping *mapping) {
unsigned int begIdx = origB.getBeginAtomIdx();
unsigned int endIdx = origB.getEndAtomIdx();
std::vector<unsigned> prodBeginIdxs = mapping->reactProdAtomMap[begIdx];
std::vector<unsigned> prodEndIdxs = mapping->reactProdAtomMap[endIdx];
CHECK_INVARIANT(prodBeginIdxs.size() == prodEndIdxs.size(),
"Different number of start-end points for product bonds.");
for (unsigned i = 0; i < prodBeginIdxs.size(); i++) {
setNewProductBond(origB, product, prodBeginIdxs.at(i), prodEndIdxs.at(i));
}
}