Changes in src/molecule_dynamics.cpp [112b09:35b698]
- File:
-
- 1 edited
-
src/molecule_dynamics.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_dynamics.cpp
r112b09 r35b698 18 18 #include "parser.hpp" 19 19 #include "Plane.hpp" 20 #include "ThermoStatContainer.hpp" 20 21 21 22 /************************************* Functions for class molecule *********************************/ … … 472 473 * \param startstep stating initial configuration in molecule::Trajectories 473 474 * \param endstep stating final configuration in molecule::Trajectories 475 * \param &prefix path and prefix 474 476 * \param &config configuration structure 475 477 * \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() 476 478 * \return true - success in writing step files, false - error writing files or only one step in molecule::Trajectories 477 479 */ 478 bool molecule::LinearInterpolationBetweenConfiguration(int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity)480 bool molecule::LinearInterpolationBetweenConfiguration(int startstep, int endstep, std::string &prefix, config &configuration, bool MapByIdentity) 479 481 { 480 482 molecule *mol = NULL; … … 524 526 for (int i=getAtomCount(); i--; ) 525 527 SortIndex[i] = i; 526 status = MoleculePerStep->OutputConfigForListOfFragments(&configuration, SortIndex); 528 529 status = MoleculePerStep->OutputConfigForListOfFragments(prefix, SortIndex); 527 530 delete[](SortIndex); 528 531 … … 643 646 644 647 // calculate scale configuration 645 ScaleTempFactor = configuration.T argetTemp/ActualTemp;648 ScaleTempFactor = configuration.Thermostats->TargetTemp/ActualTemp; 646 649 647 650 // differentating between the various thermostats … … 651 654 break; 652 655 case Woodcock: 653 if ((configuration. ScaleTempStep > 0) && ((MDSteps-1) % configuration.ScaleTempStep == 0)) {656 if ((configuration.Thermostats->ScaleTempStep > 0) && ((MDSteps-1) % configuration.Thermostats->ScaleTempStep == 0)) { 654 657 DoLog(2) && (Log() << Verbose(2) << "Applying Woodcock thermostat..." << endl); 655 658 ActOnAllAtoms( &atom::Thermostat_Woodcock, sqrt(ScaleTempFactor), MDSteps, &ekin ); … … 684 687 delta_alpha = 0.; 685 688 ActOnAllAtoms( &atom::Thermostat_NoseHoover_init, MDSteps, &delta_alpha ); 686 delta_alpha = (delta_alpha - (3.*getAtomCount()+1.) * configuration.T argetTemp)/(configuration.HooverMass*Units2Electronmass);687 configuration. alpha += delta_alpha*configuration.Deltat;688 DoLog(3) && (Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration. alpha << "." << endl);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); 689 692 // apply updated alpha as additional force 690 693 ActOnAllAtoms( &atom::Thermostat_NoseHoover_scale, MDSteps, &ekin, &configuration );
Note:
See TracChangeset
for help on using the changeset viewer.
