Ignore:
Timestamp:
Dec 11, 2008, 3:23:01 PM (17 years ago)
Author:
Christian Neuen <neuen@…>
Children:
313dff
Parents:
735468
Message:

Atom indices are now correctly processed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.cpp

    r735468 r5a447f  
    15181518{
    15191519  atom *walker = NULL;
    1520   int No = 0;
     1520  int AtomNo = 0, ElementNo;
    15211521  time_t now;
     1522  element *runner = NULL;
    15221523
    15231524  now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
     
    15251526  while (walker->next != end) { // go through every atom and count
    15261527    walker = walker->next;
    1527     No++;
     1528    AtomNo++;
    15281529  }
    15291530  if (out != NULL) {
    1530     *out << No << "\n\tCreated by molecuilder on " << ctime(&now);
    1531     walker = start;
    1532     while (walker->next != end) { // go through every atom of this element
    1533       walker = walker->next;
    1534       walker->OutputXYZLine(out);
     1531    *out << AtomNo << "\n\tCreated by molecuilder on " << ctime(&now);
     1532    ElementNo = 0;
     1533    runner = elemente->start;
     1534    while (runner->next != elemente->end) { // go through every element
     1535                runner = runner->next;
     1536      if (ElementsInMolecule[runner->Z]) { // if this element got atoms
     1537        ElementNo++;
     1538        walker = start;
     1539        while (walker->next != end) { // go through every atom of this element
     1540          walker = walker->next;
     1541          if (walker->type == runner) { // if this atom fits to element
     1542            walker->OutputXYZLine(out);
     1543          }
     1544        }
     1545      }
    15351546    }
    15361547    return true;
     
    17161727                        };
    17171728                        AddBond(Walker, OtherWalker); //Add the bond between the two atoms with respective indices.
    1718                         BondCount++; //Increase bond count of molecule
     1729                       
    17191730                }
    17201731
Note: See TracChangeset for help on using the changeset viewer.