Changeset ab1932 for src/config.cpp
- Timestamp:
 - Aug 3, 2009, 8:21:05 PM (16 years ago)
 - Branches:
 - Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
 - Children:
 - 03e57a
 - Parents:
 - 0dbddc (diff), edb93c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
 - 
      
- 1 edited
 
- 
          
  src/config.cpp (modified) (10 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/config.cpp
r0dbddc rab1932 5 5 */ 6 6 7 #include " molecules.hpp"7 #include "config.hpp" 8 8 9 9 /******************************** Functions for class ConfigFileBuffer **********************/ … … 276 276 277 277 /** Readin of Thermostat related values from parameter file. 278 * \param * source parameterfile279 */ 280 void config::InitThermostats( ifstream *source)278 * \param *fb file buffer containing the config file 279 */ 280 void config::InitThermostats(class ConfigFileBuffer *fb) 281 281 { 282 282 char *thermo = MallocString(12, "IonsInitRead: thermo"); … … 284 284 285 285 // read desired Thermostat from file along with needed additional parameters 286 if (ParseForParameter(verbose, source,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) {286 if (ParseForParameter(verbose,fb,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) { 287 287 if (strcmp(thermo, ThermostatNames[0]) == 0) { // None 288 288 if (ThermostatImplemented[0] == 1) { … … 295 295 if (ThermostatImplemented[1] == 1) { 296 296 Thermostat = Woodcock; 297 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency297 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency 298 298 } else { 299 299 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 303 303 if (ThermostatImplemented[2] == 1) { 304 304 Thermostat = Gaussian; 305 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate305 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate 306 306 } else { 307 307 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 311 311 if (ThermostatImplemented[3] == 1) { 312 312 Thermostat = Langevin; 313 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma314 if (ParseForParameter(verbose, source,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) {313 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma 314 if (ParseForParameter(verbose,fb,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) { 315 315 cout << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << alpha << "." << endl; 316 316 } else { … … 324 324 if (ThermostatImplemented[4] == 1) { 325 325 Thermostat = Berendsen; 326 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T326 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T 327 327 } else { 328 328 cout << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl; … … 332 332 if (ThermostatImplemented[5] == 1) { 333 333 Thermostat = NoseHoover; 334 ParseForParameter(verbose, source,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass334 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &HooverMass, 1, critical); // read Hoovermass 335 335 alpha = 0.; 336 336 } else { … … 704 704 return; 705 705 } 706 file->close(); 707 delete(file); 706 708 RetrieveConfigPathAndName(filename); 707 709 … … 722 724 double value[3]; 723 725 724 InitThermostats( file);726 InitThermostats(FileBuffer); 725 727 726 728 /* Namen einlesen */  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  