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
|
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#include <BALL/CONCEPT/classTest.h>
#include <BALLTestConfig.h>
///////////////////////////
#include <BALL/ENERGY/atomicContactEnergy.h>
#include <BALL/FORMAT/PDBFile.h>
///////////////////////////
START_TEST(AtomicContactEnergy)
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
using namespace BALL;
CHECK(calculateACE())
// read protein A (trypsin from 2ptc)
STATUS("reading PDB file data/ACE_test_A.pdb")
PDBFile pdb_file_A(BALL_TEST_DATA_PATH(ACE_test_A.pdb));
TEST_EQUAL(pdb_file_A.good(), true)
System A;
pdb_file_A >> A;
pdb_file_A.close();
TEST_EQUAL(A.countAtoms(), 1629)
// read protein B (BPTI from 2ptc)
STATUS("reading PDB file data/ACE_test_B.pdb")
PDBFile pdb_file_B(BALL_TEST_DATA_PATH(ACE_test_B.pdb));
TEST_EQUAL(pdb_file_B.good(), true)
System B;
pdb_file_B >> B;
pdb_file_B.close();
TEST_EQUAL(B.countAtoms(), 454)
// calculate the atomic contact energy of A and B
PRECISION(1e-2)
STATUS("calculating the ACE of A and B")
float ACE_A = calculateACE(A);
TEST_REAL_EQUAL(ACE_A, -2222.15)
float ACE_B = calculateACE(B);
TEST_REAL_EQUAL(ACE_B, -562.36)
// join A and B and calculate the total energy
STATUS("calculating the ACE of AB")
A.splice(B);
float ACE_AB = calculateACE(A);
TEST_REAL_EQUAL(ACE_AB, -2806.2)
// calculate the difference in binding energies
float dG_bind = ACE_AB - ACE_A - ACE_B;
TEST_REAL_EQUAL(dG_bind, -21.6891)
RESULT
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
END_TEST
|