Changeset 8ffe32 for molecuilder/src/atom.cpp
- Timestamp:
- Oct 6, 2009, 5:57:01 PM (16 years ago)
- Children:
- 567b7f
- Parents:
- a4644b
- File:
-
- 1 edited
-
molecuilder/src/atom.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/atom.cpp
ra4644b r8ffe32 102 102 }; 103 103 104 /** Checks whether atom is within the given box. 105 * \param offset offset to box origin 106 * \param *parallelepiped box matrix 107 * \return true - is inside, false - is not 108 */ 109 bool atom::IsInParallelepiped(Vector offset, double *parallelepiped) 110 { 111 return (node->IsInParallelepiped(offset, parallelepiped)); 112 }; 113 104 114 /** Output of a single atom. 105 115 * \param ElementNo cardinal number of the element … … 112 122 if (out != NULL) { 113 123 *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t" << fixed << setprecision(9) << showpoint; 124 *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2]; 125 *out << "\t" << FixedIon; 126 if (v.Norm() > MYEPSILON) 127 *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t"; 128 if (comment != NULL) 129 *out << " # " << comment << endl; 130 else 131 *out << " # molecule nr " << nr << endl; 132 return true; 133 } else 134 return false; 135 }; 136 bool atom::Output(int *ElementNo, int *AtomNo, ofstream *out, const char *comment) 137 { 138 AtomNo[type->Z]++; // increment number 139 if (out != NULL) { 140 *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t" << fixed << setprecision(9) << showpoint; 114 141 *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2]; 115 142 *out << "\t" << FixedIon;
Note:
See TracChangeset
for help on using the changeset viewer.
