Changeset e65de8 for src/unittests
- Timestamp:
- Jul 25, 2010, 9:43:56 PM (14 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, 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_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- a8a010
- Parents:
- 521bbf
- Location:
- src/unittests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/AnalysisCorrelationToPointUnitTest.cpp
r521bbf re65de8 16 16 #include "analysis_correlation.hpp" 17 17 #include "AnalysisCorrelationToPointUnitTest.hpp" 18 19 #include "Descriptors/MoleculeDescriptor.hpp" 18 20 19 21 #include "atom.hpp" … … 38 40 39 41 // init private all pointers to zero 40 TestList = NULL;41 42 TestMolecule = NULL; 42 43 pointmap = NULL; … … 71 72 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 72 73 73 TestList = World::getInstance().getMolecules();74 TestList->insert(TestMolecule);75 74 TestMolecule->ActiveFlag = true; 76 75 … … 79 78 80 79 // init maps 81 pointmap = CorrelationToPoint( (MoleculeListClass * const)TestList, elements, (const Vector *)point ); 80 World::getInstance().selectAllMolecules(AllMolecules()); 81 allMolecules = World::getInstance().getSelectedMolecules(); 82 CPPUNIT_ASSERT_EQUAL( (size_t) 1, allMolecules.size()); 83 pointmap = CorrelationToPoint( allMolecules, elements, (const Vector *)point ); 82 84 binmap = NULL; 83 85 -
src/unittests/AnalysisCorrelationToPointUnitTest.hpp
r521bbf re65de8 35 35 private: 36 36 37 MoleculeListClass *TestList;37 std::vector<molecule *> allMolecules; 38 38 molecule *TestMolecule; 39 39 element *hydrogen; -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
r521bbf re65de8 16 16 #include "analysis_correlation.hpp" 17 17 #include "AnalysisCorrelationToSurfaceUnitTest.hpp" 18 19 #include "Descriptors/MoleculeDescriptor.hpp" 18 20 19 21 #include "atom.hpp" … … 45 47 46 48 // init private all pointers to zero 47 TestList = NULL;48 49 TestSurfaceMolecule = NULL; 49 50 surfacemap = NULL; … … 83 84 CPPUNIT_ASSERT_EQUAL( TestSurfaceMolecule->getAtomCount(), 4 ); 84 85 85 TestList = World::getInstance().getMolecules();86 86 TestSurfaceMolecule->ActiveFlag = true; 87 TestList->insert(TestSurfaceMolecule);88 87 89 88 // init tesselation and linked cell … … 116 115 TestSurfaceMolecule->AddAtom(Walker); 117 116 118 TestSurfaceMolecule->ActiveFlag = true; 119 TestList->insert(TestSurfaceMolecule); 117 World::getInstance().selectAllMolecules(AllMolecules()); 118 allMolecules = World::getInstance().getSelectedMolecules(); 119 CPPUNIT_ASSERT_EQUAL( (size_t) 2, allMolecules.size()); 120 120 121 121 // init maps … … 146 146 { 147 147 CPPUNIT_ASSERT_EQUAL( 4, TestSurfaceMolecule->getAtomCount() ); 148 CPPUNIT_ASSERT_EQUAL( (size_t)2, TestList->ListOfMolecules.size() );148 CPPUNIT_ASSERT_EQUAL( (size_t)2, allMolecules.size() ); 149 149 CPPUNIT_ASSERT_EQUAL( (size_t)4, Surface->PointsOnBoundary.size() ); 150 150 CPPUNIT_ASSERT_EQUAL( (size_t)6, Surface->LinesOnBoundary.size() ); … … 156 156 // do the pair correlation 157 157 elements.push_back(hydrogen); 158 surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );158 surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC ); 159 159 // OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap ); 160 160 CPPUNIT_ASSERT( surfacemap != NULL ); … … 166 166 BinPairMap::iterator tester; 167 167 elements.push_back(hydrogen); 168 surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );168 surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC ); 169 169 // put pair correlation into bins and check with no range 170 170 // OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap ); … … 182 182 BinPairMap::iterator tester; 183 183 elements.push_back(hydrogen); 184 surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );184 surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC ); 185 185 // OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap ); 186 186 // ... and check with [0., 2.] range … … 201 201 BinPairMap::iterator tester; 202 202 elements.push_back(carbon); 203 surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );203 surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC ); 204 204 // OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap ); 205 205 // put pair correlation into bins and check with no range … … 221 221 BinPairMap::iterator tester; 222 222 elements.push_back(carbon); 223 surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );223 surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC ); 224 224 // OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap ); 225 225 // ... and check with [0., 2.] range -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp
r521bbf re65de8 43 43 private: 44 44 45 MoleculeListClass *TestList;45 std::vector<molecule *> allMolecules; 46 46 molecule *TestSurfaceMolecule; 47 47 element *hydrogen; -
src/unittests/AnalysisPairCorrelationUnitTest.cpp
r521bbf re65de8 16 16 #include "analysis_correlation.hpp" 17 17 #include "AnalysisPairCorrelationUnitTest.hpp" 18 19 #include "Descriptors/MoleculeDescriptor.hpp" 18 20 19 21 #include "World.hpp" … … 42 44 43 45 // init private all pointers to zero 44 TestList = NULL;45 46 TestMolecule = NULL; 46 47 correlationmap = NULL; … … 76 77 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 77 78 78 TestList = World::getInstance().getMolecules();79 TestMolecule->ActiveFlag = true;80 TestList->insert(TestMolecule);81 82 79 // init maps 83 correlationmap = PairCorrelation( TestList, elements); 80 World::getInstance().selectAllMolecules(AllMolecules()); 81 allMolecules = World::getInstance().getSelectedMolecules(); 82 CPPUNIT_ASSERT_EQUAL( (size_t) 1, allMolecules.size()); 83 correlationmap = PairCorrelation( allMolecules, elements); 84 84 binmap = NULL; 85 85 -
src/unittests/AnalysisPairCorrelationUnitTest.hpp
r521bbf re65de8 35 35 private: 36 36 37 MoleculeListClass *TestList;37 std::vector<molecule *> allMolecules; 38 38 molecule *TestMolecule; 39 39 element *hydrogen;
Note:
See TracChangeset
for help on using the changeset viewer.