Ignore:
Timestamp:
May 8, 2008, 5:31:04 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
310b25
Parents:
461e93
Message:

molecule::CheckOrderAtSite() now interprets negative Orders as adaptive increase by parsing EnergyPerFragment.da
t

positive Order is global increase till all sites have at least this order, Order 0 means single global increase step, negative Order is the exponent in 10{-Order} to give the threshold value: ENERGYPERFRAGMENT is scanned in
to a map (sorted by values) and all fragments still above the threshold are taken into AtomMask for increase. Jo
iner has to write this file with (Root id of Fragment, energy contribution) pairs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/moleculelist.cpp

    r461e93 ra3ff7b2  
    408408 * \param *out output stream for debugging
    409409 * \param *&RootStack stack to be filled
     410 * \param *AtomMask defines true/false per global Atom::nr to mask in/out each nuclear site
    410411 * \param Order desired bond order for all sites
    411412 * \param &FragmentCounter counts through the fragments in this MoleculeLeafClass
    412413 * \return true - stack is non-empty, fragmentation necessary, false - stack is empty, no more sites to update
    413414 */
    414 bool MoleculeLeafClass::FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, int Order, int &FragmentCounter)
    415 {
    416   atom *Walker = NULL;
     415bool MoleculeLeafClass::FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int Order, int &FragmentCounter)
     416{
     417  atom *Walker = NULL, *Father = NULL;
    417418
    418419  if (RootStack != NULL) {
     
    426427        while (Walker->next != Leaf->end) { // go through all (non-hydrogen) atoms
    427428          Walker = Walker->next;
     429          Father = Walker->GetTrueFather();
     430          if (AtomMask[Father->nr]) // apply mask
    428431      #ifdef ADDHYDROGEN
    429           if (Walker->type->Z != 1) // skip hydrogen
     432            if (Walker->type->Z != 1) // skip hydrogen
    430433      #endif
    431             if (Walker->GetTrueFather()->AdaptiveOrder < Order) // only if Order is still greater
    432               RootStack[FragmentCounter].push_front(Walker->nr);
     434              if (Father->AdaptiveOrder < Order) // only if Order is still greater
     435                RootStack[FragmentCounter].push_front(Walker->nr);
    433436        }
    434437        if (next != NULL)
    435           next->FillRootStackForSubgraphs(out, RootStack, Order, ++FragmentCounter);
     438          next->FillRootStackForSubgraphs(out, RootStack, AtomMask, Order, ++FragmentCounter);
    436439      }  else {
    437440        *out << Verbose(1) << "Rootstack[" << FragmentCounter  << "] is NULL." << endl;
Note: See TracChangeset for help on using the changeset viewer.