本文整理汇总了C++中ContactList::getNumberContacts方法的典型用法代码示例。如果您正苦于以下问题:C++ ContactList::getNumberContacts方法的具体用法?C++ ContactList::getNumberContacts怎么用?C++ ContactList::getNumberContacts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContactList
的用法示例。
在下文中一共展示了ContactList::getNumberContacts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getFractionNativeContacts
/**
* Calculates the fraction of native contacts between two structures.
*
* @param nativeContacts The native contacts.
* @param comparisonStructure The structure to compare to the native.
* @param distanceCutoff The maximum distance between two residues from them to be considered in contact.
* @param minSequenceDistance The minimum separation in the sequence for two residues to be considered native.
* @return The fraction of native contacts present in the comparison structure.
*/
double ContactTools::getFractionNativeContacts(ContactList* nativeContacts, Structure* comparisonStructure, double maxDistanceDeviation)
{
if (nativeContacts->getNumberContacts() == 0) return 0.0;
// Get the formed native contacts.
ContactList* formedNativeContacts = getFormedNativeContacts(nativeContacts, comparisonStructure, maxDistanceDeviation);
// Return the fraction.
return double(formedNativeContacts->getNumberContacts())/double(nativeContacts->getNumberContacts());
}