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