1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
// ----------------------------------------------------
// $Maintainer: Marcel Schumann $
// $Authors: Marcel Schumann $
// ----------------------------------------------------
#include <BALL/SCORING/COMPONENTS/vanDerWaals.h>
#include <BALL/SCORING/COMPONENTS/electrostatic.h>
#include <BALL/SCORING/COMMON/scoringFunction.h>
using namespace BALL;
VanDerWaals::VanDerWaals(Options& options, ForceFieldParameters& forcefield_parameters)
{
amber_nb_ = new AmberNonBonded;
amber_nb_->setup(options, forcefield_parameters);
do_calculations_ = 1;
setName("vdW");
type_name_ = "vdW";
}
VanDerWaals::VanDerWaals(Electrostatic* es)
{
amber_nb_ = es->getAmberNonBonded();
do_calculations_ = 0;
ligand_intra_molecular_ = es->isLigandIntraMolecular();
setName("vdW");
type_name_ = "vdW";
}
VanDerWaals::~VanDerWaals()
{
if (do_calculations_) delete amber_nb_;
}
void VanDerWaals::update(const vector<std::pair<Atom*, Atom*> >& pair_vector)
{
if (do_calculations_)
{
amber_nb_->update(pair_vector);
}
}
double VanDerWaals::updateScore()
{
if (do_calculations_)
{
bool b = scoring_function_->storeInteractionsEnabled();
amber_nb_->enableStoreInteractions(b);
amber_nb_->updateEnergy();
}
score_ = amber_nb_->getVdwEnergy();
/*
scaleScore();
return score_;
*/
return getScaledScore();
}
AmberNonBonded* VanDerWaals::getAmberNonBonded()
{
return amber_nb_;
}
|