Changeset df0520 for molecuilder/src/molecule.cpp
- Timestamp:
- Nov 2, 2009, 12:50:57 PM (16 years ago)
- Children:
- 8bc524
- Parents:
- 245826
- File:
-
- 1 edited
-
molecuilder/src/molecule.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecule.cpp
r245826 rdf0520 26 26 * Initialises molecule list with correctly referenced start and end, and sets molecule::last_atom to zero. 27 27 */ 28 molecule::molecule(periodentafel *teil) 28 molecule::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) 29 32 { 30 33 // init atom chain list 31 start = new atom;32 end = new atom;33 34 start->father = NULL; 34 35 end->father = NULL; 35 36 link(start,end); 36 InternalPointer = start; 37 37 38 // init bond chain list 38 first = new bond(start, end, 1, -1);39 last = new bond(start, end, 1, -1);40 39 link(first,last); 40 41 41 // 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;51 42 for(int i=MAX_ELEMENTS;i--;) 52 43 ElementsInMolecule[i] = 0; … … 54 45 cell_size[1] = cell_size[3] = cell_size[4]= 0.; 55 46 strcpy(name,"none"); 56 IndexNr = -1;57 ActiveFlag = false;58 47 }; 59 48 … … 555 544 }; 556 545 557 /** Remove bond from bond chain list .546 /** Remove bond from bond chain list and from the both atom::ListOfBonds. 558 547 * \todo Function not implemented yet 559 548 * \param *pointer bond pointer … … 563 552 { 564 553 //cerr << Verbose(1) << "molecule::RemoveBond: Function not implemented yet." << endl; 554 pointer->leftatom->RegisterBond(pointer); 555 pointer->rightatom->RegisterBond(pointer); 565 556 removewithoutcheck(pointer); 566 557 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
