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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: AmberFF_bench.C,v 1.5 2002/06/16 19:12:55 oliver Exp $
#include <BALLBenchmarkConfig.h>
#include <BALL/CONCEPT/benchmark.h>
///////////////////////////
#include <BALL/MOLMEC/AMBER/amber.h>
#include <BALL/MOLMEC/COMMON/forceFieldComponent.h>
#include <BALL/FORMAT/PDBFile.h>
///////////////////////////
using namespace BALL;
START_BENCHMARK(AmberFF, 1.0, "$Id: AmberFF_bench.C,v 1.5 2002/06/16 19:12:55 oliver Exp $")
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PDBFile pdb(BALL_BENCHMARK_DATA_PATH(AmberFF_bench.pdb));
System S;
pdb >> S;
AmberFF amber;
START_SECTION(20x setup, 0.05)
START_TIMER
for (int i = 0; i < 20; i++)
{
amber.setup(S);
}
STOP_TIMER
END_SECTION
START_SECTION(20x update w/o selection, 0.05)
START_TIMER
for (int i = 0; i < 20; i++)
{
amber.update();
}
STOP_TIMER
END_SECTION
START_SECTION(50x energy calculation w/o selection, 0.2)
START_TIMER
for (int i = 0; i < 50; i++)
{
amber.updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(50x force calculation w/o selection, 0.2)
START_TIMER
for (int i = 0; i < 50; i++)
{
amber.updateForces();
}
STOP_TIMER
END_SECTION
ForceFieldComponent* component;
START_SECTION(100x nonbonded energy calculation w/o selection, 0.1)
component = amber.getComponent("Amber NonBonded");
START_TIMER
for (Size i = 0; i < 100; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(5000x stretch energy calculation w/o selection, 0.1)
component = amber.getComponent("Amber Stretch");
START_TIMER
for (Size i = 0; i < 5000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(5000x bend energy calculation w/o selection, 0.1)
component = amber.getComponent("Amber Bend");
START_TIMER
for (Size i = 0; i < 5000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(5000x torsion energy calculation w/o selection, 0.1)
component = amber.getComponent("Amber Torsion");
START_TIMER
for (Size i = 0; i < 5000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
S.beginResidue()->select();
START_SECTION(50x update w/ selection, 0.05)
START_TIMER
for (int i = 0; i < 50; i++)
{
amber.update();
}
STOP_TIMER
END_SECTION
START_SECTION(200x energy calculation w/ selection, 0.2)
START_TIMER
for (int i = 0; i < 200; i++)
{
amber.updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(200x force calculation w/ selection, 0.2)
START_TIMER
for (int i = 0; i < 200; i++)
{
amber.updateForces();
}
STOP_TIMER
END_SECTION
START_SECTION(1000x nonbonded energy calculation w/ selection, 0.1)
component = amber.getComponent("Amber NonBonded");
START_TIMER
for (Size i = 0; i < 1000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(10000x stretch energy calculation w/ selection, 0.1)
component = amber.getComponent("Amber Stretch");
START_TIMER
for (Size i = 0; i < 10000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(10000x bend energy calculation w/ selection, 0.1)
component = amber.getComponent("Amber Bend");
START_TIMER
for (Size i = 0; i < 10000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
START_SECTION(10000x torsion energy calculation w/ selection, 0.1)
component = amber.getComponent("Amber Torsion");
START_TIMER
for (Size i = 0; i < 10000; i++)
{
component->updateEnergy();
}
STOP_TIMER
END_SECTION
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
END_BENCHMARK
|