Changeset 6250e5 for molecuilder/src/unittests/CountBondsUnitTest.cpp
- Timestamp:
- Apr 1, 2010, 6:52:09 PM (15 years ago)
- Children:
- 6dd8d3
- Parents:
- 794482
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/CountBondsUnitTest.cpp
r794482 r6250e5 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.