Changeset 0d111b for molecuilder/src/atom.cpp
- Timestamp:
- Apr 29, 2010, 1:55:21 PM (16 years ago)
- Children:
- 070651, 5d1a94
- Parents:
- 90c4460 (diff), 32842d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/atom.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/atom.cpp
r90c4460 r0d111b 33 33 { 34 34 type = pointer->type; // copy element of atom 35 x .CopyVector(&pointer->x); // copy coordination36 v .CopyVector(&pointer->v); // copy velocity35 x = pointer->x; // copy coordination 36 v = pointer->v; // copy velocity 37 37 FixedIon = pointer->FixedIon; 38 38 node = &x; … … 46 46 res->sort = &res->nr; 47 47 res->type = type; 48 res->x .CopyVector(&this->x);49 res->v .CopyVector(&this->v);48 res->x = this->x; 49 res->v = this->v; 50 50 res->FixedIon = FixedIon; 51 51 res->node = &x; … … 130 130 if (out != NULL) { 131 131 *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t" << fixed << setprecision(9) << showpoint; 132 *out << x .x[0] << "\t" << x.x[1] << "\t" << x.x[2];132 *out << x[0] << "\t" << x[1] << "\t" << x[2]; 133 133 *out << "\t" << FixedIon; 134 134 if (v.Norm() > MYEPSILON) 135 *out << "\t" << scientific << setprecision(6) << v .x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";135 *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t"; 136 136 if (comment != NULL) 137 137 *out << " # " << comment << endl; … … 155 155 if (out != NULL) { 156 156 *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t" << fixed << setprecision(9) << showpoint; 157 *out << x .x[0] << "\t" << x.x[1] << "\t" << x.x[2];157 *out << x[0] << "\t" << x[1] << "\t" << x[2]; 158 158 *out << "\t" << FixedIon; 159 159 if (v.Norm() > MYEPSILON) 160 *out << "\t" << scientific << setprecision(6) << v .x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";160 *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t"; 161 161 if (comment != NULL) 162 162 *out << " # " << comment << endl; … … 175 175 { 176 176 if (out != NULL) { 177 *out << type->symbol << "\t" << x .x[0] << "\t" << x.x[1] << "\t" << x.x[2] << "\t" << endl;177 *out << type->symbol << "\t" << x[0] << "\t" << x[1] << "\t" << x[2] << "\t" << endl; 178 178 return true; 179 179 } else … … 193 193 if (out != NULL) { 194 194 *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t" << fixed << setprecision(9) << showpoint; 195 *out << Trajectory.R.at(step) .x[0] << "\t" << Trajectory.R.at(step).x[1] << "\t" << Trajectory.R.at(step).x[2];195 *out << Trajectory.R.at(step)[0] << "\t" << Trajectory.R.at(step)[1] << "\t" << Trajectory.R.at(step)[2]; 196 196 *out << "\t" << FixedIon; 197 197 if (Trajectory.U.at(step).Norm() > MYEPSILON) 198 *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step) .x[0] << "\t" << Trajectory.U.at(step).x[1] << "\t" << Trajectory.U.at(step).x[2] << "\t";198 *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step)[0] << "\t" << Trajectory.U.at(step)[1] << "\t" << Trajectory.U.at(step)[2] << "\t"; 199 199 if (Trajectory.F.at(step).Norm() > MYEPSILON) 200 *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step) .x[0] << "\t" << Trajectory.F.at(step).x[1] << "\t" << Trajectory.F.at(step).x[2] << "\t";200 *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step)[0] << "\t" << Trajectory.F.at(step)[1] << "\t" << Trajectory.F.at(step)[2] << "\t"; 201 201 *out << "\t# Number in molecule " << nr << endl; 202 202 return true; … … 214 214 if (out != NULL) { 215 215 *out << type->symbol << "\t"; 216 *out << Trajectory.R.at(step) .x[0] << "\t";217 *out << Trajectory.R.at(step) .x[1] << "\t";218 *out << Trajectory.R.at(step) .x[2] << endl;216 *out << Trajectory.R.at(step)[0] << "\t"; 217 *out << Trajectory.R.at(step)[1] << "\t"; 218 *out << Trajectory.R.at(step)[2] << endl; 219 219 return true; 220 220 } else … … 229 229 void atom::OutputMPQCLine(ofstream * const out, const Vector *center, int *AtomNo = NULL) const 230 230 { 231 *out << "\t\t" << type->symbol << " [ " << x .x[0]-center->x[0] << "\t" << x.x[1]-center->x[1] << "\t" << x.x[2]-center->x[2]<< " ]" << endl;231 *out << "\t\t" << type->symbol << " [ " << x[0]-center->at(0) << "\t" << x[1]-center->at(1) << "\t" << x[2]-center->at(2) << " ]" << endl; 232 232 if (AtomNo != NULL) 233 233 *AtomNo++; … … 252 252 double atom::DistanceSquaredToVector(const Vector &origin) const 253 253 { 254 return origin.DistanceSquared( &x);254 return origin.DistanceSquared(x); 255 255 }; 256 256 … … 261 261 double atom::DistanceToVector(const Vector &origin) const 262 262 { 263 return origin.Distance( &x);263 return origin.Distance(x); 264 264 }; 265 265
Note:
See TracChangeset
for help on using the changeset viewer.
