Ignore:
Timestamp:
Apr 29, 2010, 1:55:21 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
070651, 5d1a94
Parents:
90c4460 (diff), 32842d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'VectorRefactoring' into StructureRefactoring

Conflicts:

molecuilder/src/Legacy/oldmenu.cpp
molecuilder/src/Makefile.am
molecuilder/src/analysis_correlation.cpp
molecuilder/src/boundary.cpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/ellipsoid.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/molecule.cpp
molecuilder/src/molecule_fragmentation.cpp
molecuilder/src/molecule_geometry.cpp
molecuilder/src/molecule_graph.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/tesselation.cpp
molecuilder/src/tesselationhelpers.cpp
molecuilder/src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
molecuilder/src/unittests/bondgraphunittest.cpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/CountBondsUnitTest.cpp

    r90c4460 r0d111b  
    7272  Walker = World::getInstance().createAtom();
    7373  Walker->type = hydrogen;
    74   Walker->node->Init(-0.2418, 0.9350, 0. );
     74  *Walker->node = Vector(-0.2418, 0.9350, 0. );
    7575  TestMolecule1->AddAtom(Walker);
    7676  Walker = World::getInstance().createAtom();
    7777  Walker->type = hydrogen;
    78   Walker->node->Init(0.9658, 0., 0. );
     78  *Walker->node = Vector(0.9658, 0., 0. );
    7979  TestMolecule1->AddAtom(Walker);
    8080  Walker = World::getInstance().createAtom();
    8181  Walker->type = oxygen;
    82   Walker->node->Init(0., 0., 0. );
     82  *Walker->node = Vector(0., 0., 0. );
    8383  TestMolecule1->AddAtom(Walker);
    8484
     
    8686  Walker = World::getInstance().createAtom();
    8787  Walker->type = hydrogen;
    88   Walker->node->Init(-0.2418, 0.9350, 0. );
     88  *Walker->node = Vector(-0.2418, 0.9350, 0. );
    8989  TestMolecule2->AddAtom(Walker);
    9090  Walker = World::getInstance().createAtom();
    9191  Walker->type = hydrogen;
    92   Walker->node->Init(0.9658, 0., 0. );
     92  *Walker->node = Vector(0.9658, 0., 0. );
    9393  TestMolecule2->AddAtom(Walker);
    9494  Walker = World::getInstance().createAtom();
    9595  Walker->type = oxygen;
    96   Walker->node->Init(0., 0., 0. );
     96  *Walker->node = Vector(0., 0., 0. );
    9797  TestMolecule2->AddAtom(Walker);
    9898
     
    165165
    166166  cout << "Case 1: offset of (3,0,0), hence angles are (104.5, 0, 75.5, 180) < 30." << endl;
    167   Translator.Init(3,0,0);
     167  Translator  = Vector(3,0,0);
    168168  TestMolecule2->Translate(&Translator);
    169169  CPPUNIT_ASSERT_EQUAL( 1 , CountHydrogenBridgeBonds(molecules, NULL) );
    170170  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, oxygen) );
    171171  //OutputTestMolecule(TestMolecule2, "testmolecule2-1.xyz");
    172   Translator.Init(-3,0,0);
     172  Translator = Vector(-3,0,0);
    173173  TestMolecule2->Translate(&Translator);
    174174
    175175  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;
    176   Translator.Init(0,3,0);
     176  Translator = Vector(0,3,0);
    177177  TestMolecule2->Translate(&Translator);
    178178  CPPUNIT_ASSERT_EQUAL( 1 , CountHydrogenBridgeBonds(molecules, NULL) );
    179179  //OutputTestMolecule(TestMolecule2, "testmolecule2-2.xyz");
    180   Translator.Init(0,-3,0);
     180  Translator = Vector(0,-3,0);
    181181  TestMolecule2->Translate(&Translator);
    182182
    183183  cout << "Case 3: offset of (0,-3,0) and mirror, hence angle are (165.5, 90, 165.5, 90) > 30." << endl;
    184   Translator.Init(0,-3,0);
     184  Translator = Vector(0,-3,0);
    185185  TestMolecule2->Scale((const double ** const)&mirror);
    186186  TestMolecule2->Translate(&Translator);
    187187  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) );
    188188  //OutputTestMolecule(TestMolecule2, "testmolecule2-3.xyz");
    189   Translator.Init(0,3,0);
     189  Translator = Vector(0,3,0);
    190190  TestMolecule2->Translate(&Translator);
    191191  TestMolecule2->Scale((const double ** const)&mirror);
    192192
    193193  cout << "Case 4: offset of (2,1,0), hence angle are (78, 26.6, 102, 153.4) < 30." << endl;
    194   Translator.Init(2,1,0);
     194  Translator = Vector(2,1,0);
    195195  TestMolecule2->Translate(&Translator);
    196196  CPPUNIT_ASSERT_EQUAL( 1 , CountHydrogenBridgeBonds(molecules, NULL) );
    197197  //OutputTestMolecule(TestMolecule2, "testmolecule2-4.xyz");
    198   Translator.Init(-2,-1,0);
     198  Translator = Vector(-2,-1,0);
    199199  TestMolecule2->Translate(&Translator);
    200200
    201201  cout << "Case 5: offset of (0,0,3), hence angle are (90, 90, 90, 90) > 30." << endl;
    202   Translator.Init(0,0,3);
     202  Translator = Vector(0,0,3);
    203203  TestMolecule2->Translate(&Translator);
    204204  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) );
    205205  //OutputTestMolecule(TestMolecule2, "testmolecule2-5.xyz");
    206   Translator.Init(0,0,-3);
     206  Translator = Vector(0,0,-3);
    207207  TestMolecule2->Translate(&Translator);
    208208
    209209  cout << "Case 6: offset of (-3,0,0) and mirror, hence angle are (75.5, 180, 104.5, 180) > 30." << endl;
    210   Translator.Init(-3,0,0);
     210  Translator = Vector(-3,0,0);
    211211  TestMolecule2->Scale((const double ** const)&mirror);
    212212  TestMolecule2->Translate(&Translator);
    213213  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) );
    214214  //OutputTestMolecule(TestMolecule2, "testmolecule2-6.xyz");
    215   Translator.Init(3,0,0);
     215  Translator = Vector(3,0,0);
    216216  TestMolecule2->Translate(&Translator);
    217217  TestMolecule2->Scale((const double ** const)&mirror);
    218218
    219219  cout << "Case 7: offset of (3,0,0) and mirror, hence angles are (104.5, 0, 104.5, 0) < 30, but interfering hydrogens." << endl;
    220   Translator.Init(3,0,0);
     220  Translator = Vector(3,0,0);
    221221  TestMolecule2->Scale((const double ** const)&mirror);
    222222  TestMolecule2->Translate(&Translator);
    223223  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) );
    224224  //OutputTestMolecule(TestMolecule2, "testmolecule2-7.xyz");
    225   Translator.Init(-3,0,0);
     225  Translator = Vector(-3,0,0);
    226226  TestMolecule2->Translate(&Translator);
    227227  TestMolecule2->Scale((const double ** const)&mirror);
    228228
    229229  cout << "Case 8: offset of (0,3,0), hence angle are (14.5, 90, 14.5, 90) < 30, but interfering hydrogens." << endl;
    230   Translator.Init(0,3,0);
     230  Translator = Vector(0,3,0);
    231231  TestMolecule2->Scale((const double ** const)&mirror);
    232232  TestMolecule2->Translate(&Translator);
    233233  //OutputTestMolecule(TestMolecule2, "testmolecule2-8.xyz");
    234234  CPPUNIT_ASSERT_EQUAL( 0 , CountHydrogenBridgeBonds(molecules, NULL) );
    235   Translator.Init(0,-3,0);
     235  Translator = Vector(0,-3,0);
    236236  TestMolecule2->Translate(&Translator);
    237237  TestMolecule2->Scale((const double ** const)&mirror);
Note: See TracChangeset for help on using the changeset viewer.