Changeset 4455f4 for src/atom.cpp
- Timestamp:
- Oct 19, 2009, 1:09:29 PM (16 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- c75de1
- Parents:
- 9eefda
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/atom.cpp
r9eefda r4455f4 16 16 /************************************* Functions for class atom *************************************/ 17 17 18 /** Constructor of class AtomInfo. 19 */ 20 AtomInfo::AtomInfo() : type(NULL) {}; 21 22 /** Destructor of class AtomInfo. 23 */ 24 AtomInfo::~AtomInfo() 25 { 26 }; 27 28 /** Constructor of class TrajectoryParticleInfo. 29 */ 30 TrajectoryParticleInfo::TrajectoryParticleInfo() : FixedIon(0) {}; 31 32 /** Destructor of class TrajectoryParticleInfo. 33 */ 34 TrajectoryParticleInfo::~TrajectoryParticleInfo() 35 { 36 Trajectory.R.clear(); 37 Trajectory.U.clear(); 38 Trajectory.F.clear(); 39 }; 40 41 /** Constructor of class TrajectoryParticle. 42 */ 43 TrajectoryParticle::TrajectoryParticle() 44 { 45 }; 46 47 /** Destructor of class TrajectoryParticle. 48 */ 49 TrajectoryParticle::~TrajectoryParticle() 50 { 51 }; 52 53 /** Constructor of class GraphNodeInfo. 54 */ 55 GraphNodeInfo::GraphNodeInfo() : GraphNr(-1), ComponentNr(NULL), LowpointNr(-1), SeparationVertex(false), IsCyclic(false), Ancestor(NULL) {}; 56 57 /** Destructor of class GraphNodeInfo. 58 */ 59 GraphNodeInfo::~GraphNodeInfo() 60 { 61 Free<int>(&ComponentNr, "atom::~atom: *ComponentNr"); 62 }; 63 64 /** Constructor of class GraphNode. 65 */ 66 GraphNode::GraphNode() 67 { 68 }; 69 70 /** Destructor of class GraphNode. 71 */ 72 GraphNode::~GraphNode() 73 { 74 }; 75 76 /** Constructor of class BondedParticleInfo. 77 */ 78 BondedParticleInfo::BondedParticleInfo() : AdaptiveOrder(0), MaxOrder(false) {}; 79 80 /** Destructor of class BondedParticleInfo. 81 */ 82 BondedParticleInfo::~BondedParticleInfo() 83 { 84 }; 85 86 /** Constructor of class BondedParticle. 87 */ 88 BondedParticle::BondedParticle(){}; 89 90 /** Destructor of class BondedParticle. 91 */ 92 BondedParticle::~BondedParticle() 93 { 94 BondList::const_iterator Runner; 95 while (!ListOfBonds.empty()) { 96 Runner = ListOfBonds.begin(); 97 removewithoutcheck(*Runner); 98 } 99 }; 100 18 101 /** Constructor of class atom. 19 102 */ … … 23 106 previous = NULL; 24 107 next = NULL; 25 Ancestor = NULL; 26 type = NULL; 27 sort = NULL; 28 FixedIon = 0; 29 GraphNr = -1; 30 ComponentNr = NULL; 31 IsCyclic = false; 32 SeparationVertex = false; 33 LowpointNr = -1; 34 AdaptiveOrder = 0; 35 MaxOrder = false; 108 sort = &nr; 109 36 110 // set LCNode::Vector to our Vector 37 111 node = &x; … … 42 116 atom::atom(atom *pointer) 43 117 { 44 Name = NULL;45 118 previous = NULL; 46 119 next = NULL; 47 120 father = pointer; // generally, father is itself 48 Ancestor = NULL; 49 GraphNr = -1; 50 ComponentNr = NULL; 51 IsCyclic = false; 52 SeparationVertex = false; 53 LowpointNr = -1; 54 AdaptiveOrder = 0; 55 MaxOrder = false; 121 56 122 type = pointer->type; // copy element of atom 57 123 x.CopyVector(&pointer->x); // copy coordination 58 124 v.CopyVector(&pointer->v); // copy velocity 59 125 FixedIon = pointer->FixedIon; 60 nr = -1;61 126 sort = &nr; 62 127 node = &x; … … 68 133 atom::~atom() 69 134 { 70 BondList::const_iterator Runner;71 while (!ListOfBonds.empty()) {72 Runner = ListOfBonds.begin();73 removewithoutcheck(*Runner);74 }75 135 unlink(this); 76 Free<int>(&ComponentNr, "atom::~atom: *ComponentNr");77 Free<char>(&Name, "atom::~atom: *Name");78 Trajectory.R.clear();79 Trajectory.U.clear();80 Trajectory.F.clear();81 136 }; 82 137 … … 130 185 * \param bonds times bond::BondDegree 131 186 */ 132 int atom::CountBonds() const187 int BondedParticle::CountBonds() const 133 188 { 134 189 int NoBonds = 0; … … 233 288 }; 234 289 235 /** Output graph info ofthis atom.290 /** Outputs the MPQC configuration line for this atom. 236 291 * \param *out output stream 237 */ 238 void atom::OutputGraphInfo(ofstream *out) const 239 { 240 *out << Verbose(2) << "Atom " << Name << " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are "; 241 OutputComponentNumber(out); 242 *out << " with Lowpoint " << LowpointNr << " and Graph Nr. " << GraphNr << "." << endl; 243 }; 244 245 /** Output a list of flags, stating whether the bond was visited or not. 246 * Note, we make use of the last entry of the ComponentNr always being -1 if allocated. 247 * \param *out output stream for debugging 248 */ 249 void atom::OutputComponentNumber(ofstream *out) const 250 { 251 if (ComponentNr != NULL) { 252 for (int i=0; ComponentNr[i] != -1; i++) 253 *out << ComponentNr[i] << " "; 254 } 255 }; 256 257 258 /** Prints all bonds of this atom with total degree. 259 * \param *out stream to output to 260 * \return true - \a *out present, false - \a *out is NULL 261 */ 262 bool atom::OutputBondOfAtom(ofstream *out) const 263 { 264 if (out != NULL) { 265 #ifdef ADDHYDROGEN 266 if (type->Z != 1) { // regard only non-hydrogen 267 #endif 268 *out << Verbose(4) << "Atom " << Name << "/" << nr << " with " << ListOfBonds.size() << " bonds: "; 269 int TotalDegree = 0; 270 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) { 271 *out << **Runner << "\t"; 272 TotalDegree += (*Runner)->BondDegree; 273 } 274 *out << " -- TotalDegree: " << TotalDegree << endl; 275 #ifdef ADDHYDROGEN 276 } 277 #endif 292 * \param *center center of molecule subtracted from position 293 * \param *AtomNo pointer to atom counter that is increased by one 294 */ 295 void atom::OutputMPQCLine(ofstream *out, Vector *center, int *AtomNo = NULL) const 296 { 297 *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; 298 if (AtomNo != NULL) 299 *AtomNo++; 300 }; 301 302 ostream & operator << (ostream &ost, const ParticleInfo &a) 303 { 304 ost << "[" << a.Name << "|" << &a << "]"; 305 return ost; 306 }; 307 308 ostream & ParticleInfo::operator << (ostream &ost) 309 { 310 ost << "[" << Name << "|" << this << "]"; 311 return ost; 312 }; 313 314 /** Compares the indices of \a this atom with a given \a ptr. 315 * \param ptr atom to compare index against 316 * \return true - this one's is smaller, false - not 317 */ 318 bool atom::Compare(const atom &ptr) 319 { 320 if (nr < ptr.nr) 278 321 return true; 279 }else322 else 280 323 return false; 281 324 }; 282 325 283 /** Output of atom::nr along with all bond partners. 284 * \param *AdjacencyFile output stream 285 */ 286 void atom::OutputAdjacency(ofstream *AdjacencyFile) const 287 { 288 *AdjacencyFile << nr << "\t"; 289 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner)) 290 *AdjacencyFile << (*Runner)->GetOtherAtom(this)->nr << "\t"; 291 *AdjacencyFile << endl; 292 }; 293 294 /** Outputs the current atom::AdaptiveOrder and atom::MaxOrder to \a *file. 295 * \param *file output stream 296 */ 297 void atom::OutputOrder(ofstream *file) 298 { 299 *file << nr << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << endl; 300 //cout << Verbose(2) << "Storing: " << nr << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << "." << endl; 326 /** Returns squared distance to a given vector. 327 * \param origin vector to calculate distance to 328 * \return distance squared 329 */ 330 double atom::DistanceSquaredToVector(Vector &origin) 331 { 332 return origin.DistanceSquared(&x); 333 }; 334 335 /** Returns distance to a given vector. 336 * \param origin vector to calculate distance to 337 * \return distance 338 */ 339 double atom::DistanceToVector(Vector &origin) 340 { 341 return origin.Distance(&x); 301 342 }; 302 343 … … 313 354 }; 314 355 356 357 bool operator < (atom &a, atom &b) 358 { 359 return a.Compare(b); 360 }; 361 362 /** Output graph info of this atom. 363 * \param *out output stream 364 */ 365 void GraphNode::OutputGraphInfo(ofstream *out) const 366 { 367 *out << Verbose(2) << "Atom " << Name << " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are "; 368 OutputComponentNumber(out); 369 *out << " with Lowpoint " << LowpointNr << " and Graph Nr. " << GraphNr << "." << endl; 370 }; 371 372 /** Output a list of flags, stating whether the bond was visited or not. 373 * Note, we make use of the last entry of the ComponentNr always being -1 if allocated. 374 * \param *out output stream for debugging 375 */ 376 void GraphNode::OutputComponentNumber(ofstream *out) const 377 { 378 if (ComponentNr != NULL) { 379 for (int i=0; ComponentNr[i] != -1; i++) 380 *out << ComponentNr[i] << " "; 381 } 382 }; 383 384 /** Outputs the current atom::AdaptiveOrder and atom::MaxOrder to \a *file. 385 * \param *file output stream 386 */ 387 void BondedParticle::OutputOrder(ofstream *file) 388 { 389 *file << nr << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << endl; 390 //cout << Verbose(2) << "Storing: " << nr << "\t" << (int)AdaptiveOrder << "\t" << (int)MaxOrder << "." << endl; 391 }; 392 393 /** Prints all bonds of this atom with total degree. 394 * \param *out stream to output to 395 * \return true - \a *out present, false - \a *out is NULL 396 */ 397 bool BondedParticle::OutputBondOfAtom(ofstream *out) const 398 { 399 if (out != NULL) { 400 *out << Verbose(4) << "Atom " << Name << "/" << nr << " with " << ListOfBonds.size() << " bonds: "; 401 int TotalDegree = 0; 402 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) { 403 *out << **Runner << "\t"; 404 TotalDegree += (*Runner)->BondDegree; 405 } 406 *out << " -- TotalDegree: " << TotalDegree << endl; 407 return true; 408 } else 409 return false; 410 }; 411 412 /** Output of atom::nr along with all bond partners. 413 * \param *AdjacencyFile output stream 414 */ 415 void BondedParticle::OutputAdjacency(ofstream *AdjacencyFile) const 416 { 417 *AdjacencyFile << nr << "\t"; 418 for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner)) 419 *AdjacencyFile << (*Runner)->GetOtherAtom(this)->nr << "\t"; 420 *AdjacencyFile << endl; 421 }; 422 315 423 /** Puts a given bond into atom::ListOfBonds. 316 424 * \param *Binder bond to insert 317 425 */ 318 bool atom::RegisterBond(bond *Binder)426 bool BondedParticle::RegisterBond(bond *Binder) 319 427 { 320 428 bool status = false; … … 335 443 * \param *Binder bond to remove 336 444 */ 337 bool atom::UnregisterBond(bond *Binder)445 bool BondedParticle::UnregisterBond(bond *Binder) 338 446 { 339 447 bool status = false; … … 354 462 * \note Does not do any memory de-allocation. 355 463 */ 356 void atom::UnregisterAllBond()464 void BondedParticle::UnregisterAllBond() 357 465 { 358 466 ListOfBonds.clear(); … … 362 470 * \param *out output stream for debugging 363 471 */ 364 int atom::CorrectBondDegree(ofstream *out)472 int BondedParticle::CorrectBondDegree(ofstream *out) 365 473 { 366 474 int NoBonds = 0; … … 395 503 }; 396 504 397 ostream & operator << (ostream &ost, const atom &a) 398 { 399 ost << "[" << a.Name << "|" << &a << "]"; 400 return ost; 401 }; 402 403 ostream & atom::operator << (ostream &ost) 404 { 405 ost << "[" << Name << "|" << this << "]"; 406 return ost; 407 }; 408 409 /** Compares the indices of \a this atom with a given \a ptr. 410 * \param ptr atom to compare index against 411 * \return true - this one's is smaller, false - not 412 */ 413 bool atom::Compare(const atom &ptr) 414 { 415 if (nr < ptr.nr) 416 return true; 417 else 418 return false; 505 /** Adds kinetic energy of this atom to given temperature value. 506 * \param *temperature add on this value 507 * \param step given step of trajectory to add 508 */ 509 void TrajectoryParticle::AddKineticToTemperature(double *temperature, int step) const 510 { 511 for (int i=NDIM;i--;) 512 *temperature += type->mass * Trajectory.U.at(step).x[i]* Trajectory.U.at(step).x[i]; 513 }; 514 515 /** Evaluates some constraint potential if atom moves from \a startstep at once to \endstep in trajectory. 516 * \param startstep trajectory begins at 517 * \param endstep trajectory ends at 518 * \param **PermutationMap if atom switches places with some other atom, there is no translation but a permutaton noted here (not in the trajectories of each). 519 * \param *Force Force matrix to store result in 520 */ 521 void TrajectoryParticle::EvaluateConstrainedForce(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force) 522 { 523 double constant = 10.; 524 TrajectoryParticle *Sprinter = PermutationMap[nr]; 525 // set forces 526 for (int i=NDIM;i++;) 527 Force->Matrix[0][nr][5+i] += 2.*constant*sqrt(Trajectory.R.at(startstep).Distance(&Sprinter->Trajectory.R.at(endstep))); 528 }; 529 530 /** Correct velocity against the summed \a CoGVelocity for \a step. 531 * \param *ActualTemp sum up actual temperature meanwhile 532 * \param Step MD step in atom::Tracjetory 533 * \param *CoGVelocity remnant velocity (i.e. vector sum of all atom velocities) 534 */ 535 void TrajectoryParticle::CorrectVelocity(double *ActualTemp, int Step, Vector *CoGVelocity) 536 { 537 for(int d=0;d<NDIM;d++) { 538 Trajectory.U.at(Step).x[d] -= CoGVelocity->x[d]; 539 *ActualTemp += 0.5 * type->mass * Trajectory.U.at(Step).x[d] * Trajectory.U.at(Step).x[d]; 540 } 419 541 }; 420 542 … … 423 545 * \param MaxSteps 424 546 */ 425 void atom::ResizeTrajectory(int MaxSteps)547 void TrajectoryParticle::ResizeTrajectory(int MaxSteps) 426 548 { 427 549 if (Trajectory.R.size() <= (unsigned int)(MaxSteps)) { … … 437 559 * \param src index of source step 438 560 */ 439 void atom::CopyStepOnStep(int dest, int src)561 void TrajectoryParticle::CopyStepOnStep(int dest, int src) 440 562 { 441 563 if (dest == src) // self assignment check … … 455 577 * \param *Force matrix with forces 456 578 */ 457 void atom::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force)579 void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force) 458 580 { 459 581 //a = configuration.Deltat*0.5/walker->type->mass; // (F+F_old)/2m = a and thus: v = (F+F_old)/2m * t = (F + F_old) * a … … 484 606 * \param *TotalVelocity pointer to tota velocity sum 485 607 */ 486 void atom::SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity )608 void TrajectoryParticle::SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity ) 487 609 { 488 610 *TotalMass += type->mass; // sum up total mass 489 611 for(int d=0;d<NDIM;d++) { 490 612 TotalVelocity->x[d] += Trajectory.U.at(Step).x[d]*type->mass; 491 }492 };493 494 /** Returns squared distance to a given vector.495 * \param origin vector to calculate distance to496 * \return distance squared497 */498 double atom::DistanceSquaredToVector(Vector &origin)499 {500 return origin.DistanceSquared(&x);501 };502 503 /** Adds kinetic energy of this atom to given temperature value.504 * \param *temperature add on this value505 * \param step given step of trajectory to add506 */507 void atom::AddKineticToTemperature(double *temperature, int step) const508 {509 for (int i=NDIM;i--;)510 *temperature += type->mass * Trajectory.U.at(step).x[i]* Trajectory.U.at(step).x[i];511 };512 513 /** Returns distance to a given vector.514 * \param origin vector to calculate distance to515 * \return distance516 */517 double atom::DistanceToVector(Vector &origin)518 {519 return origin.Distance(&x);520 };521 522 bool operator < (atom &a, atom &b)523 {524 return a.Compare(b);525 };526 527 /** Evaluates some constraint potential if atom moves from \a startstep at once to \endstep in trajectory.528 * \param startstep trajectory begins at529 * \param endstep trajectory ends at530 * \param **PermutationMap if atom switches places with some other atom, there is no translation but a permutaton noted here (not in the trajectories of each).531 * \param *Force Force matrix to store result in532 */533 void atom::EvaluateConstrainedForce(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force)534 {535 double constant = 10.;536 atom *Sprinter = PermutationMap[nr];537 // set forces538 for (int i=NDIM;i++;)539 Force->Matrix[0][nr][5+i] += 2.*constant*sqrt(Trajectory.R.at(startstep).Distance(&Sprinter->Trajectory.R.at(endstep)));540 };541 542 /** Correct velocity against the summed \a CoGVelocity for \a step.543 * \param *ActualTemp sum up actual temperature meanwhile544 * \param Step MD step in atom::Tracjetory545 * \param *CoGVelocity remnant velocity (i.e. vector sum of all atom velocities)546 */547 void atom::CorrectVelocity(double *ActualTemp, int Step, Vector *CoGVelocity)548 {549 for(int d=0;d<NDIM;d++) {550 Trajectory.U.at(Step).x[d] -= CoGVelocity->x[d];551 *ActualTemp += 0.5 * type->mass * Trajectory.U.at(Step).x[d] * Trajectory.U.at(Step).x[d];552 613 } 553 614 }; … … 558 619 * \param *ekin sum of kinetic energy 559 620 */ 560 void atom::Thermostat_Woodcock(double ScaleTempFactor, int Step, double *ekin)621 void TrajectoryParticle::Thermostat_Woodcock(double ScaleTempFactor, int Step, double *ekin) 561 622 { 562 623 double *U = Trajectory.U.at(Step).x; … … 573 634 * \param *E 574 635 */ 575 void atom::Thermostat_Gaussian_init(int Step, double *G, double *E)636 void TrajectoryParticle::Thermostat_Gaussian_init(int Step, double *G, double *E) 576 637 { 577 638 double *U = Trajectory.U.at(Step).x; … … 590 651 * \param *configuration configuration class with TempFrequency and TargetTemp 591 652 */ 592 void atom::Thermostat_Gaussian_least_constraint(int Step, double G_over_E, double *ekin, config *configuration)653 void TrajectoryParticle::Thermostat_Gaussian_least_constraint(int Step, double G_over_E, double *ekin, config *configuration) 593 654 { 594 655 double *U = Trajectory.U.at(Step).x; … … 606 667 * \param *configuration configuration class with TempFrequency and TargetTemp 607 668 */ 608 void atom::Thermostat_Langevin(int Step, gsl_rng * r, double *ekin, config *configuration)669 void TrajectoryParticle::Thermostat_Langevin(int Step, gsl_rng * r, double *ekin, config *configuration) 609 670 { 610 671 double sigma = sqrt(configuration->TargetTemp/type->mass); // sigma = (k_b T)/m (Hartree/atomicmass = atomiclength/atomictime) … … 631 692 * \param *configuration configuration class with TempFrequency and Deltat 632 693 */ 633 void atom::Thermostat_Berendsen(int Step, double ScaleTempFactor, double *ekin, config *configuration)694 void TrajectoryParticle::Thermostat_Berendsen(int Step, double ScaleTempFactor, double *ekin, config *configuration) 634 695 { 635 696 double *U = Trajectory.U.at(Step).x; … … 646 707 * \param *delta_alpha additional sum of kinetic energy on return 647 708 */ 648 void atom::Thermostat_NoseHoover_init(int Step, double *delta_alpha)709 void TrajectoryParticle::Thermostat_NoseHoover_init(int Step, double *delta_alpha) 649 710 { 650 711 double *U = Trajectory.U.at(Step).x; … … 661 722 * \param *configuration configuration class with TempFrequency and Deltat 662 723 */ 663 void atom::Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration)724 void TrajectoryParticle::Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration) 664 725 { 665 726 double *U = Trajectory.U.at(Step).x;
Note:
See TracChangeset
for help on using the changeset viewer.