Changeset 090299 for molecuilder
- Timestamp:
- Apr 23, 2008, 5:33:51 PM (17 years ago)
- Children:
- 76b3dc
- Parents:
- 58ab18
- Location:
- molecuilder/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/atom.cpp
r58ab18 r090299 20 20 type = NULL; 21 21 sort = NULL; 22 FixedIon = 0; 22 23 nr = -1; 23 24 GraphNr = -1; … … 59 60 if (out != NULL) { 60 61 *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t" << fixed << setprecision(9) << showpoint; 61 *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2] << "\t"; 62 *out << "\t" << "0\t# Number in molecule " << nr << endl; 62 *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2]; 63 *out << "\t" << FixedIon; 64 if (v.Norm() > MYEPSILON) 65 *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t"; 66 *out << " # Number in molecule " << nr << endl; 63 67 return true; 64 68 } else -
molecuilder/src/config.cpp
r58ab18 r090299 604 604 ParseForParameter(verbose,file, keyword, 0, 2, 1, double_type, &neues->x.x[1], repetition,critical); 605 605 ParseForParameter(verbose,file, keyword, 0, 3, 1, double_type, &neues->x.x[2], repetition,critical); 606 ParseForParameter(verbose,file, keyword, 0, 4, 1, int_type, &neues->FixedIon, repetition,critical); 607 if(!ParseForParameter(verbose,file, keyword, 0, 5, 1, double_type, &neues->v.x[0], repetition,optional)) 608 neues->v.x[0] = 0.; 609 if(!ParseForParameter(verbose,file, keyword, 0, 6, 1, double_type, &neues->v.x[1], repetition,optional)) 610 neues->v.x[1] = 0.; 611 if(!ParseForParameter(verbose,file, keyword, 0, 7, 1, double_type, &neues->v.x[2], repetition,optional)) 612 neues->v.x[2] = 0.; 606 613 neues->type = elementhash[i]; // find element type 607 614 mol->AddAtom(neues); -
molecuilder/src/molecules.cpp
r58ab18 r090299 120 120 walker->type = pointer->type; // copy element of atom 121 121 walker->x.CopyVector(&pointer->x); // copy coordination 122 walker->v.CopyVector(&pointer->v); // copy velocity 123 walker->FixedIon = pointer->FixedIon; 122 124 walker->sort = &walker->nr; 123 125 walker->nr = last_atom++; // increase number within molecule … … 231 233 FirstOtherAtom = new atom(); // new atom 232 234 FirstOtherAtom->type = elemente->FindElement(1); // element is Hydrogen 235 FirstOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 236 FirstOtherAtom->FixedIon = TopReplacement->FixedIon; 233 237 if (TopReplacement->type->Z == 1) { // neither rescale nor replace if it's already hydrogen 234 238 FirstOtherAtom->father = TopReplacement; … … 288 292 FirstOtherAtom->type = elemente->FindElement(1); 289 293 SecondOtherAtom->type = elemente->FindElement(1); 294 FirstOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 295 FirstOtherAtom->FixedIon = TopReplacement->FixedIon; 296 SecondOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 297 SecondOtherAtom->FixedIon = TopReplacement->FixedIon; 290 298 FirstOtherAtom->father = NULL; // we are just an added hydrogen with no father 291 299 SecondOtherAtom->father = NULL; // we are just an added hydrogen with no father … … 340 348 SecondOtherAtom->type = elemente->FindElement(1); 341 349 ThirdOtherAtom->type = elemente->FindElement(1); 350 FirstOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 351 FirstOtherAtom->FixedIon = TopReplacement->FixedIon; 352 SecondOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 353 SecondOtherAtom->FixedIon = TopReplacement->FixedIon; 354 ThirdOtherAtom->v.CopyVector(&TopReplacement->v); // copy velocity 355 ThirdOtherAtom->FixedIon = TopReplacement->FixedIon; 342 356 FirstOtherAtom->father = NULL; // we are just an added hydrogen with no father 343 357 SecondOtherAtom->father = NULL; // we are just an added hydrogen with no father -
molecuilder/src/molecules.hpp
r58ab18 r090299 345 345 class atom { 346 346 public: 347 vector x; //!< coordinate array of atom, giving position within cell 347 vector x; //!< coordinate array of atom, giving position within cell 348 vector v; //!< velocity array of atom 348 349 element *type; //!< pointing to element 349 350 atom *previous; //!< previous atom in molecule list … … 352 353 atom *Ancestor; //!< "Father" in Depth-First-Search 353 354 char *Name; //!< unique name used during many-body bond-order fragmentation 355 int FixedIon; //!< config variable that states whether forces act on the ion or not 354 356 int *sort; //!< sort criteria 355 357 int nr; //!< continuous, unique number
Note:
See TracChangeset
for help on using the changeset viewer.