| [bcf653] | 1 | /* | 
|---|
|  | 2 | * Project: MoleCuilder | 
|---|
|  | 3 | * Description: creates and alters molecular systems | 
|---|
|  | 4 | * Copyright (C)  2010 University of Bonn. All rights reserved. | 
|---|
|  | 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. | 
|---|
|  | 6 | */ | 
|---|
|  | 7 |  | 
|---|
| [a3fded] | 8 | /* | 
|---|
|  | 9 | * ThermoStatContainer.cpp | 
|---|
|  | 10 | * | 
|---|
|  | 11 | *  Created on: 12.06.2010 | 
|---|
|  | 12 | *      Author: heber | 
|---|
|  | 13 | */ | 
|---|
|  | 14 |  | 
|---|
| [bf3817] | 15 | // include config.h | 
|---|
|  | 16 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 17 | #include <config.h> | 
|---|
|  | 18 | #endif | 
|---|
|  | 19 |  | 
|---|
| [bbbad5] | 20 | #include "Helpers/MemDebug.hpp" | 
|---|
|  | 21 |  | 
|---|
| [a3fded] | 22 | #include <cstring> | 
|---|
|  | 23 |  | 
|---|
|  | 24 | #include "ConfigFileBuffer.hpp" | 
|---|
|  | 25 | #include "config.hpp" | 
|---|
| [952f38] | 26 | #include "Helpers/Log.hpp" | 
|---|
| [a3fded] | 27 | #include "ThermoStatContainer.hpp" | 
|---|
| [952f38] | 28 | #include "Helpers/Verbose.hpp" | 
|---|
| [a3fded] | 29 |  | 
|---|
|  | 30 | /** Constructor for class ThermoStatContainer. | 
|---|
|  | 31 | * | 
|---|
|  | 32 | */ | 
|---|
| [97b825] | 33 | ThermoStatContainer::ThermoStatContainer() : | 
|---|
|  | 34 | Thermostat(4), | 
|---|
|  | 35 | ThermostatImplemented(NULL), | 
|---|
|  | 36 | ThermostatNames(NULL), | 
|---|
|  | 37 | TempFrequency(2.5), | 
|---|
|  | 38 | alpha(0.), | 
|---|
|  | 39 | HooverMass(0.), | 
|---|
|  | 40 | TargetTemp(0.00095004455), | 
|---|
|  | 41 | ScaleTempStep(25) | 
|---|
| [a3fded] | 42 | { | 
|---|
|  | 43 | ThermostatImplemented = new int[MaxThermostats]; | 
|---|
|  | 44 | ThermostatNames = new char *[MaxThermostats]; | 
|---|
|  | 45 | for (int j=0;j<MaxThermostats;j++) | 
|---|
|  | 46 | ThermostatNames[j] = new char[12]; | 
|---|
|  | 47 |  | 
|---|
|  | 48 | strcpy(ThermostatNames[0],"None"); | 
|---|
|  | 49 | ThermostatImplemented[0] = 1; | 
|---|
|  | 50 | strcpy(ThermostatNames[1],"Woodcock"); | 
|---|
|  | 51 | ThermostatImplemented[1] = 1; | 
|---|
|  | 52 | strcpy(ThermostatNames[2],"Gaussian"); | 
|---|
|  | 53 | ThermostatImplemented[2] = 1; | 
|---|
|  | 54 | strcpy(ThermostatNames[3],"Langevin"); | 
|---|
|  | 55 | ThermostatImplemented[3] = 1; | 
|---|
|  | 56 | strcpy(ThermostatNames[4],"Berendsen"); | 
|---|
|  | 57 | ThermostatImplemented[4] = 1; | 
|---|
|  | 58 | strcpy(ThermostatNames[5],"NoseHoover"); | 
|---|
|  | 59 | ThermostatImplemented[5] = 1; | 
|---|
|  | 60 | } | 
|---|
|  | 61 |  | 
|---|
|  | 62 | /** Destructor for Class ThermoStatContainer. | 
|---|
|  | 63 | * | 
|---|
|  | 64 | */ | 
|---|
|  | 65 | ThermoStatContainer::~ThermoStatContainer() | 
|---|
|  | 66 | { | 
|---|
|  | 67 | delete[](ThermostatImplemented); | 
|---|
|  | 68 | for (int j=0;j<MaxThermostats;j++) | 
|---|
|  | 69 | delete[](ThermostatNames[j]); | 
|---|
|  | 70 | delete[](ThermostatNames); | 
|---|
|  | 71 | } | 
|---|
|  | 72 |  | 
|---|
|  | 73 |  | 
|---|