Changeset fe238c for src/unittests/CountBondsUnitTest.cpp
- Timestamp:
- Apr 1, 2010, 6:52:09 PM (15 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:
- 734816
- Parents:
- 388049
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/CountBondsUnitTest.cpp
r388049 rfe238c 159 159 //OutputTestMolecule(TestMolecule1, "testmolecule1.xyz"); 160 160 161 // offset of (3,0,0), hence angles are (104.5, 0, 75.5, 180) < 30161 cout << "Case 1: offset of (3,0,0), hence angles are (104.5, 0, 75.5, 180) < 30." << endl; 162 162 Translator.Init(3,0,0); 163 163 TestMolecule2->Translate(&Translator); … … 168 168 TestMolecule2->Translate(&Translator); 169 169 170 // offset of (0,3,0), hence angle are (14.5, 165.5, 90) < 30 (only three, because other 90 is missing due to first H01 only fulfilling H-bond criteria)170 cout << "Case 2: offset of (0,3,0), hence angle are (14.5, 165.5, 90) < 30 (only three, because other 90 is missing due to first H01 only fulfilling H-bond criteria)." << endl; 171 171 Translator.Init(0,3,0); 172 172 TestMolecule2->Translate(&Translator); … … 176 176 TestMolecule2->Translate(&Translator); 177 177 178 // offset of (0,-3,0) and mirror, hence angle are (165.5, 90, 165.5, 90) > 30178 cout << "Case 3: offset of (0,-3,0) and mirror, hence angle are (165.5, 90, 165.5, 90) > 30." << endl; 179 179 Translator.Init(0,-3,0); 180 180 TestMolecule2->Scale((const double ** const)&mirror); … … 186 186 TestMolecule2->Scale((const double ** const)&mirror); 187 187 188 // offset of (2,1,0), hence angle are (78, 26.6, 102, 153.4) < 30188 cout << "Case 4: offset of (2,1,0), hence angle are (78, 26.6, 102, 153.4) < 30." << endl; 189 189 Translator.Init(2,1,0); 190 190 TestMolecule2->Translate(&Translator); … … 194 194 TestMolecule2->Translate(&Translator); 195 195 196 // offset of (0,0,3), hence angle are (90, 90, 90, 90) > 30196 cout << "Case 5: offset of (0,0,3), hence angle are (90, 90, 90, 90) > 30." << endl; 197 197 Translator.Init(0,0,3); 198 198 TestMolecule2->Translate(&Translator); … … 202 202 TestMolecule2->Translate(&Translator); 203 203 204 // offset of (-3,0,0) and mirror, hence angle are (75.5, 180, 104.5, 180) > 30204 cout << "Case 6: offset of (-3,0,0) and mirror, hence angle are (75.5, 180, 104.5, 180) > 30." << endl; 205 205 Translator.Init(-3,0,0); 206 206 TestMolecule2->Scale((const double ** const)&mirror); … … 211 211 TestMolecule2->Translate(&Translator); 212 212 TestMolecule2->Scale((const double ** const)&mirror); 213 214 cout << "Case 7: offset of (3,0,0) and mirror, hence angles are (104.5, 0, 104.5, 0) < 30, but interfering hydrogens." << endl; 215 Translator.Init(3,0,0); 216 TestMolecule2->Scale((const double ** const)&mirror); 217 TestMolecule2->Translate(&Translator); 218 CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) ); 219 //OutputTestMolecule(TestMolecule2, "testmolecule2-7.xyz"); 220 Translator.Init(-3,0,0); 221 TestMolecule2->Translate(&Translator); 222 TestMolecule2->Scale((const double ** const)&mirror); 223 224 cout << "Case 8: offset of (0,3,0), hence angle are (14.5, 90, 14.5, 90) < 30, but interfering hydrogens." << endl; 225 Translator.Init(0,3,0); 226 TestMolecule2->Scale((const double ** const)&mirror); 227 TestMolecule2->Translate(&Translator); 228 //OutputTestMolecule(TestMolecule2, "testmolecule2-8.xyz"); 229 CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) ); 230 Translator.Init(0,-3,0); 231 TestMolecule2->Translate(&Translator); 232 TestMolecule2->Scale((const double ** const)&mirror); 233 213 234 delete(mirror); 214 235 };
Note:
See TracChangeset
for help on using the changeset viewer.