Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_dynamics.cpp

    r35b698 r112b09  
    1818#include "parser.hpp"
    1919#include "Plane.hpp"
    20 #include "ThermoStatContainer.hpp"
    2120
    2221/************************************* Functions for class molecule *********************************/
     
    473472 * \param startstep stating initial configuration in molecule::Trajectories
    474473 * \param endstep stating final configuration in molecule::Trajectories
    475  * \param &prefix path and prefix
    476474 * \param &config configuration structure
    477475 * \param MapByIdentity if true we just use the identity to map atoms in start config to end config, if not we find mapping by \sa MinimiseConstrainedPotential()
    478476 * \return true - success in writing step files, false - error writing files or only one step in molecule::Trajectories
    479477 */
    480 bool molecule::LinearInterpolationBetweenConfiguration(int startstep, int endstep, std::string &prefix, config &configuration, bool MapByIdentity)
     478bool molecule::LinearInterpolationBetweenConfiguration(int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity)
    481479{
    482480  molecule *mol = NULL;
     
    526524  for (int i=getAtomCount(); i--; )
    527525    SortIndex[i] = i;
    528 
    529   status = MoleculePerStep->OutputConfigForListOfFragments(prefix, SortIndex);
     526  status = MoleculePerStep->OutputConfigForListOfFragments(&configuration, SortIndex);
    530527  delete[](SortIndex);
    531528
     
    646643
    647644  // calculate scale configuration
    648   ScaleTempFactor = configuration.Thermostats->TargetTemp/ActualTemp;
     645  ScaleTempFactor = configuration.TargetTemp/ActualTemp;
    649646
    650647  // differentating between the various thermostats
     
    654651      break;
    655652     case Woodcock:
    656       if ((configuration.Thermostats->ScaleTempStep > 0) && ((MDSteps-1) % configuration.Thermostats->ScaleTempStep == 0)) {
     653      if ((configuration.ScaleTempStep > 0) && ((MDSteps-1) % configuration.ScaleTempStep == 0)) {
    657654        DoLog(2) && (Log() << Verbose(2) <<  "Applying Woodcock thermostat..." << endl);
    658655        ActOnAllAtoms( &atom::Thermostat_Woodcock, sqrt(ScaleTempFactor), MDSteps, &ekin );
     
    687684      delta_alpha = 0.;
    688685      ActOnAllAtoms( &atom::Thermostat_NoseHoover_init, MDSteps, &delta_alpha );
    689       delta_alpha = (delta_alpha - (3.*getAtomCount()+1.) * configuration.Thermostats->TargetTemp)/(configuration.Thermostats->HooverMass*Units2Electronmass);
    690       configuration.Thermostats->alpha += delta_alpha*configuration.Deltat;
    691       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);
    692689      // apply updated alpha as additional force
    693690      ActOnAllAtoms( &atom::Thermostat_NoseHoover_scale, MDSteps, &ekin, &configuration );
Note: See TracChangeset for help on using the changeset viewer.