Changeset 03c77c
- Timestamp:
- Feb 24, 2011, 7:43:03 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:
- 6a465e
- Parents:
- 8aba3c
- git-author:
- Frederik Heber <heber@…> (02/16/11 14:02:14)
- git-committer:
- Frederik Heber <heber@…> (02/24/11 19:43:03)
- Location:
- src
- Files:
-
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ConfigFileBuffer.cpp
r8aba3c r03c77c 22 22 #include "ConfigFileBuffer.hpp" 23 23 #include "Helpers/helpers.hpp" 24 #include "lists.hpp"25 24 #include "CodePatterns/Verbose.hpp" 26 25 #include "CodePatterns/Log.hpp" -
src/Makefile.am
r8aba3c r03c77c 220 220 graph.hpp \ 221 221 linkedcell.hpp \ 222 lists.hpp \223 222 molecule.hpp \ 224 223 parser.hpp \ -
src/atom.cpp
r8aba3c r03c77c 24 24 #include "config.hpp" 25 25 #include "element.hpp" 26 #include "lists.hpp"27 26 #include "parser.hpp" 28 27 #include "LinearAlgebra/Vector.hpp" -
src/atom_bondedparticle.cpp
r8aba3c r03c77c 27 27 #include "CodePatterns/Verbose.hpp" 28 28 #include "element.hpp" 29 #include "lists.hpp"30 29 31 30 /** Constructor of class BondedParticle. … … 40 39 BondedParticle::~BondedParticle() 41 40 { 42 BondList::iterator Runner; 43 for (std::vector<BondList>::iterator iter = ListOfBonds.begin(); 44 !ListOfBonds.empty(); 45 iter = ListOfBonds.begin()) { 46 while (!(*iter).empty()) { 47 Runner = (*iter).begin(); 48 removewithoutcheck(*Runner); 49 } 50 ListOfBonds.erase(iter); 41 const size_t max = ListOfBonds.size(); 42 for (size_t i = 0; i < max; ++i) { 43 ClearBondsAtStep(i); 51 44 } 52 45 }; -
src/bond.cpp
r8aba3c r03c77c 24 24 #include "bond.hpp" 25 25 #include "element.hpp" 26 #include "lists.hpp"27 26 28 27 … … 34 33 leftatom(NULL), 35 34 rightatom(NULL), 36 previous(NULL),37 next(NULL),38 35 HydrogenBond(0), 39 36 BondDegree(0), … … 53 50 leftatom(left), 54 51 rightatom(right), 55 previous(NULL),56 next(NULL),57 52 HydrogenBond(0), 58 53 BondDegree(degree), … … 79 74 if (rightatom != NULL) 80 75 rightatom->UnregisterBond(this); 81 unlink(this);82 76 }; 83 77 -
src/bond.hpp
r8aba3c r03c77c 36 36 atom *leftatom; //!< first bond partner 37 37 atom *rightatom; //!< second bond partner 38 bond *previous; //!< previous atom in molecule list39 bond *next; //!< next atom in molecule list40 38 int HydrogenBond; //!< Number of hydrogen atoms in the bond 41 39 int BondDegree; //!< single, double, triple, ... bond -
src/config.cpp
r8aba3c r03c77c 31 31 #include "Helpers/helpers.hpp" 32 32 #include "CodePatterns/Info.hpp" 33 #include "lists.hpp" 33 #include "CodePatterns/Log.hpp" 34 #include "CodePatterns/toString.hpp" 34 35 #include "CodePatterns/Verbose.hpp" 35 #include "CodePatterns/Log.hpp"36 36 #include "molecule.hpp" 37 37 #include "molecule.hpp" -
src/graph.hpp
r8aba3c r03c77c 19 19 #include <map> 20 20 #include <set> 21 #include <list> 21 22 22 23 /****************************************** forward declarations *****************************/ … … 61 62 */ 62 63 struct UniqueFragments { 64 typedef std::list<bond*> BondsPerSP; 65 typedef std::vector< BondsPerSP > AllSPBonds; 66 63 67 config *configuration; 64 68 atom *Root; … … 71 75 int *ShortestPathList; 72 76 bool **UsedList; 73 bond **BondsPerSPList;77 AllSPBonds BondsPerSPList; 74 78 int *BondsPerSPCount; 75 79 }; -
src/molecule.cpp
r8aba3c r03c77c 41 41 #include "LinearAlgebra/Vector.hpp" 42 42 #include "linkedcell.hpp" 43 #include "lists.hpp"44 43 #include "molecule.hpp" 45 44 #include "periodentafel.hpp" -
src/molecule.hpp
r8aba3c r03c77c 261 261 bool BuildInducedSubgraph(const molecule *Father); 262 262 molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); 263 void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);263 void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder); 264 264 int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList); 265 265 int GuesstimateFragmentCount(int order); -
src/molecule_fragmentation.cpp
r8aba3c r03c77c 28 28 #include "element.hpp" 29 29 #include "Helpers/helpers.hpp" 30 #include "lists.hpp"31 30 #include "CodePatterns/Verbose.hpp" 32 31 #include "CodePatterns/Log.hpp" … … 1105 1104 * \param SetDimension maximum number of bits in power set 1106 1105 * \param *FragmentSet snake stack to remove from 1106 * \param &BondsSet set of bonds 1107 1107 * \param *&TouchedList touched list 1108 1108 * \param TouchedIndex currently touched 1109 1109 * \return number of set bits 1110 1110 */ 1111 int AddPowersetToSnakeStack(int verbosity, int CurrentCombination, int SetDimension, KeySet *FragmentSet, bond **BondsSet, int *&TouchedList, int &TouchedIndex)1111 int AddPowersetToSnakeStack(int verbosity, int CurrentCombination, int SetDimension, KeySet *FragmentSet, std::vector<bond *> &BondsSet, int *&TouchedList, int &TouchedIndex) 1112 1112 { 1113 1113 atom *OtherWalker = NULL; … … 1137 1137 1138 1138 /** Counts the number of elements in a power set. 1139 * \param *SetFirst1140 * \param *SetLast1139 * \param SetFirst begin iterator first bond 1140 * \param SetLast end iterator 1141 1141 * \param *&TouchedList touched list 1142 1142 * \param TouchedIndex currently touched 1143 1143 * \return number of elements 1144 1144 */ 1145 int CountSetMembers( bond *SetFirst, bond *SetLast, int *&TouchedList, int TouchedIndex)1145 int CountSetMembers(std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex) 1146 1146 { 1147 1147 int SetDimension = 0; 1148 bond *Binder = SetFirst; // start node for this level1149 while (Binder->next != SetLast) { // compare to end node of this level1150 Binder = Binder->next;1148 for( std::list<bond *>::const_iterator Binder = SetFirst; 1149 Binder != SetLast; 1150 ++Binder) { 1151 1151 for (int k=TouchedIndex;k--;) { 1152 if ( Binder->Contains(TouchedList[k])) // if we added this very endpiece1152 if ((*Binder)->Contains(TouchedList[k])) // if we added this very endpiece 1153 1153 SetDimension++; 1154 1154 } … … 1157 1157 }; 1158 1158 1159 /** Counts the number of elements in a power set.1160 * \param *BondsList bonds listto fill1161 * \param *SetFirst1162 * \param *SetLast1159 /** Fills a list of bonds from another 1160 * \param *BondsList bonds array/vector to fill 1161 * \param SetFirst begin iterator first bond 1162 * \param SetLast end iterator 1163 1163 * \param *&TouchedList touched list 1164 1164 * \param TouchedIndex currently touched 1165 1165 * \return number of elements 1166 1166 */ 1167 int FillBondsList( bond **BondsList, bond *SetFirst, bond *SetLast, int *&TouchedList, int TouchedIndex)1167 int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex) 1168 1168 { 1169 1169 int SetDimension = 0; 1170 bond *Binder = SetFirst; // start node for this level1171 while (Binder->next != SetLast) { // compare to end node of this level1172 Binder = Binder->next;1170 for( std::list<bond *>::const_iterator Binder = SetFirst; 1171 Binder != SetLast; 1172 ++Binder) { 1173 1173 for (int k=0;k<TouchedIndex;k++) { 1174 if ( Binder->leftatom->nr == TouchedList[k]) // leftatom is always the closeone1175 BondsList[SetDimension++] = Binder;1174 if ((*Binder)->leftatom->nr == TouchedList[k]) // leftatom is always the closer one 1175 BondsList[SetDimension++] = (*Binder); 1176 1176 } 1177 1177 } … … 1210 1210 * -# removes all items added into the snake stack (in UniqueFragments structure) added during level (root 1211 1211 distance) and current set 1212 * \param *out output stream for debugging1213 1212 * \param FragmentSearch UniqueFragments structure with all values needed 1214 1213 * \param RootDistance current shortest path level, whose set of edges is represented by **BondsSet 1214 * \param BondsSet array of bonds to check 1215 1215 * \param SetDimension Number of possible bonds on this level (i.e. size of the array BondsSet[]) 1216 1216 * \param SubOrder remaining number of allowed vertices to add 1217 1217 */ 1218 void molecule::SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder)1218 void molecule::SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder) 1219 1219 { 1220 1220 int verbosity = 0; //FragmentSearch->ANOVAOrder-SubOrder; … … 1258 1258 1259 1259 // first count the members in the subset 1260 SubSetDimension = CountSetMembers(FragmentSearch->BondsPerSPList[ 2*SP], FragmentSearch->BondsPerSPList[2*SP+1], TouchedList, TouchedIndex);1260 SubSetDimension = CountSetMembers(FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex); 1261 1261 1262 1262 // then allocate and fill the list 1263 bond *BondsList[SubSetDimension]; 1264 SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[2*SP], FragmentSearch->BondsPerSPList[2*SP+1], TouchedList, TouchedIndex); 1263 std::vector<bond *> BondsList; 1264 BondsList.resize(SubSetDimension); 1265 SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex); 1265 1266 1266 1267 // then iterate … … 1300 1301 void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch) 1301 1302 { 1302 FragmentSearch.BondsPerSPList = new bond* [Order * 2];1303 FragmentSearch.BondsPerSPList.resize(Order); 1303 1304 FragmentSearch.BondsPerSPCount = new int[Order]; 1304 1305 for (int i=Order;i--;) { 1305 FragmentSearch.BondsPerSPList[2*i] = new bond(); // start node1306 FragmentSearch.BondsPerSPList[2*i+1] = new bond(); // end node1307 FragmentSearch.BondsPerSPList[2*i]->next = FragmentSearch.BondsPerSPList[2*i+1]; // intertwine these two1308 FragmentSearch.BondsPerSPList[2*i+1]->previous = FragmentSearch.BondsPerSPList[2*i];1309 1306 FragmentSearch.BondsPerSPCount[i] = 0; 1310 1307 } … … 1320 1317 { 1321 1318 delete[](FragmentSearch.BondsPerSPCount); 1322 for (int i=Order;i--;) {1323 delete(FragmentSearch.BondsPerSPList[2*i]);1324 delete(FragmentSearch.BondsPerSPList[2*i+1]);1325 }1326 delete[](FragmentSearch.BondsPerSPList);1327 1319 }; 1328 1320 … … 1345 1337 FragmentSearch.BondsPerSPCount[0] = 1; 1346 1338 bond *Binder = new bond(FragmentSearch.Root, FragmentSearch.Root); 1347 add(Binder, FragmentSearch.BondsPerSPList[1]);1339 FragmentSearch.BondsPerSPList[0].push_back(Binder); 1348 1340 }; 1349 1341 … … 1356 1348 void ResetSPList(int Order, struct UniqueFragments &FragmentSearch) 1357 1349 { 1358 bond *Binder = NULL;1359 1350 DoLog(0) && (Log() << Verbose(0) << "Free'ing all found lists. and resetting index lists" << endl); 1360 1351 for(int i=Order;i--;) { 1361 1352 DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": "); 1362 Binder = FragmentSearch.BondsPerSPList[2*i];1363 while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) {1364 Binder = Binder->next;1353 for (UniqueFragments::BondsPerSP::const_iterator iter = FragmentSearch.BondsPerSPList[i].begin(); 1354 iter != FragmentSearch.BondsPerSPList[i].end(); 1355 ++iter) { 1365 1356 // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->nr << " and " << Binder->rightatom->nr << "." << endl; // make sure numbers are local 1366 FragmentSearch.ShortestPathList[ Binder->leftatom->nr] = -1;1367 FragmentSearch.ShortestPathList[ Binder->rightatom->nr] = -1;1357 FragmentSearch.ShortestPathList[(*iter)->leftatom->nr] = -1; 1358 FragmentSearch.ShortestPathList[(*iter)->rightatom->nr] = -1; 1368 1359 } 1369 1360 // delete added bonds 1370 cleanup(FragmentSearch.BondsPerSPList[2*i], FragmentSearch.BondsPerSPList[2*i+1]); 1361 for (UniqueFragments::BondsPerSP::iterator iter = FragmentSearch.BondsPerSPList[i].begin(); 1362 iter != FragmentSearch.BondsPerSPList[i].end(); 1363 ++iter) { 1364 delete(*iter); 1365 } 1366 FragmentSearch.BondsPerSPList[i].clear(); 1371 1367 // also start and end node 1372 1368 DoLog(0) && (Log() << Verbose(0) << "cleaned." << endl); … … 1394 1390 atom *OtherWalker = NULL; 1395 1391 atom *Predecessor = NULL; 1396 bond *CurrentEdge = NULL;1397 1392 bond *Binder = NULL; 1398 1393 int RootKeyNr = FragmentSearch.Root->GetTrueFather()->nr; … … 1410 1405 1411 1406 RemainingWalkers = FragmentSearch.BondsPerSPCount[SP]; 1412 CurrentEdge = FragmentSearch.BondsPerSPList[2*SP]; /// start of this SP level's list1413 while (CurrentEdge->next != FragmentSearch.BondsPerSPList[2*SP+1]) { /// end of this SP level's list1414 CurrentEdge = CurrentEdge->next;1407 for (UniqueFragments::BondsPerSP::const_iterator CurrentEdge = FragmentSearch.BondsPerSPList[SP].begin(); 1408 CurrentEdge != FragmentSearch.BondsPerSPList[SP].end(); 1409 ++CurrentEdge) { /// start till end of this SP level's list 1415 1410 RemainingWalkers--; 1416 Walker = CurrentEdge->rightatom; // rightatom is always the one more distant1417 Predecessor = CurrentEdge->leftatom; // ... and leftatom is predecessor1411 Walker = (*CurrentEdge)->rightatom; // rightatom is always the one more distant 1412 Predecessor = (*CurrentEdge)->leftatom; // ... and leftatom is predecessor 1418 1413 AtomKeyNr = Walker->nr; 1419 1414 DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->nr << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl); … … 1438 1433 // add the bond in between to the SP list 1439 1434 Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant 1440 add(Binder, FragmentSearch.BondsPerSPList[2*(SP+1)+1]);1435 FragmentSearch.BondsPerSPList[SP+1].push_back(Binder); 1441 1436 FragmentSearch.BondsPerSPCount[SP+1]++; 1442 1437 DoLog(3) && (Log() << Verbose(3) << "Added its bond to SP list, having now " << FragmentSearch.BondsPerSPCount[SP+1] << " item(s)." << endl); … … 1460 1455 void OutputSPList(int Order, struct UniqueFragments &FragmentSearch) 1461 1456 { 1462 bond *Binder = NULL;1463 1457 DoLog(0) && (Log() << Verbose(0) << "Printing all found lists." << endl); 1464 1458 for(int i=1;i<Order;i++) { // skip the root edge in the printing 1465 Binder = FragmentSearch.BondsPerSPList[2*i];1466 1459 DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << "." << endl); 1467 while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) { 1468 Binder = Binder->next; 1460 for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin(); 1461 Binder != FragmentSearch.BondsPerSPList[i].end(); 1462 ++Binder) { 1469 1463 DoLog(2) && (Log() << Verbose(2) << *Binder << endl); 1470 1464 } … … 1479 1473 int CountNumbersInBondsList(int Order, struct UniqueFragments &FragmentSearch) 1480 1474 { 1481 bond *Binder = NULL;1482 1475 int SP = -1; // the Root <-> Root edge must be subtracted! 1483 1476 for(int i=Order;i--;) { // sum up all found edges 1484 Binder = FragmentSearch.BondsPerSPList[2*i];1485 while (Binder->next != FragmentSearch.BondsPerSPList[2*i+1]) {1486 Binder = Binder->next;1477 for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin(); 1478 Binder != FragmentSearch.BondsPerSPList[i].end(); 1479 ++Binder) { 1487 1480 SP++; 1488 1481 } … … 1531 1524 1532 1525 // prepare the subset and call the generator 1533 bond* BondsList[FragmentSearch.BondsPerSPCount[0]]; 1534 for(int i=0;i<FragmentSearch.BondsPerSPCount[0];i++) 1535 BondsList[i] = NULL; 1536 BondsList[0] = FragmentSearch.BondsPerSPList[0]->next; // on SP level 0 there's only the root bond 1526 std::vector<bond*> BondsList; 1527 BondsList.resize(FragmentSearch.BondsPerSPCount[0]); 1528 ASSERT(FragmentSearch.BondsPerSPList[0].size() != 0, 1529 "molecule::PowerSetGenerator() - FragmentSearch.BondsPerSPList[0] contains no root bond."); 1530 BondsList[0] = (*FragmentSearch.BondsPerSPList[0].begin()); // on SP level 0 there's only the root bond 1537 1531 1538 1532 SPFragmentGenerator(&FragmentSearch, 0, BondsList, FragmentSearch.BondsPerSPCount[0], Order); … … 1797 1791 { 1798 1792 bond *Binder = NULL; 1799 bond *OtherBinder = NULL;1793 //bond *OtherBinder = NULL; 1800 1794 atom *Walker = NULL; 1801 1795 atom *OtherWalker = NULL; … … 1803 1797 enum Shading *ColorList = NULL; 1804 1798 double tmp; 1805 bool LastBond = true; // only needed to due list construct1799 //bool LastBond = true; // only needed to due list construct 1806 1800 Vector Translationvector; 1807 1801 //std::deque<atom *> *CompStack = NULL; … … 1829 1823 //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl; 1830 1824 if (tmp > BondDistance) { 1831 // OtherBinder = Binder->next; // note down binding partner for later re-insertion1832 // if (OtherBinder != NULL) {1833 // LastBond = false;1834 // } else {1835 // OtherBinder = Binder->previous;1836 // LastBond = true;1837 // }1838 // unlink(Binder); // unlink bond1839 1825 DoLog(2) && (Log() << Verbose(2) << "Correcting at bond " << *Binder << "." << endl); 1840 1826 flag = true; … … 1877 1863 } 1878 1864 } 1879 // re-add bond1880 if (OtherBinder == NULL) { // is the only bond?1881 //Do nothing1882 } else {1883 if (!LastBond) {1884 link(Binder, OtherBinder); 1885 } else {1886 link(OtherBinder, Binder); 1887 }1888 }1865 // // re-add bond 1866 // if (OtherBinder == NULL) { // is the only bond? 1867 // //Do nothing 1868 // } else { 1869 // if (!LastBond) { 1870 // link(Binder, OtherBinder); // no more implemented bond::previous ... 1871 // } else { 1872 // link(OtherBinder, Binder); // no more implemented bond::previous ... 1873 // } 1874 // } 1889 1875 } else { 1890 1876 DoLog(3) && (Log() << Verbose(3) << "No corrections for this fragment." << endl); -
src/molecule_graph.cpp
r8aba3c r03c77c 32 32 #include "LinearAlgebra/RealSpaceMatrix.hpp" 33 33 #include "linkedcell.hpp" 34 #include "lists.hpp"35 34 #include "molecule.hpp" 36 35 #include "World.hpp" -
src/moleculelist.cpp
r8aba3c r03c77c 38 38 #include "LinearAlgebra/RealSpaceMatrix.hpp" 39 39 #include "linkedcell.hpp" 40 #include "lists.hpp"41 40 #include "molecule.hpp" 42 41 #include "periodentafel.hpp" -
src/periodentafel.cpp
r8aba3c r03c77c 29 29 #include "Helpers/helpers.hpp" 30 30 #include "CodePatterns/Log.hpp" 31 //#include "lists.hpp"32 31 #include "periodentafel.hpp" 33 32 #include "CodePatterns/Verbose.hpp" -
src/unittests/BondGraphUnitTest.cpp
r8aba3c r03c77c 156 156 { 157 157 158 //atom *Walker = TestMolecule->start->next;159 //atom *Runner = TestMolecule->end->previous;160 //CPPUNIT_ASSERT( TestMolecule->end != Walker );161 158 CPPUNIT_ASSERT_EQUAL( false , BG->LoadBondLengthTable(dummy) ); 162 159 CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph(TestMolecule) );
Note:
See TracChangeset
for help on using the changeset viewer.