Changeset a3ff7b2 for molecuilder/src/moleculelist.cpp
- Timestamp:
- May 8, 2008, 5:31:04 PM (17 years ago)
- Children:
- 310b25
- Parents:
- 461e93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/moleculelist.cpp
r461e93 ra3ff7b2 408 408 * \param *out output stream for debugging 409 409 * \param *&RootStack stack to be filled 410 * \param *AtomMask defines true/false per global Atom::nr to mask in/out each nuclear site 410 411 * \param Order desired bond order for all sites 411 412 * \param &FragmentCounter counts through the fragments in this MoleculeLeafClass 412 413 * \return true - stack is non-empty, fragmentation necessary, false - stack is empty, no more sites to update 413 414 */ 414 bool MoleculeLeafClass::FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, int Order, int &FragmentCounter)415 { 416 atom *Walker = NULL ;415 bool MoleculeLeafClass::FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int Order, int &FragmentCounter) 416 { 417 atom *Walker = NULL, *Father = NULL; 417 418 418 419 if (RootStack != NULL) { … … 426 427 while (Walker->next != Leaf->end) { // go through all (non-hydrogen) atoms 427 428 Walker = Walker->next; 429 Father = Walker->GetTrueFather(); 430 if (AtomMask[Father->nr]) // apply mask 428 431 #ifdef ADDHYDROGEN 429 if (Walker->type->Z != 1) // skip hydrogen432 if (Walker->type->Z != 1) // skip hydrogen 430 433 #endif 431 if (Walker->GetTrueFather()->AdaptiveOrder < Order) // only if Order is still greater432 RootStack[FragmentCounter].push_front(Walker->nr);434 if (Father->AdaptiveOrder < Order) // only if Order is still greater 435 RootStack[FragmentCounter].push_front(Walker->nr); 433 436 } 434 437 if (next != NULL) 435 next->FillRootStackForSubgraphs(out, RootStack, Order, ++FragmentCounter);438 next->FillRootStackForSubgraphs(out, RootStack, AtomMask, Order, ++FragmentCounter); 436 439 } else { 437 440 *out << Verbose(1) << "Rootstack[" << FragmentCounter << "] is NULL." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.