Ignore:
Timestamp:
Nov 2, 2009, 12:50:57 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
8bc524
Parents:
245826
Message:

Small changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.cpp

    r245826 rdf0520  
    2626 * Initialises molecule list with correctly referenced start and end, and sets molecule::last_atom to zero.
    2727 */
    28 molecule::molecule(periodentafel *teil)
     28molecule::molecule(const periodentafel * const teil) : elemente(teil), start(new atom), end(new atom),
     29  first(new bond(start, end, 1, -1)), last(new bond(start, end, 1, -1)), MDSteps(0), AtomCount(0),
     30  BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.),
     31  ActiveFlag(false), IndexNr(-1), last_atom(0), InternalPointer(start)
    2932{
    3033  // init atom chain list
    31   start = new atom;
    32   end = new atom;
    3334  start->father = NULL;
    3435  end->father = NULL;
    3536  link(start,end);
    36   InternalPointer = start;
     37
    3738  // init bond chain list
    38   first = new bond(start, end, 1, -1);
    39   last = new bond(start, end, 1, -1);
    4039  link(first,last);
     40
    4141  // other stuff
    42   MDSteps = 0;
    43   last_atom = 0;
    44   elemente = teil;
    45   AtomCount = 0;
    46   BondCount = 0;
    47   NoNonBonds = 0;
    48   NoNonHydrogen = 0;
    49   NoCyclicBonds = 0;
    50   ElementCount = 0;
    5142  for(int i=MAX_ELEMENTS;i--;)
    5243    ElementsInMolecule[i] = 0;
     
    5445  cell_size[1] = cell_size[3] = cell_size[4]= 0.;
    5546  strcpy(name,"none");
    56   IndexNr  = -1;
    57   ActiveFlag = false;
    5847};
    5948
     
    555544};
    556545
    557 /** Remove bond from bond chain list.
     546/** Remove bond from bond chain list and from the both atom::ListOfBonds.
    558547 * \todo Function not implemented yet
    559548 * \param *pointer bond pointer
     
    563552{
    564553  //cerr << Verbose(1) << "molecule::RemoveBond: Function not implemented yet." << endl;
     554  pointer->leftatom->RegisterBond(pointer);
     555  pointer->rightatom->RegisterBond(pointer);
    565556  removewithoutcheck(pointer);
    566557  return true;
Note: See TracChangeset for help on using the changeset viewer.