Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_dynamics.cpp

    r112b09 ra3fded  
    55 *      Author: heber
    66 */
    7 
    8 #include "Helpers/MemDebug.hpp"
    97
    108#include "World.hpp"
     
    1816#include "parser.hpp"
    1917#include "Plane.hpp"
     18#include "ThermoStatContainer.hpp"
    2019
    2120/************************************* Functions for class molecule *********************************/
     
    643642
    644643  // calculate scale configuration
    645   ScaleTempFactor = configuration.TargetTemp/ActualTemp;
     644  ScaleTempFactor = configuration.Thermostats->TargetTemp/ActualTemp;
    646645
    647646  // differentating between the various thermostats
     
    651650      break;
    652651     case Woodcock:
    653       if ((configuration.ScaleTempStep > 0) && ((MDSteps-1) % configuration.ScaleTempStep == 0)) {
     652      if ((configuration.Thermostats->ScaleTempStep > 0) && ((MDSteps-1) % configuration.Thermostats->ScaleTempStep == 0)) {
    654653        DoLog(2) && (Log() << Verbose(2) <<  "Applying Woodcock thermostat..." << endl);
    655654        ActOnAllAtoms( &atom::Thermostat_Woodcock, sqrt(ScaleTempFactor), MDSteps, &ekin );
     
    684683      delta_alpha = 0.;
    685684      ActOnAllAtoms( &atom::Thermostat_NoseHoover_init, MDSteps, &delta_alpha );
    686       delta_alpha = (delta_alpha - (3.*getAtomCount()+1.) * configuration.TargetTemp)/(configuration.HooverMass*Units2Electronmass);
    687       configuration.alpha += delta_alpha*configuration.Deltat;
    688       DoLog(3) && (Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration.alpha << "." << endl);
     685      delta_alpha = (delta_alpha - (3.*getAtomCount()+1.) * configuration.Thermostats->TargetTemp)/(configuration.Thermostats->HooverMass*Units2Electronmass);
     686      configuration.Thermostats->alpha += delta_alpha*configuration.Deltat;
     687      DoLog(3) && (Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration.Thermostats->alpha << "." << endl);
    689688      // apply updated alpha as additional force
    690689      ActOnAllAtoms( &atom::Thermostat_NoseHoover_scale, MDSteps, &ekin, &configuration );
Note: See TracChangeset for help on using the changeset viewer.