source: src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp@ 72b467

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 72b467 was fe90ab, checked in by Frederik Heber <heber@…>, 9 years ago

recurseMatching() now takes connections into account.

  • matchSphericalPointDistribution() replaced by getRemainingPoints() as that describes what it does. match...() sounds symmetrical which the function is no longer as connection is associated with former _newpolygon.
  • SphericalPointDistribution now has internal points and adjacency, initialized by initSelf().
  • findBestMatching() and getRemainingPoints() are no longer static functions.
  • all unit tests are working again, including the .._multiple() that tests for joint points due to bond degree greater than 1.
  • the huge case switch in SaturatedFragment::saturateAtom() now resides in initSelf().
  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2 * SphericalPointDistributionUnitTest.hpp
3 *
4 * Created on: May 29, 2014
5 * Author: heber
6 */
7
8#ifndef SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_
9#define SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include <cppunit/extensions/HelperMacros.h>
18
19/********************************************** Test classes **************************************/
20
21/** Template specialization needs to be in front of adding the test via CPPUNIT_TEST
22 * Hence,we put it in an extra class and inherit the functions.
23 */
24struct SphericalPointDistributionTest_assistant
25{
26public:
27 template <int N>
28 void getConnectionTest();
29};
30
31template <> void SphericalPointDistributionTest_assistant::getConnectionTest<0>();
32template <> void SphericalPointDistributionTest_assistant::getConnectionTest<1>();
33template <> void SphericalPointDistributionTest_assistant::getConnectionTest<2>();
34template <> void SphericalPointDistributionTest_assistant::getConnectionTest<8>();
35template <> void SphericalPointDistributionTest_assistant::getConnectionTest<9>();
36template <> void SphericalPointDistributionTest_assistant::getConnectionTest<10>();
37template <> void SphericalPointDistributionTest_assistant::getConnectionTest<11>();
38template <> void SphericalPointDistributionTest_assistant::getConnectionTest<12>();
39template <> void SphericalPointDistributionTest_assistant::getConnectionTest<14>();
40
41#include "SphericalPointDistributionUnitTest_assistant.hpp"
42
43class SphericalPointDistributionTest :
44 public CppUnit::TestFixture,
45 public SphericalPointDistributionTest_assistant
46{
47
48private:
49 CPPUNIT_TEST_SUITE( SphericalPointDistributionTest) ;
50 CPPUNIT_TEST( calculateCenterOfMinimumDistanceTest );
51 CPPUNIT_TEST ( areEqualToWithinBoundsTest );
52 CPPUNIT_TEST ( joinPointsTest );
53 CPPUNIT_TEST ( getConnectionTest<0> );
54 CPPUNIT_TEST ( getConnectionTest<1> );
55 CPPUNIT_TEST ( getConnectionTest<2> );
56 CPPUNIT_TEST ( getConnectionTest<3> );
57 CPPUNIT_TEST ( getConnectionTest<4> );
58 CPPUNIT_TEST ( getConnectionTest<5> );
59 CPPUNIT_TEST ( getConnectionTest<6> );
60 CPPUNIT_TEST ( getConnectionTest<7> );
61 CPPUNIT_TEST ( getConnectionTest<8> );
62 CPPUNIT_TEST ( getConnectionTest<9> );
63 CPPUNIT_TEST ( getConnectionTest<10> );
64 CPPUNIT_TEST ( getConnectionTest<11> );
65 CPPUNIT_TEST ( getConnectionTest<12> );
66 CPPUNIT_TEST ( getConnectionTest<14> );
67 CPPUNIT_TEST ( getRemainingPointsTest_2 );
68 CPPUNIT_TEST ( getRemainingPointsTest_3 );
69 CPPUNIT_TEST ( getRemainingPointsTest_4 );
70 CPPUNIT_TEST ( getRemainingPointsTest_5 );
71 CPPUNIT_TEST ( getRemainingPointsTest_6 );
72 CPPUNIT_TEST ( getRemainingPointsTest_7 );
73 CPPUNIT_TEST ( getRemainingPointsTest_8 );
74 CPPUNIT_TEST ( getRemainingPointsTest_multiple );
75 CPPUNIT_TEST_SUITE_END();
76
77public:
78 void setUp();
79 void tearDown();
80 void calculateCenterOfMinimumDistanceTest();
81 void areEqualToWithinBoundsTest();
82 void joinPointsTest();
83 void getRemainingPointsTest_2();
84 void getRemainingPointsTest_3();
85 void getRemainingPointsTest_4();
86 void getRemainingPointsTest_5();
87 void getRemainingPointsTest_6();
88 void getRemainingPointsTest_7();
89 void getRemainingPointsTest_8();
90 void getRemainingPointsTest_multiple();
91
92private:
93};
94
95#endif /* SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.