Changes in src/atom.cpp [2fe971:57f243]
- File:
-
- 1 edited
-
src/atom.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/atom.cpp
r2fe971 r57f243 13 13 #include "lists.hpp" 14 14 #include "parser.hpp" 15 #include " vector.hpp"15 #include "LinearAlgebra/Vector.hpp" 16 16 #include "World.hpp" 17 17 #include "molecule.hpp" … … 19 19 20 20 #include <iomanip> 21 #include <iostream>22 21 23 22 /************************************* Functions for class atom *************************************/ … … 110 109 }; 111 110 112 bool atom::isFather(const atom *ptr){113 return ptr==father;114 }115 116 111 /** Checks whether atom is within the given box. 117 112 * \param offset offset to box origin … … 166 161 * \return true - \a *out present, false - \a *out is NULL 167 162 */ 168 bool atom::OutputArrayIndexed(ostream * const out, const enumeration<const element*> &elementLookup, int *AtomNo, const char *comment) const163 bool atom::OutputArrayIndexed(ostream * const out, const int *ElementNo, int *AtomNo, const char *comment) const 169 164 { 170 165 AtomNo[type->Z]++; // increment number 171 166 if (out != NULL) { 172 cout << "Looking for atom with element " << *type << endl; 173 ASSERT(elementLookup.there.find(type)!=elementLookup.there.end(),"Type of this atom was not in the formula upon enumeration"); 174 *out << "Ion_Type" << elementLookup.there.find(type)->second << "_" << AtomNo[type->Z] << "\t" << fixed << setprecision(9) << showpoint; 167 *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t" << fixed << setprecision(9) << showpoint; 175 168 *out << x[0] << "\t" << x[1] << "\t" << x[2]; 176 169 *out << "\t" << FixedIon; … … 193 186 { 194 187 if (out != NULL) { 195 *out << type-> getSymbol()<< "\t" << x[0] << "\t" << x[1] << "\t" << x[2] << "\t" << endl;188 *out << type->symbol << "\t" << x[0] << "\t" << x[1] << "\t" << x[2] << "\t" << endl; 196 189 return true; 197 190 } else … … 231 224 { 232 225 if (out != NULL) { 233 *out << type-> getSymbol()<< "\t";226 *out << type->symbol << "\t"; 234 227 *out << Trajectory.R.at(step)[0] << "\t"; 235 228 *out << Trajectory.R.at(step)[1] << "\t"; … … 247 240 void atom::OutputMPQCLine(ostream * const out, const Vector *center, int *AtomNo = NULL) const 248 241 { 249 *out << "\t\t" << type-> getSymbol()<< " [ " << x[0]-center->at(0) << "\t" << x[1]-center->at(1) << "\t" << x[2]-center->at(2) << " ]" << endl;242 *out << "\t\t" << type->symbol << " [ " << x[0]-center->at(0) << "\t" << x[1]-center->at(1) << "\t" << x[2]-center->at(2) << " ]" << endl; 250 243 if (AtomNo != NULL) 251 244 *AtomNo++;
Note:
See TracChangeset
for help on using the changeset viewer.
