Changeset dcbdf2 for molecuilder/src
- Timestamp:
- Oct 5, 2009, 10:08:57 PM (16 years ago)
- Children:
- 3746440
- Parents:
- d40b96
- Location:
- molecuilder/src
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/atom.cpp
rd40b96 rdcbdf2 81 81 }; 82 82 83 /** Sets father to itself or its father in case of copying a molecule. 84 */ 85 void atom::CorrectFather() 86 { 87 if (father->father == father) // same atom in copy's father points to itself 88 father = this; // set father to itself (copy of a whole molecule) 89 else 90 father = father->father; // set father to original's father 91 92 }; 93 94 /** Check whether father is equal to given atom. 95 * \param *ptr atom to compare father to 96 * \param **res return value (only set if atom::father is equal to \a *ptr) 97 */ 98 void atom::EqualsFather ( atom *ptr, atom **res ) 99 { 100 if ( ptr == father ) 101 *res = this; 102 }; 103 83 104 /** Output of a single atom. 84 105 * \param ElementNo cardinal number of the element -
molecuilder/src/atom.hpp
rd40b96 rdcbdf2 53 53 bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const; 54 54 bool OutputXYZLine(ofstream *out) const; 55 void EqualsFather ( atom *ptr, atom **res ); 56 void CorrectFather(); 55 57 atom *GetTrueFather(); 56 58 bool Compare(const atom &ptr);
Note:
See TracChangeset
for help on using the changeset viewer.