This example shows you a way to create a pair score that combines IMP::score_functor::Dope and excluded volume (via IMP::score_functor::HarmonicLowerBound).
namespace {
const double dope_threshold = 16;
const double spring_constant = 1;
for (unsigned int i = 0; i < 2; ++i) {
atoms.push_back(api);
}
for (unsigned int i = 0; i < atoms.size(); ++i) {
for (unsigned int j = 0; j < i; ++j) {
}
}
return all_pairs;
}
}
int main(int argc, char *argv[]) {
try {
"Show to to use dope and excluded volume");
Score;
DopeAndExcludedVolumeDistancePairScore;
new DopeAndExcludedVolumeDistancePairScore(
SoftSphere(Harmonic(spring_constant))));
for (unsigned int i = 0; i < pips.size(); ++i) {
std::cout << "Score is " << score->evaluate_index(
model, pips[i], IMP_NULLPTR) << std::endl;
}
return 0;
}
catch (const std::exception & e) {
std::cerr << "ERROR: " << e.what() << std::endl;
return 1;
}
}