Changeset 4455f4 for src/atom.cpp


Ignore:
Timestamp:
Oct 19, 2009, 1:09:29 PM (16 years ago)
Author:
Frederik Heber <heber@…>
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
Message:

Huge Refactoring: class atom split up into several inherited classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom.cpp

    r9eefda r4455f4  
    1616/************************************* Functions for class atom *************************************/
    1717
     18/** Constructor of class AtomInfo.
     19 */
     20AtomInfo::AtomInfo() : type(NULL) {};
     21
     22/** Destructor of class AtomInfo.
     23 */
     24AtomInfo::~AtomInfo()
     25{
     26};
     27
     28/** Constructor of class TrajectoryParticleInfo.
     29 */
     30TrajectoryParticleInfo::TrajectoryParticleInfo() : FixedIon(0) {};
     31
     32/** Destructor of class TrajectoryParticleInfo.
     33 */
     34TrajectoryParticleInfo::~TrajectoryParticleInfo()
     35{
     36  Trajectory.R.clear();
     37  Trajectory.U.clear();
     38  Trajectory.F.clear();
     39};
     40
     41/** Constructor of class TrajectoryParticle.
     42 */
     43TrajectoryParticle::TrajectoryParticle()
     44{
     45};
     46
     47/** Destructor of class TrajectoryParticle.
     48 */
     49TrajectoryParticle::~TrajectoryParticle()
     50{
     51};
     52
     53/** Constructor of class GraphNodeInfo.
     54 */
     55GraphNodeInfo::GraphNodeInfo() : GraphNr(-1), ComponentNr(NULL), LowpointNr(-1), SeparationVertex(false), IsCyclic(false), Ancestor(NULL) {};
     56
     57/** Destructor of class GraphNodeInfo.
     58 */
     59GraphNodeInfo::~GraphNodeInfo()
     60{
     61  Free<int>(&ComponentNr, "atom::~atom: *ComponentNr");
     62};
     63
     64/** Constructor of class GraphNode.
     65 */
     66GraphNode::GraphNode()
     67{
     68};
     69
     70/** Destructor of class GraphNode.
     71 */
     72GraphNode::~GraphNode()
     73{
     74};
     75
     76/** Constructor of class BondedParticleInfo.
     77 */
     78BondedParticleInfo::BondedParticleInfo() : AdaptiveOrder(0), MaxOrder(false) {};
     79
     80/** Destructor of class BondedParticleInfo.
     81 */
     82BondedParticleInfo::~BondedParticleInfo()
     83{
     84};
     85
     86/** Constructor of class BondedParticle.
     87 */
     88BondedParticle::BondedParticle(){};
     89
     90/** Destructor of class BondedParticle.
     91 */
     92BondedParticle::~BondedParticle()
     93{
     94  BondList::const_iterator Runner;
     95  while (!ListOfBonds.empty()) {
     96    Runner = ListOfBonds.begin();
     97    removewithoutcheck(*Runner);
     98  }
     99};
     100
    18101/** Constructor of class atom.
    19102 */
     
    23106  previous = NULL;
    24107  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
    36110  // set LCNode::Vector to our Vector
    37111  node = &x;
     
    42116atom::atom(atom *pointer)
    43117{
    44   Name = NULL;
    45118  previous = NULL;
    46119  next = NULL;
    47120  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
    56122  type = pointer->type;  // copy element of atom
    57123  x.CopyVector(&pointer->x); // copy coordination
    58124  v.CopyVector(&pointer->v); // copy velocity
    59125  FixedIon = pointer->FixedIon;
    60   nr = -1;
    61126  sort = &nr;
    62127  node = &x;
     
    68133atom::~atom()
    69134{
    70   BondList::const_iterator Runner;
    71   while (!ListOfBonds.empty()) {
    72     Runner = ListOfBonds.begin();
    73     removewithoutcheck(*Runner);
    74   }
    75135  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();
    81136};
    82137
     
    130185 * \param bonds times bond::BondDegree
    131186 */
    132 int atom::CountBonds() const
     187int BondedParticle::CountBonds() const
    133188{
    134189  int NoBonds = 0;
     
    233288};
    234289
    235 /** Output graph info of this atom.
     290/** Outputs the MPQC configuration line for this atom.
    236291 * \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 */
     295void 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
     302ostream & operator << (ostream &ost, const ParticleInfo &a)
     303{
     304  ost << "[" << a.Name << "|" << &a << "]";
     305  return ost;
     306};
     307
     308ostream & 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 */
     318bool atom::Compare(const atom &ptr)
     319{
     320  if (nr < ptr.nr)
    278321    return true;
    279   } else
     322  else
    280323    return false;
    281324};
    282325
    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 */
     330double 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 */
     339double atom::DistanceToVector(Vector &origin)
     340{
     341  return origin.Distance(&x);
    301342};
    302343
     
    313354};
    314355
     356
     357bool 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 */
     365void 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 */
     376void 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 */
     387void 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 */
     397bool 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 */
     415void 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
    315423/** Puts a given bond into atom::ListOfBonds.
    316424 * \param *Binder bond to insert
    317425 */
    318 bool atom::RegisterBond(bond *Binder)
     426bool BondedParticle::RegisterBond(bond *Binder)
    319427{
    320428  bool status = false;
     
    335443 * \param *Binder bond to remove
    336444 */
    337 bool atom::UnregisterBond(bond *Binder)
     445bool BondedParticle::UnregisterBond(bond *Binder)
    338446{
    339447  bool status = false;
     
    354462 * \note Does not do any memory de-allocation.
    355463 */
    356 void atom::UnregisterAllBond()
     464void BondedParticle::UnregisterAllBond()
    357465{
    358466  ListOfBonds.clear();
     
    362470 * \param *out output stream for debugging
    363471 */
    364 int atom::CorrectBondDegree(ofstream *out)
     472int BondedParticle::CorrectBondDegree(ofstream *out)
    365473{
    366474  int NoBonds = 0;
     
    395503};
    396504
    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 */
     509void 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 */
     521void 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 */
     535void 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  }
    419541};
    420542
     
    423545 * \param MaxSteps
    424546 */
    425 void atom::ResizeTrajectory(int MaxSteps)
     547void TrajectoryParticle::ResizeTrajectory(int MaxSteps)
    426548{
    427549  if (Trajectory.R.size() <= (unsigned int)(MaxSteps)) {
     
    437559 * \param src index of source step
    438560 */
    439 void atom::CopyStepOnStep(int dest, int src)
     561void TrajectoryParticle::CopyStepOnStep(int dest, int src)
    440562{
    441563  if (dest == src)  // self assignment check
     
    455577 * \param *Force matrix with forces
    456578 */
    457 void atom::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force)
     579void TrajectoryParticle::VelocityVerletUpdate(int NextStep, config *configuration, ForceMatrix *Force)
    458580{
    459581  //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
     
    484606 * \param *TotalVelocity pointer to tota velocity sum
    485607 */
    486 void atom::SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity )
     608void TrajectoryParticle::SumUpKineticEnergy( int Step, double *TotalMass, Vector *TotalVelocity )
    487609{
    488610  *TotalMass += type->mass;  // sum up total mass
    489611  for(int d=0;d<NDIM;d++) {
    490612    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 to
    496  * \return distance squared
    497  */
    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 value
    505  * \param step given step of trajectory to add
    506  */
    507 void atom::AddKineticToTemperature(double *temperature, int step) const
    508 {
    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 to
    515  * \return distance
    516  */
    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 at
    529  * \param endstep trajectory ends at
    530  * \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 in
    532  */
    533 void atom::EvaluateConstrainedForce(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force)
    534 {
    535   double constant = 10.;
    536   atom *Sprinter = PermutationMap[nr];
    537   // set forces
    538   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 meanwhile
    544  * \param Step MD step in atom::Tracjetory
    545  * \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];
    552613  }
    553614};
     
    558619 * \param *ekin sum of kinetic energy
    559620 */
    560 void atom::Thermostat_Woodcock(double ScaleTempFactor, int Step, double *ekin)
     621void TrajectoryParticle::Thermostat_Woodcock(double ScaleTempFactor, int Step, double *ekin)
    561622{
    562623  double *U = Trajectory.U.at(Step).x;
     
    573634 * \param *E
    574635 */
    575 void atom::Thermostat_Gaussian_init(int Step, double *G, double *E)
     636void TrajectoryParticle::Thermostat_Gaussian_init(int Step, double *G, double *E)
    576637{
    577638  double *U = Trajectory.U.at(Step).x;
     
    590651 * \param *configuration configuration class with TempFrequency and TargetTemp
    591652 */
    592 void atom::Thermostat_Gaussian_least_constraint(int Step, double G_over_E, double *ekin, config *configuration)
     653void TrajectoryParticle::Thermostat_Gaussian_least_constraint(int Step, double G_over_E, double *ekin, config *configuration)
    593654{
    594655  double *U = Trajectory.U.at(Step).x;
     
    606667 * \param *configuration configuration class with TempFrequency and TargetTemp
    607668 */
    608 void atom::Thermostat_Langevin(int Step, gsl_rng * r, double *ekin, config *configuration)
     669void TrajectoryParticle::Thermostat_Langevin(int Step, gsl_rng * r, double *ekin, config *configuration)
    609670{
    610671  double sigma  = sqrt(configuration->TargetTemp/type->mass); // sigma = (k_b T)/m (Hartree/atomicmass = atomiclength/atomictime)
     
    631692 * \param *configuration configuration class with TempFrequency and Deltat
    632693 */
    633 void atom::Thermostat_Berendsen(int Step, double ScaleTempFactor, double *ekin, config *configuration)
     694void TrajectoryParticle::Thermostat_Berendsen(int Step, double ScaleTempFactor, double *ekin, config *configuration)
    634695{
    635696  double *U = Trajectory.U.at(Step).x;
     
    646707 * \param *delta_alpha additional sum of kinetic energy on return
    647708 */
    648 void atom::Thermostat_NoseHoover_init(int Step, double *delta_alpha)
     709void TrajectoryParticle::Thermostat_NoseHoover_init(int Step, double *delta_alpha)
    649710{
    650711  double *U = Trajectory.U.at(Step).x;
     
    661722 * \param *configuration configuration class with TempFrequency and Deltat
    662723 */
    663 void atom::Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration)
     724void TrajectoryParticle::Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration)
    664725{
    665726  double *U = Trajectory.U.at(Step).x;
Note: See TracChangeset for help on using the changeset viewer.