Last change
on this file since 08b88b was 5f697c, checked in by Frederik Heber <heber@…>, 16 years ago |
New class BondGraph.
- BondGraph parses a file containing bond lengths and basically has a member function which gives lower and upper bounds on when two atoms are bonded and when not.
- Unit test written for BondGraph.
- molecule::CreateAdjacencyList() - rewritten, takes now a bounds BondGraph member function, if NULL is given, creates its own BondGraph and uses standard covalent bounds function (which does not need any scanning).
- new function BondedParticle::IsBondedTo() which checks whether given BondedPasrticle is contained in ListOfBonds.
- builder.cpp: calls to molecule::CreateAdjacencyList() adapted to new syntax.
|
-
Property mode
set to
100644
|
File size:
893 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * bondgraphunittest.hpp
|
---|
3 | *
|
---|
4 | * Created on: Oct 29, 2009
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef BONDGRAPHUNITTEST_HPP_
|
---|
9 | #define BONDGRAPHUNITTEST_HPP_
|
---|
10 |
|
---|
11 | #include <cppunit/extensions/HelperMacros.h>
|
---|
12 |
|
---|
13 | #include "bondgraph.hpp"
|
---|
14 |
|
---|
15 | class element;
|
---|
16 | class molecule;
|
---|
17 | class periodentafel;
|
---|
18 |
|
---|
19 | /********************************************** Test classes **************************************/
|
---|
20 |
|
---|
21 | class BondGraphTest : public CppUnit::TestFixture
|
---|
22 | {
|
---|
23 | CPPUNIT_TEST_SUITE( BondGraphTest) ;
|
---|
24 | CPPUNIT_TEST ( LoadTableTest );
|
---|
25 | CPPUNIT_TEST ( ConstructGraphTest );
|
---|
26 | CPPUNIT_TEST_SUITE_END();
|
---|
27 |
|
---|
28 | public:
|
---|
29 | void setUp();
|
---|
30 | void tearDown();
|
---|
31 | void LoadTableTest();
|
---|
32 | void ConstructGraphTest();
|
---|
33 |
|
---|
34 | private:
|
---|
35 |
|
---|
36 | molecule *TestMolecule;
|
---|
37 | element *hydrogen;
|
---|
38 | element *carbon;
|
---|
39 | periodentafel *tafel;
|
---|
40 |
|
---|
41 | BondGraph *BG;
|
---|
42 | string *filename;
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif /* BONDGRAPHUNITTEST_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.