Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_dynamics.cpp

    ra3fded r112b09  
    55 *      Author: heber
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include "World.hpp"
     
    1618#include "parser.hpp"
    1719#include "Plane.hpp"
    18 #include "ThermoStatContainer.hpp"
    1920
    2021/************************************* Functions for class molecule *********************************/
     
    642643
    643644  // calculate scale configuration
    644   ScaleTempFactor = configuration.Thermostats->TargetTemp/ActualTemp;
     645  ScaleTempFactor = configuration.TargetTemp/ActualTemp;
    645646
    646647  // differentating between the various thermostats
     
    650651      break;
    651652     case Woodcock:
    652       if ((configuration.Thermostats->ScaleTempStep > 0) && ((MDSteps-1) % configuration.Thermostats->ScaleTempStep == 0)) {
     653      if ((configuration.ScaleTempStep > 0) && ((MDSteps-1) % configuration.ScaleTempStep == 0)) {
    653654        DoLog(2) && (Log() << Verbose(2) <<  "Applying Woodcock thermostat..." << endl);
    654655        ActOnAllAtoms( &atom::Thermostat_Woodcock, sqrt(ScaleTempFactor), MDSteps, &ekin );
     
    683684      delta_alpha = 0.;
    684685      ActOnAllAtoms( &atom::Thermostat_NoseHoover_init, MDSteps, &delta_alpha );
    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);
     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);
    688689      // apply updated alpha as additional force
    689690      ActOnAllAtoms( &atom::Thermostat_NoseHoover_scale, MDSteps, &ekin, &configuration );
Note: See TracChangeset for help on using the changeset viewer.