Changeset 08b88b for molecuilder/src/config.cpp
- Timestamp:
- Nov 3, 2009, 2:34:02 PM (16 years ago)
- Children:
- c1b4a4
- Parents:
- 5f9f8b
- git-author:
- Frederik Heber <heber@…> (11/03/09 14:27:15)
- git-committer:
- Frederik Heber <heber@…> (11/03/09 14:34:02)
- File:
-
- 1 edited
-
molecuilder/src/config.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/config.cpp
r5f9f8b r08b88b 1051 1051 } else { 1052 1052 cout << Verbose(0) << "Bond length table loading failed." << endl; 1053 BG->SetMaxDistanceToMaxOfCovalentRadii((ofstream *)&cout, periode); 1053 1054 } 1054 1055 1055 1056 // 3. parse the molecule in 1056 1057 LoadMolecule(mol, FileBuffer, periode, FastParsing); 1057 mol->ActiveFlag = true;1058 MolList->insert(mol);1058 //mol->ActiveFlag = true; 1059 //MolList->insert(mol); 1059 1060 1060 1061 // 4. dissect the molecule into connected subgraphs 1061 1062 BG->ConstructBondGraph((ofstream *)&cout, mol); 1063 1064 // 5. scan for connected subgraphs 1065 MoleculeLeafClass *Subgraphs = NULL; // list of subgraphs from DFS analysis 1066 class StackClass<bond *> *BackEdgeStack = NULL; 1067 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, BackEdgeStack); 1068 delete(BackEdgeStack); 1069 1070 // 6. dissect 1071 atom ***ListOfLocalAtoms = NULL; 1072 int FragmentCounter = 0; 1073 MoleculeLeafClass *MolecularWalker = Subgraphs; 1074 atom *Walker = NULL; 1075 while (MolecularWalker->next != NULL) { 1076 MolecularWalker = MolecularWalker->next; 1077 // fill the bond structure of the individually stored subgraphs (goes through whole chained list by itself) 1078 MolecularWalker->FillBondStructureFromReference((ofstream *)&cout, mol, FragmentCounter, ListOfLocalAtoms, false); // we don't want to keep the created ListOfLocalAtoms 1079 FragmentCounter++; 1080 MolecularWalker->Leaf->ActiveFlag = true; 1081 Walker = MolecularWalker->Leaf->start; 1082 while (Walker->next != MolecularWalker->Leaf->end) { 1083 Walker = Walker->next; 1084 Walker->father = Walker; 1085 } 1086 MolList->insert(MolecularWalker->Leaf); 1087 MolecularWalker->Leaf = NULL; // don't remove molecule when deleting MolecularWalker 1088 delete(MolecularWalker->previous); 1089 } 1090 delete(MolecularWalker); 1091 for (int i=0;i<FragmentCounter;i++) 1092 Free(&ListOfLocalAtoms[i]); 1093 Free(&ListOfLocalAtoms); 1094 cout << Verbose(1) << "I scanned " << FragmentCounter << " molecules." << endl; 1095 1096 // 6. free parsed in molecule 1097 delete(mol); 1062 1098 1063 1099 delete(FileBuffer);
Note:
See TracChangeset
for help on using the changeset viewer.
