Changeset 2b79c3 for molecuilder/src/molecules.cpp
- Timestamp:
- May 8, 2008, 3:39:36 PM (17 years ago)
- Children:
- d88597
- Parents:
- 169b24
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.cpp
r169b24 r2b79c3 2273 2273 2274 2274 // ===== 8a. translate list into global numbers (i.e. ones that are valid in "this" molecule, not in MolecularWalker->Leaf) 2275 MolecularWalker = Subgraphs; 2276 FragmentCounter = 0; 2277 while (MolecularWalker->next != NULL) { 2278 MolecularWalker = MolecularWalker->next; 2279 KeySet *TempSet = new KeySet; 2280 for(Graph::iterator runner = FragmentList[FragmentCounter]->begin(); runner != FragmentList[FragmentCounter]->end(); runner++) { 2281 for(KeySet::iterator sprinter = (*runner).first.begin(); sprinter != (*runner).first.end(); sprinter++) 2282 TempSet->insert((MolecularWalker->Leaf->FindAtom(*sprinter))->GetTrueFather()->nr); 2283 TotalGraph.insert(GraphPair(*TempSet, pair<int,double>(TotalNumberOfKeySets++, (*runner).second.second))); 2284 TempSet->clear(); 2285 } 2286 delete(TempSet); 2287 delete(FragmentList[FragmentCounter]); 2288 FragmentCounter++; 2289 } 2290 Free((void **)&FragmentList, "molecule::FragmentMolecule - **FragmentList"); 2275 Subgraphs->next->TranslateIndicesToGlobalIDs(out, FragmentList, (FragmentCounter = 0), TotalNumberOfKeySets, TotalGraph); 2276 2291 2277 // free subgraph memory again 2292 2278 delete(ParsedFragmentList); 2279 FragmentCounter = 0; 2293 2280 if (Subgraphs != NULL) { 2294 2281 while (Subgraphs->next != NULL) { 2295 2282 Subgraphs = Subgraphs->next; 2283 delete(FragmentList[FragmentCounter++]); 2296 2284 delete(Subgraphs->previous); 2297 2285 } 2298 2286 delete(Subgraphs); 2299 2287 } 2288 Free((void **)&FragmentList, "molecule::FragmentMolecule - **FragmentList"); 2300 2289 2301 2290 // ===== 8b. gather keyset lists (graphs) from all subgraphs and transform into MoleculeListClass =====
Note:
See TracChangeset
for help on using the changeset viewer.