diff --git a/CMakeLists.txt b/CMakeLists.txt index fe02470d7..243fea881 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) #Versioning set (GOMC_VERSION_MAJOR 2) -set (GOMC_VERSION_MINOR 30) +set (GOMC_VERSION_MINOR 31) IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release CACHE STRING diff --git a/Change log b/Change log index d41c49825..29c87a58b 100644 --- a/Change log +++ b/Change log @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## [2.31] - 5/21/2018 ++ Compiling problem fixed on CYGWIN ++ Fix to the error checking of volume exchange if simulation volume became negative ++ Fix the equation to impose fix angle if the angle is less than 90. Generate error if constrained angle is not possible. ++ Fixed a bug where move timings were 0 in windows. ++ Fixed the issue where input files imported from NVT to NPT had zero volume, default value of 500 will be assigned in those cases. + ## [2.30] - 5/10/2018 + Added Regrowth move + Cleaned up the code and removed any memory leaks and bugs. diff --git a/README.md b/README.md index 695ebf0f4..834058523 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,53 @@ -Current Release: 2.30 (5/1/2018) +# GOMC - GPU Optimized Monte Carlo + +Current Release: 2.31 (5/21/2018) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/GOMC_WSU/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) [![Build Status](https://travis-ci.org/GOMC-WSU/GOMC.svg?branch=master)](https://travis-ci.org/GOMC-WSU/GOMC) We recommend the [GOMC Project Website](http://gomc.eng.wayne.edu/ "GOMC Website") and the [user manual](http://gomc.eng.wayne.edu/GOMC_files/GOMC_Manual.pdf "User Manual") for further information and examples. -GOMC - GPU Optimized Monte Carlo -============ - -BUILDING GOMC ON LINUX: ----------------- - 1. Clone or download our code from GitHub using "git clone https://github.com/GOMC-WSU/GOMC.git" - 2. Go into the GOMC directory using "cd GOMC" - 3. Give execution permission using "chmod u+x metamake.sh" - 4. In the base directory type "./metamake.sh" - 5. Step 2 should generate all the executables in "bin" directory - - You can set the number of the threads using the +pN argument, where N is the number of threads. - For example: - ./GOMC__XXXX +p4 in.conf - Which will run 4 threads and reads input file "in.conf". - - NOTES: - Building GOMC requires cmake, available at http://www.cmake.org and - in most Linux package repositories (as cmake). - If you wish to utilize NVIDIA graphic cards you will need to install - NVIDIA toolkit before compiling. The metamake file will automatically - detect the location of CUDA installation. (More info in Manual) - -BUILDING GOMC ON WINDOWS: ------------------ - 1. Open the Windows-compatible CMake GUI. - 2. Set the Source Folder to the GOMC root folder. - 3. Set the build Folder to your Build Folder. - 4. Click configure, select your compiler/environment - 5. Wait for CMake to finish the configuration. - 6. Click configure again and click generate. - 7. Open the CMake-generated project/solution etc. to the desired IDE - (e.g Visual Studio). - 8. Using the solution in the IDE of choice build GOMC per the IDE's - standard release compilation/executable generation methods. +## Building GOMC on GNU/Linux, macOS, or Cygwin: + + 1. Clone or download our code from GitHub: + ```bash + git clone https://github.com/GOMC-WSU/GOMC.git + ``` + 2. Go into the GOMC directory: + ```bash + cd GOMC + ``` + 3. Give execution permission: + ```bash + chmod u+x metamake.sh + ``` + 4. Run metamake file: + ```bash + ./metamake.sh + ``` + 5. Step 4 should generate all the executables in ```bin``` directory + + You can set the number of the threads using the +pN argument, where N is the number of threads. + For example: + ```bash + ./GOMC__XXXX +p4 in.conf + ``` + + Which will run 4 threads and reads input file "in.conf". + + NOTES: + Building GOMC requires cmake, available at http://www.cmake.org and in most Linux package repositories (as cmake). + If you wish to utilize NVIDIA graphic cards you will need to install NVIDIA toolkit before compiling. The metamake file will automatically detect the location of CUDA installation. (More info in Manual) + +## BUILDING GOMC ON WINDOWS: + 1. Open the Windows-compatible CMake GUI. + 2. Set the Source Folder to the GOMC root folder. + 3. Set the build Folder to your Build Folder. + 4. Click configure, select your compiler/environment + 5. Wait for CMake to finish the configuration. + 6. Click configure again and click generate. + 7. Open the CMake-generated project/solution etc. to the desired IDE (e.g Visual Studio). + 8. Using the solution in the IDE of choice build GOMC per the IDE's standard release compilation/executable generation methods. NOTES: You can also use CMake from the Windows command line if its directory is diff --git a/lib/BasicTypes.h b/lib/BasicTypes.h index 253589e75..c6cebc123 100644 --- a/lib/BasicTypes.h +++ b/lib/BasicTypes.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/BitLib.h b/lib/BitLib.h index bc35691d2..0e282216b 100644 --- a/lib/BitLib.h +++ b/lib/BitLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/GeomLib.h b/lib/GeomLib.h index e63d2a2b4..553616f53 100644 --- a/lib/GeomLib.h +++ b/lib/GeomLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/NumLib.h b/lib/NumLib.h index e14085691..107aa9677 100644 --- a/lib/NumLib.h +++ b/lib/NumLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/StrLib.h b/lib/StrLib.h index 707677000..e5a14ae58 100644 --- a/lib/StrLib.h +++ b/lib/StrLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/StrStrmLib.h b/lib/StrStrmLib.h index 31cfce55c..0a7c7f36b 100644 --- a/lib/StrStrmLib.h +++ b/lib/StrStrmLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/lib/VectorLib.h b/lib/VectorLib.h index 4ef487282..7f1cd65db 100644 --- a/lib/VectorLib.h +++ b/lib/VectorLib.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/BlockOutput.cpp b/src/BlockOutput.cpp index 5ae5b3531..dbfb161e5 100644 --- a/src/BlockOutput.cpp +++ b/src/BlockOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/BlockOutput.h b/src/BlockOutput.h index d33a68f89..28147b663 100644 --- a/src/BlockOutput.h +++ b/src/BlockOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/BoxDimensions.cpp b/src/BoxDimensions.cpp index 0f97eb583..2ba021532 100644 --- a/src/BoxDimensions.cpp +++ b/src/BoxDimensions.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -18,6 +18,7 @@ void BoxDimensions::Init(config_setup::RestartSettings const& restart, { rCut = rc; rCutSq = rcSq; + minVol = 8.0 * rCutSq * rCut + 0.001; for (uint b = 0; b < BOX_TOTAL; b++) { if(restart.enable && cryst.hasVolume) { axis = cryst.axis; @@ -50,17 +51,17 @@ void BoxDimensions::Init(config_setup::RestartSettings const& restart, //Print Box dimensio info printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n", - "Info: Box ", b, " Periodic Cell Basis 1", - cellBasis[b].Get(0).x, cellBasis[b].Get(0).y, - cellBasis[b].Get(0).z); + "Info: Box ", b, " Periodic Cell Basis 1", + cellBasis[b].Get(0).x, cellBasis[b].Get(0).y, + cellBasis[b].Get(0).z); printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n", - "Info: Box ", b, " Periodic Cell Basis 2", - cellBasis[b].Get(1).x, cellBasis[b].Get(1).y, - cellBasis[b].Get(1).z); + "Info: Box ", b, " Periodic Cell Basis 2", + cellBasis[b].Get(1).x, cellBasis[b].Get(1).y, + cellBasis[b].Get(1).z); printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n\n", - "Info: Box ", b, " Periodic Cell Basis 3", - cellBasis[b].Get(2).x, cellBasis[b].Get(2).y, - cellBasis[b].Get(2).z); + "Info: Box ", b, " Periodic Cell Basis 3", + cellBasis[b].Get(2).x, cellBasis[b].Get(2).y, + cellBasis[b].Get(2).z); axis.Set(b, cellBasis[b].Length(0), cellBasis[b].Length(1), @@ -106,7 +107,7 @@ uint BoxDimensions::ShiftVolume //If move would shrink any box axis to be less than 2 * rcut, then //automatically reject to prevent errors. if ((newDim.halfAx.x[b] < rCut || newDim.halfAx.y[b] < rCut || - newDim.halfAx.z[b] < rCut)) { + newDim.halfAx.z[b] < rCut || newVolume < minVol)) { std::cout << "WARNING!!! box shrunk below 2*Rcut! Auto-rejecting!" << std::endl; std::cout << "AxisDimensions: " << newDim.GetAxis(b) << std::endl; @@ -131,7 +132,7 @@ uint BoxDimensions::ExchangeVolume for (uint b = 0; b < BOX_TOTAL; b++) { scale[b] = newDim.axis.Get(b) / axis.Get(b); if ((newDim.halfAx.x[b] < rCut || newDim.halfAx.y[b] < rCut || - newDim.halfAx.z[b] < rCut)) { + newDim.halfAx.z[b] < rCut || newDim.volume[b] < minVol)) { std::cout << "WARNING!!! box shrunk below 2*Rcut! Auto-rejecting!" << std::endl; std::cout << "AxisDimensions: " << newDim.GetAxis(b) << std::endl; diff --git a/src/BoxDimensions.h b/src/BoxDimensions.h index c6d9a27b8..f058a5935 100644 --- a/src/BoxDimensions.h +++ b/src/BoxDimensions.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -135,6 +135,7 @@ class BoxDimensions double rCut; double rCutSq; + double minVol; bool cubic[BOX_TOTAL], orthogonal[BOX_TOTAL], constArea; diff --git a/src/BoxDimensionsNonOrth.cpp b/src/BoxDimensionsNonOrth.cpp index 580e91757..1180697c7 100644 --- a/src/BoxDimensionsNonOrth.cpp +++ b/src/BoxDimensionsNonOrth.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -18,6 +18,7 @@ void BoxDimensionsNonOrth::Init(config_setup::RestartSettings const& restart, { rCut = rc; rCutSq = rcSq; + minVol = 8.0 * rCutSq * rCut + 0.001; for (uint b = 0; b < BOX_TOTAL; b++) { if(restart.enable && cryst.hasVolume) { axis = cryst.axis; @@ -50,17 +51,17 @@ void BoxDimensionsNonOrth::Init(config_setup::RestartSettings const& restart, //Print Box dimensio info printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n", - "Info: Box ", b, " Periodic Cell Basis 1", - cellBasis[b].Get(0).x, cellBasis[b].Get(0).y, - cellBasis[b].Get(0).z); + "Info: Box ", b, " Periodic Cell Basis 1", + cellBasis[b].Get(0).x, cellBasis[b].Get(0).y, + cellBasis[b].Get(0).z); printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n", - "Info: Box ", b, " Periodic Cell Basis 2", - cellBasis[b].Get(1).x, cellBasis[b].Get(1).y, - cellBasis[b].Get(1).z); + "Info: Box ", b, " Periodic Cell Basis 2", + cellBasis[b].Get(1).x, cellBasis[b].Get(1).y, + cellBasis[b].Get(1).z); printf("%s %-d: %-26s %6.3f %7.3f %7.3f \n\n", - "Info: Box ", b, " Periodic Cell Basis 3", - cellBasis[b].Get(2).x, cellBasis[b].Get(2).y, - cellBasis[b].Get(2).z); + "Info: Box ", b, " Periodic Cell Basis 3", + cellBasis[b].Get(2).x, cellBasis[b].Get(2).y, + cellBasis[b].Get(2).z); //Find the length of a, b, c @@ -156,7 +157,7 @@ uint BoxDimensionsNonOrth::ShiftVolume(BoxDimensionsNonOrth & newDim, //If move would shrink any box axis to be less than 2 * rcut, then //automatically reject to prevent errors. if ((newDim.halfAx.x[b] < rCut || newDim.halfAx.y[b] < rCut || - newDim.halfAx.z[b] < rCut)) { + newDim.halfAx.z[b] < rCut || newVolume < minVol)) { std::cout << "WARNING!!! box shrunk below 2*Rcut! Auto-rejecting!" << std::endl; std::cout << "AxisDimensions: " << newDim.GetAxis(b) << std::endl; @@ -180,14 +181,14 @@ uint BoxDimensionsNonOrth::ExchangeVolume(BoxDimensionsNonOrth & newDim, //If move would shrink any box axis to be less than 2 * rcut, then //automatically reject to prevent errors. - for (uint b = 0; b < BOX_TOTAL && state == mv::fail_state::NO_FAIL; b++) { + for (uint b = 0; b < BOX_TOTAL; b++) { scale[b] = newDim.axis.Get(b) / axis.Get(b); if ((newDim.halfAx.x[b] < rCut || newDim.halfAx.y[b] < rCut || - newDim.halfAx.z[b] < rCut)) { + newDim.halfAx.z[b] < rCut || newDim.volume[b] < minVol)) { std::cout << "WARNING!!! box shrunk below 2*Rcut! Auto-rejecting!" << std::endl; std::cout << "AxisDimensions: " << newDim.GetAxis(b) << std::endl; - state = mv::fail_state::VOL_TRANS_WOULD_SHRINK_BOX_BELOW_CUTOFF; + return mv::fail_state::VOL_TRANS_WOULD_SHRINK_BOX_BELOW_CUTOFF; } } return state; diff --git a/src/BoxDimensionsNonOrth.h b/src/BoxDimensionsNonOrth.h index 0890803b6..121f6db9f 100644 --- a/src/BoxDimensionsNonOrth.h +++ b/src/BoxDimensionsNonOrth.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CBMC.cpp b/src/CBMC.cpp index cc85ad14c..fa82323d2 100644 --- a/src/CBMC.cpp +++ b/src/CBMC.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CBMC.h b/src/CBMC.h index f133f4ca7..80079e24e 100644 --- a/src/CBMC.h +++ b/src/CBMC.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/COM.h b/src/COM.h index 94240cea9..dcf5cfe3b 100644 --- a/src/COM.h +++ b/src/COM.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CPUSide.cpp b/src/CPUSide.cpp index 3d0c4a61b..30441a72a 100644 --- a/src/CPUSide.cpp +++ b/src/CPUSide.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CPUSide.h b/src/CPUSide.h index ecd823b9b..c1121765b 100644 --- a/src/CPUSide.h +++ b/src/CPUSide.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CalculateEnergy.cpp b/src/CalculateEnergy.cpp index 8417a869f..2aa9483a8 100644 --- a/src/CalculateEnergy.cpp +++ b/src/CalculateEnergy.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -92,7 +92,7 @@ SystemPotential CalculateEnergy::SystemTotal() double bondEn = 0.0, nonbondEn = 0.0, self = 0.0, correction = 0.0; MoleculeLookup::box_iterator thisMol = molLookup.BoxBegin(b); MoleculeLookup::box_iterator end = molLookup.BoxEnd(b); - std::vector molID; + std::vector molID; while (thisMol != end) { molID.push_back(*thisMol); @@ -539,13 +539,13 @@ void CalculateEnergy::ParticleInter(double* en, double *real, if(box >= BOXES_WITH_U_NB) return; double distSq, qi_qj_Fact, tempLJ, tempReal; - uint i, t; + int i; MoleculeKind const& thisKind = mols.GetKind(molIndex); uint kindI = thisKind.AtomKind(partIndex); double kindICharge = thisKind.AtomCharge(partIndex); std::vector nIndex; - for(t = 0; t < trials; ++t) { + for(uint t = 0; t < trials; ++t) { nIndex.clear(); tempReal = 0.0; tempLJ = 0.0; @@ -842,6 +842,9 @@ double CalculateEnergy::IntraEnergy_1_3(const double distSq, const uint atom1, } forcefield.particles->CalcAdd_1_4(eng, distSq, kind1, kind2); + if(isnan(eng)) + eng = num::BIGNUM; + return eng; } @@ -870,6 +873,9 @@ double CalculateEnergy::IntraEnergy_1_4(const double distSq, const uint atom1, } forcefield.particles->CalcAdd_1_4(eng, distSq, kind1, kind2); + if(isnan(eng)) + eng = num::BIGNUM; + return eng; } diff --git a/src/CalculateEnergy.h b/src/CalculateEnergy.h index 0c52aca25..e4ac02c81 100644 --- a/src/CalculateEnergy.h +++ b/src/CalculateEnergy.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CellList.cpp b/src/CellList.cpp index ba2c8b6db..4bf6fd8da 100644 --- a/src/CellList.cpp +++ b/src/CellList.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CellList.h b/src/CellList.h index f3b3b05e3..f8094be86 100644 --- a/src/CellList.h +++ b/src/CellList.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Clock.h b/src/Clock.h index 2b99ee3a3..3ae42e483 100644 --- a/src/Clock.h +++ b/src/Clock.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -13,7 +13,7 @@ along with this program, also can be found at . #include //for cout #if defined(__linux__) || defined(__APPLE__) #include //for timing -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) #include #endif @@ -25,7 +25,7 @@ struct Clock { #if defined(__linux__) || defined(__APPLE__) gettimeofday(&tv, &tz); strt = (double)tv.tv_sec + (double)tv.tv_usec / 1000000; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) strt = clock(); #endif lastTime = strt; @@ -42,7 +42,7 @@ struct Clock { struct timeval tv; struct timezone tz; double strt, stop, lastTime; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) clock_t strt, stop, lastTime; #endif ulong stepsPerOut, prevStep, lastStep; @@ -57,7 +57,7 @@ inline void Clock::CheckTime(const uint step) double currTime = (double)tv.tv_sec + (double)tv.tv_usec / 1000000; std::cout << "Steps/sec. : " << stepDelta / (currTime - lastTime) << std::endl; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) clock_t currTime = clock(); std::cout << "Steps/sec. : " << stepDelta / (((double)currTime - lastTime) / CLOCKS_PER_SEC) @@ -71,7 +71,7 @@ inline void Clock::CheckTime(const uint step) stop = (double)tv.tv_sec + (double)tv.tv_usec / 1000000; std::cout << "Simulation Time (total): " << (stop - strt) << " sec." << std::endl; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) stop = clock(); std::cout << "Simulation Time (total): " << (((double)stop - strt) / CLOCKS_PER_SEC) @@ -86,7 +86,7 @@ inline void Clock::SetStart() #if defined(__linux__) || defined(__APPLE__) gettimeofday(&tv, &tz); strt = (double)tv.tv_sec + (double)tv.tv_usec / 1000000; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) strt = clock(); #endif } @@ -96,7 +96,7 @@ inline void Clock::SetStop() #if defined(__linux__) || defined(__APPLE__) gettimeofday(&tv, &tz); stop = (double)tv.tv_sec + (double)tv.tv_usec / 1000000; -#elif _WIN32 +#elif (_WIN32) || (__CYGWIN__) stop = clock(); #endif } @@ -105,8 +105,8 @@ inline double Clock::GetTimDiff() { #if defined(__linux__) || defined(__APPLE__) return (stop - strt); -#elif _WIN32 - return (stop - strt) / CLOCKS_PER_SEC; +#elif (_WIN32) || (__CYGWIN__) + return (double)(stop - strt) / CLOCKS_PER_SEC; #endif } diff --git a/src/ConfigSetup.cpp b/src/ConfigSetup.cpp index a28dcbf65..abfbcd8cc 100644 --- a/src/ConfigSetup.cpp +++ b/src/ConfigSetup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/ConfigSetup.h b/src/ConfigSetup.h index 6e7e486c1..e2332a62d 100644 --- a/src/ConfigSetup.h +++ b/src/ConfigSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/ConsoleOutput.cpp b/src/ConsoleOutput.cpp index 01f9a5595..1f3a98d57 100644 --- a/src/ConsoleOutput.cpp +++ b/src/ConsoleOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/ConsoleOutput.h b/src/ConsoleOutput.h index 1f97c5e7b..34166ae9c 100644 --- a/src/ConsoleOutput.h +++ b/src/ConsoleOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/ConstField.h b/src/ConstField.h index 632b5f778..b34d0cf37 100644 --- a/src/ConstField.h +++ b/src/ConstField.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/CoordinateSetup.h b/src/CoordinateSetup.h index b0ddb8a08..838458e5a 100644 --- a/src/CoordinateSetup.h +++ b/src/CoordinateSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Coordinates.cpp b/src/Coordinates.cpp index 1ea7c98eb..f6686e19d 100644 --- a/src/Coordinates.cpp +++ b/src/Coordinates.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Coordinates.h b/src/Coordinates.h index 9768ad786..12aaf1b82 100644 --- a/src/Coordinates.h +++ b/src/Coordinates.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EnPartCntSampleOutput.cpp b/src/EnPartCntSampleOutput.cpp index 20f12a975..ea6120fff 100644 --- a/src/EnPartCntSampleOutput.cpp +++ b/src/EnPartCntSampleOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EnPartCntSampleOutput.h b/src/EnPartCntSampleOutput.h index ce6efb15d..9bcfdd2af 100644 --- a/src/EnPartCntSampleOutput.h +++ b/src/EnPartCntSampleOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EnergyTypes.h b/src/EnergyTypes.h index 60ecd7c81..161a8b262 100644 --- a/src/EnergyTypes.h +++ b/src/EnergyTypes.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EnsemblePreprocessor.h b/src/EnsemblePreprocessor.h index c5d309d3a..48334ad17 100644 --- a/src/EnsemblePreprocessor.h +++ b/src/EnsemblePreprocessor.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Ewald.cpp b/src/Ewald.cpp index ee8925450..ec65690e2 100644 --- a/src/Ewald.cpp +++ b/src/Ewald.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Ewald.h b/src/Ewald.h index 572efc423..dbf4c0dee 100644 --- a/src/Ewald.h +++ b/src/Ewald.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EwaldCached.cpp b/src/EwaldCached.cpp index 02b947994..50970e7f4 100644 --- a/src/EwaldCached.cpp +++ b/src/EwaldCached.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/EwaldCached.h b/src/EwaldCached.h index 51803ec62..76e0e0256 100644 --- a/src/EwaldCached.h +++ b/src/EwaldCached.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFAngles.h b/src/FFAngles.h index 37bd45b09..d4e14d3c7 100644 --- a/src/FFAngles.h +++ b/src/FFAngles.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFBonds.h b/src/FFBonds.h index 4e6c2094a..4a41aadf3 100644 --- a/src/FFBonds.h +++ b/src/FFBonds.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFConst.cpp b/src/FFConst.cpp index 14820172e..799808847 100644 --- a/src/FFConst.cpp +++ b/src/FFConst.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFConst.h b/src/FFConst.h index bcf4bf288..ff0725db1 100644 --- a/src/FFConst.h +++ b/src/FFConst.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFDihedrals.cpp b/src/FFDihedrals.cpp index d296922d2..4b81d721f 100644 --- a/src/FFDihedrals.cpp +++ b/src/FFDihedrals.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFDihedrals.h b/src/FFDihedrals.h index 2f9251af3..4d0d2d7f0 100644 --- a/src/FFDihedrals.h +++ b/src/FFDihedrals.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFParticle.cpp b/src/FFParticle.cpp index 85275c0e2..4eca391fa 100644 --- a/src/FFParticle.cpp +++ b/src/FFParticle.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFParticle.h b/src/FFParticle.h index e1526b2dd..c8f9755ac 100644 --- a/src/FFParticle.h +++ b/src/FFParticle.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFSetup.cpp b/src/FFSetup.cpp index 0712d9d8e..785d415cd 100644 --- a/src/FFSetup.cpp +++ b/src/FFSetup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFSetup.h b/src/FFSetup.h index 658447f21..38b7516b5 100644 --- a/src/FFSetup.h +++ b/src/FFSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFShift.h b/src/FFShift.h index 04156289b..8b5e50b4c 100644 --- a/src/FFShift.h +++ b/src/FFShift.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFSwitch.h b/src/FFSwitch.h index 72c2425d0..31f220993 100644 --- a/src/FFSwitch.h +++ b/src/FFSwitch.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FFSwitchMartini.h b/src/FFSwitchMartini.h index a66d2c1f3..2f1e9cf96 100644 --- a/src/FFSwitchMartini.h +++ b/src/FFSwitchMartini.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FixedWidthReader.h b/src/FixedWidthReader.h index a116d427b..bc9eaad5b 100644 --- a/src/FixedWidthReader.h +++ b/src/FixedWidthReader.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Forcefield.cpp b/src/Forcefield.cpp index 9d9008888..ecf46b3bd 100644 --- a/src/Forcefield.cpp +++ b/src/Forcefield.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Forcefield.h b/src/Forcefield.h index e0338d7d1..ac8527b2b 100644 --- a/src/Forcefield.h +++ b/src/Forcefield.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/FxdWidthWrtr.h b/src/FxdWidthWrtr.h index 2c3baffaf..e8d9683ef 100644 --- a/src/FxdWidthWrtr.h +++ b/src/FxdWidthWrtr.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateEnergyCUDAKernel.cu b/src/GPU/CalculateEnergyCUDAKernel.cu index 61812bbd5..24093b1b5 100644 --- a/src/GPU/CalculateEnergyCUDAKernel.cu +++ b/src/GPU/CalculateEnergyCUDAKernel.cu @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateEnergyCUDAKernel.cuh b/src/GPU/CalculateEnergyCUDAKernel.cuh index 67b90b88e..449c1d98d 100644 --- a/src/GPU/CalculateEnergyCUDAKernel.cuh +++ b/src/GPU/CalculateEnergyCUDAKernel.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateEwaldCUDAKernel.cu b/src/GPU/CalculateEwaldCUDAKernel.cu index e0877f7b6..b52622531 100644 --- a/src/GPU/CalculateEwaldCUDAKernel.cu +++ b/src/GPU/CalculateEwaldCUDAKernel.cu @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateEwaldCUDAKernel.cuh b/src/GPU/CalculateEwaldCUDAKernel.cuh index 095eeb148..b39328db9 100644 --- a/src/GPU/CalculateEwaldCUDAKernel.cuh +++ b/src/GPU/CalculateEwaldCUDAKernel.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateForceCUDAKernel.cu b/src/GPU/CalculateForceCUDAKernel.cu index da0968089..f919ff3ba 100644 --- a/src/GPU/CalculateForceCUDAKernel.cu +++ b/src/GPU/CalculateForceCUDAKernel.cu @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateForceCUDAKernel.cuh b/src/GPU/CalculateForceCUDAKernel.cuh index 20f3e64a8..fa233b9d1 100644 --- a/src/GPU/CalculateForceCUDAKernel.cuh +++ b/src/GPU/CalculateForceCUDAKernel.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/CalculateMinImageCUDAKernel.cuh b/src/GPU/CalculateMinImageCUDAKernel.cuh index 54eb7e575..6fdf331b1 100644 --- a/src/GPU/CalculateMinImageCUDAKernel.cuh +++ b/src/GPU/CalculateMinImageCUDAKernel.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/ConstantDefinitionsCUDAKernel.cu b/src/GPU/ConstantDefinitionsCUDAKernel.cu index 149d38e8d..fb9115c11 100644 --- a/src/GPU/ConstantDefinitionsCUDAKernel.cu +++ b/src/GPU/ConstantDefinitionsCUDAKernel.cu @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/ConstantDefinitionsCUDAKernel.cuh b/src/GPU/ConstantDefinitionsCUDAKernel.cuh index 41f1930e1..a75526d52 100644 --- a/src/GPU/ConstantDefinitionsCUDAKernel.cuh +++ b/src/GPU/ConstantDefinitionsCUDAKernel.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/GPU/VariablesCUDA.cuh b/src/GPU/VariablesCUDA.cuh index aa726b705..4a208a975 100644 --- a/src/GPU/VariablesCUDA.cuh +++ b/src/GPU/VariablesCUDA.cuh @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Geometry.cpp b/src/Geometry.cpp index 487905c5b..695ae7ea0 100644 --- a/src/Geometry.cpp +++ b/src/Geometry.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Geometry.h b/src/Geometry.h index 743f6759f..163f3fa72 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/HistOutput.cpp b/src/HistOutput.cpp index 607794a9c..403001092 100644 --- a/src/HistOutput.cpp +++ b/src/HistOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/HistOutput.h b/src/HistOutput.h index 0db597791..d207eec92 100644 --- a/src/HistOutput.h +++ b/src/HistOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/InputAbstracts.h b/src/InputAbstracts.h index 3fff1b86c..b6e60826e 100644 --- a/src/InputAbstracts.h +++ b/src/InputAbstracts.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/InputFileReader.cpp b/src/InputFileReader.cpp index 686d9b370..c1f202f1c 100644 --- a/src/InputFileReader.cpp +++ b/src/InputFileReader.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/InputFileReader.h b/src/InputFileReader.h index 9e3a17628..25fd16e31 100644 --- a/src/InputFileReader.h +++ b/src/InputFileReader.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/IntraSwap.h b/src/IntraSwap.h index cbe57c833..954444d8a 100644 --- a/src/IntraSwap.h +++ b/src/IntraSwap.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Main.cpp b/src/Main.cpp index 6b3c80217..940a84aaa 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MolPick.h b/src/MolPick.h index 816773ec9..3a8ee32fe 100644 --- a/src/MolPick.h +++ b/src/MolPick.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MolSetup.cpp b/src/MolSetup.cpp index a00ac9b48..3c0615178 100644 --- a/src/MolSetup.cpp +++ b/src/MolSetup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MolSetup.h b/src/MolSetup.h index 5bae76d3c..d18fafacb 100644 --- a/src/MolSetup.h +++ b/src/MolSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoleculeKind.cpp b/src/MoleculeKind.cpp index 48e819afb..a6ae45db8 100644 --- a/src/MoleculeKind.cpp +++ b/src/MoleculeKind.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoleculeKind.h b/src/MoleculeKind.h index 7567af037..99ebb6188 100644 --- a/src/MoleculeKind.h +++ b/src/MoleculeKind.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoleculeLookup.cpp b/src/MoleculeLookup.cpp index e513e0336..0891c6d49 100644 --- a/src/MoleculeLookup.cpp +++ b/src/MoleculeLookup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoleculeLookup.h b/src/MoleculeLookup.h index 09afaedf3..9bf3d2a2d 100644 --- a/src/MoleculeLookup.h +++ b/src/MoleculeLookup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoleculeTransfer.h b/src/MoleculeTransfer.h index a1236bea1..00ba525bb 100644 --- a/src/MoleculeTransfer.h +++ b/src/MoleculeTransfer.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Molecules.cpp b/src/Molecules.cpp index a98b855b8..2d67fd2fb 100644 --- a/src/Molecules.cpp +++ b/src/Molecules.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Molecules.h b/src/Molecules.h index db3977485..01e070043 100644 --- a/src/Molecules.h +++ b/src/Molecules.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoveBase.h b/src/MoveBase.h index 856fe401d..72f0cbbf9 100644 --- a/src/MoveBase.h +++ b/src/MoveBase.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoveConst.cpp b/src/MoveConst.cpp index 57fa07fc1..8583e3af2 100644 --- a/src/MoveConst.cpp +++ b/src/MoveConst.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoveConst.h b/src/MoveConst.h index eeec4f432..2f4066c6b 100644 --- a/src/MoveConst.h +++ b/src/MoveConst.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/MoveSettings.cpp b/src/MoveSettings.cpp index 7a9bcf033..ed8daac24 100644 --- a/src/MoveSettings.cpp +++ b/src/MoveSettings.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -36,7 +36,11 @@ void MoveSettings::Init(StaticVals const& statV, scale[rotate] = remarks.rotate[b]; #if ENSEMBLE == NPT || ENSEMBLE == GEMC uint volume = mv::GetMoveSubIndex(mv::VOL_TRANSFER, b); - scale[volume] = remarks.vol[b]; + if (remarks.vol[b] > 0.1) { + scale[volume] = remarks.vol[b]; + } else { + scale[volume] = 500; + } #endif } } else { diff --git a/src/MoveSettings.h b/src/MoveSettings.h index eeece0cc2..fc68de90c 100644 --- a/src/MoveSettings.h +++ b/src/MoveSettings.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/NoEwald.cpp b/src/NoEwald.cpp index 89c8e68af..ddb28498a 100644 --- a/src/NoEwald.cpp +++ b/src/NoEwald.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/NoEwald.h b/src/NoEwald.h index e2a46fa95..cf6f9ede7 100644 --- a/src/NoEwald.h +++ b/src/NoEwald.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/OutConst.cpp b/src/OutConst.cpp index 5b4141117..363bd8d0a 100644 --- a/src/OutConst.cpp +++ b/src/OutConst.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/OutConst.h b/src/OutConst.h index b0816ef05..59a917d28 100644 --- a/src/OutConst.h +++ b/src/OutConst.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/OutputAbstracts.h b/src/OutputAbstracts.h index a78ce1a40..3d0cc5097 100644 --- a/src/OutputAbstracts.h +++ b/src/OutputAbstracts.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/OutputVars.cpp b/src/OutputVars.cpp index 0f3c27912..229cab08f 100644 --- a/src/OutputVars.cpp +++ b/src/OutputVars.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/OutputVars.h b/src/OutputVars.h index 9600bb62a..1d28edaa0 100644 --- a/src/OutputVars.h +++ b/src/OutputVars.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PDBConst.h b/src/PDBConst.h index afb6963aa..0f7d45504 100644 --- a/src/PDBConst.h +++ b/src/PDBConst.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PDBOutput.cpp b/src/PDBOutput.cpp index fb592c68e..3b025c312 100644 --- a/src/PDBOutput.cpp +++ b/src/PDBOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PDBOutput.h b/src/PDBOutput.h index e664b9bdb..150231d92 100644 --- a/src/PDBOutput.h +++ b/src/PDBOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PDBSetup.cpp b/src/PDBSetup.cpp index b1604d4bc..28773a709 100644 --- a/src/PDBSetup.cpp +++ b/src/PDBSetup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PDBSetup.h b/src/PDBSetup.h index 738aea8ef..da10fac39 100644 --- a/src/PDBSetup.h +++ b/src/PDBSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PRNG.h b/src/PRNG.h index 61265aea0..42202e63f 100644 --- a/src/PRNG.h +++ b/src/PRNG.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PRNGSetup.cpp b/src/PRNGSetup.cpp index e0628442e..b1a0a18b4 100644 --- a/src/PRNGSetup.cpp +++ b/src/PRNGSetup.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PRNGSetup.h b/src/PRNGSetup.h index fbdc081d9..e3a3b6586 100644 --- a/src/PRNGSetup.h +++ b/src/PRNGSetup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PSFOutput.cpp b/src/PSFOutput.cpp index e7da7de7e..1605f4857 100644 --- a/src/PSFOutput.cpp +++ b/src/PSFOutput.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/PSFOutput.h b/src/PSFOutput.h index 7a29791a0..f05a319a2 100644 --- a/src/PSFOutput.h +++ b/src/PSFOutput.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Reader.cpp b/src/Reader.cpp index 74150198f..6c0f5f9c1 100644 --- a/src/Reader.cpp +++ b/src/Reader.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Reader.h b/src/Reader.h index 3e32aaf82..cfb45f168 100644 --- a/src/Reader.h +++ b/src/Reader.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Regrowth.h b/src/Regrowth.h index a0381b4ba..1067db78b 100644 --- a/src/Regrowth.h +++ b/src/Regrowth.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/SeedReader.h b/src/SeedReader.h index d03febf02..012fdc29d 100644 --- a/src/SeedReader.h +++ b/src/SeedReader.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Setup.h b/src/Setup.h index b8abbbc7e..43423b882 100644 --- a/src/Setup.h +++ b/src/Setup.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/SimEventFrequency.h b/src/SimEventFrequency.h index d74ad9114..45f0c1cfe 100644 --- a/src/SimEventFrequency.h +++ b/src/SimEventFrequency.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Simulation.cpp b/src/Simulation.cpp index fa43d591f..6379d19a6 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Simulation.h b/src/Simulation.h index e436e8611..f90eb0cab 100644 --- a/src/Simulation.h +++ b/src/Simulation.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/StaticVals.cpp b/src/StaticVals.cpp index 835aaf332..d64455c0d 100644 --- a/src/StaticVals.cpp +++ b/src/StaticVals.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/StaticVals.h b/src/StaticVals.h index 7d4b1f250..a7142c459 100644 --- a/src/StaticVals.h +++ b/src/StaticVals.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/SubdividedArray.h b/src/SubdividedArray.h index b9318a654..4c03e0479 100644 --- a/src/SubdividedArray.h +++ b/src/SubdividedArray.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/System.cpp b/src/System.cpp index 4e359c67d..df5e29599 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/System.h b/src/System.h index f04058196..3b3836bd7 100644 --- a/src/System.h +++ b/src/System.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/TransformMatrix.h b/src/TransformMatrix.h index 4d1635013..6dbff01b6 100644 --- a/src/TransformMatrix.h +++ b/src/TransformMatrix.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/UnitConst.h b/src/UnitConst.h index 65d94890b..401afe145 100644 --- a/src/UnitConst.h +++ b/src/UnitConst.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/Writer.h b/src/Writer.h index 3560ee95c..e0ad6a5ee 100644 --- a/src/Writer.h +++ b/src/Writer.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/XYZArray.h b/src/XYZArray.h index 80f38aed0..30fa8d170 100644 --- a/src/XYZArray.h +++ b/src/XYZArray.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCComponent.h b/src/cbmc/DCComponent.h index 02e1a73f7..911872297 100644 --- a/src/cbmc/DCComponent.h +++ b/src/cbmc/DCComponent.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCData.h b/src/cbmc/DCData.h index 872059992..e762f8065 100644 --- a/src/cbmc/DCData.h +++ b/src/cbmc/DCData.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCFactory.h b/src/cbmc/DCFactory.h index 182ee3e1f..bfdbb3a6d 100644 --- a/src/cbmc/DCFactory.h +++ b/src/cbmc/DCFactory.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCFreeHedron.cpp b/src/cbmc/DCFreeHedron.cpp index bb4c6238e..3797186b6 100644 --- a/src/cbmc/DCFreeHedron.cpp +++ b/src/cbmc/DCFreeHedron.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -46,6 +46,11 @@ DCFreeHedron::DCFreeHedron(DCData* data, const mol_setup::MolKind& kind, for (uint i = 0; i < hed.NumBond(); ++i) { bondKinds[i] = onFocus[i].kind; } + + if(data->nLJTrialsNth < 1) { + std::cout << "Error: CBMC secondary atom trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } } diff --git a/src/cbmc/DCFreeHedron.h b/src/cbmc/DCFreeHedron.h index 6198f97cc..f3ccdc53c 100644 --- a/src/cbmc/DCFreeHedron.h +++ b/src/cbmc/DCFreeHedron.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCFreeHedronSeed.cpp b/src/cbmc/DCFreeHedronSeed.cpp index 562eecfd7..b1308996a 100644 --- a/src/cbmc/DCFreeHedronSeed.cpp +++ b/src/cbmc/DCFreeHedronSeed.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCFreeHedronSeed.h b/src/cbmc/DCFreeHedronSeed.h index 46580e314..e5b7f2243 100644 --- a/src/cbmc/DCFreeHedronSeed.h +++ b/src/cbmc/DCFreeHedronSeed.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCGraph.cpp b/src/cbmc/DCGraph.cpp index 96ebfb822..43eafc8e7 100644 --- a/src/cbmc/DCGraph.cpp +++ b/src/cbmc/DCGraph.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCGraph.h b/src/cbmc/DCGraph.h index 2240ee456..81f22cf39 100644 --- a/src/cbmc/DCGraph.h +++ b/src/cbmc/DCGraph.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCHedron.cpp b/src/cbmc/DCHedron.cpp index 7259418e1..c7486cda2 100644 --- a/src/cbmc/DCHedron.cpp +++ b/src/cbmc/DCHedron.cpp @@ -1,413 +1,408 @@ -/******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 -Copyright (C) 2018 GOMC Group -A copy of the GNU General Public License can be found in the COPYRIGHT.txt -along with this program, also can be found at . -********************************************************************************/ -#define _USE_MATH_DEFINES -#include -#include "DCHedron.h" -#include "TrialMol.h" -#include "DCData.h" -#include "MolSetup.h" -#include "Forcefield.h" -#include "PRNG.h" -#include "NumLib.h" -#include -#include - -namespace -{ -//Wish I could use lambdas.. -struct FindA1 { - FindA1(uint x) : x(x) {}; - bool operator()(const mol_setup::Bond& b) - { - return (b.a1 == x); - } - uint x; -}; - -struct FindAngle { - FindAngle(uint x, uint y) : x(x), y(y) {} - uint y, x; - bool operator()(const mol_setup::Angle& a) - { - return (a.a0 == x && a.a2 == y) || (a.a0 == y && a.a2 == x); - } -}; - -} - -namespace cbmc -{ - - -DCHedron::DCHedron(DCData* data, const mol_setup::MolKind& kind, - uint focus, uint prev) - : data(data), focus(focus), prev(prev) -{ - using namespace mol_setup; - using namespace std; - vector onFocus = AtomBonds(kind, focus); - onFocus.erase(remove_if(onFocus.begin(), onFocus.end(), FindA1(prev)), - onFocus.end()); - nBonds = onFocus.size(); - - for (uint i = 0; i < nBonds; ++i) { - bonded[i] = onFocus[i].a1; - } - - vector angles = AtomMidAngles(kind, focus); - for (uint i = 0; i < nBonds; ++i) { - typedef vector::const_iterator Aiter; - Aiter free = find_if(angles.begin(), angles.end(), - FindAngle(prev, bonded[i])); - assert(free != angles.end()); - angleKinds[i][i] = free->kind; - - for (uint j = i + 1; j < nBonds; ++j) { - Aiter pair = find_if(angles.begin(), angles.end(), - FindAngle(bonded[i], bonded[j])); - angleKinds[i][j] = pair->kind; - angleKinds[j][i] = pair->kind; - } - } - - phi[0] = 0.0; - phiWeight[0] = 1.0; -} - -void DCHedron::SetBondNew(double const *bondLen, double const &anchBond) -{ - for(uint i = 0; i < nBonds; ++i) { - bondLength[i] = bondLen[i]; - } - anchorBond = anchBond; -} - -void DCHedron::SetBondOld(double const *bondLen, double const &anchBond) -{ - for(uint i = 0; i < nBonds; ++i) { - bondLengthOld[i] = bondLen[i]; - } - anchorBondOld = anchBond; -} - -double DCHedron::GetWeight() -{ - double result = 1; - for(uint i = 0; i < nBonds; ++i) { - result *= thetaWeight[i]; - result *= phiWeight[i]; - } - return result; -} - -//Randomly generate nTrials angles and save energy and weight -void DCHedron::GenerateAnglesNew(TrialMol& newMol, uint molIndex, - uint kind, uint nTrials, uint bType) -{ - double* nonbonded_1_3 = data->nonbonded_1_3; - int i; - double distSq, thetaFix; - bool angleFix = false; - std::fill_n(nonbonded_1_3, nTrials, 0.0); - - if(data->ff.angles->AngleFixed(kind)) { - angleFix = true; - thetaFix = data->ff.angles->Angle(kind); - } - - for (i = 0; i < nTrials; ++i) { - if(angleFix) - data->angles[i] = thetaFix; - else - data->angles[i] = data->prng.rand(M_PI); - } - -#ifdef _OPENMP - #pragma omp parallel for default(shared) private(i, distSq) -#endif - for (i = 0; i < nTrials; ++i) { - if(angleFix) - data->angleEnergy[i] = 0.0; - else - data->angleEnergy[i] = data->ff.angles->Calc(kind, data->angles[i]); - - distSq = newMol.AngleDist(anchorBond, bondLength[bType], - data->angles[i]); - nonbonded_1_3[i] = - data->calc.IntraEnergy_1_3(distSq, prev, bonded[bType], molIndex); - - if(isnan(nonbonded_1_3[i])) - nonbonded_1_3[i] = num::BIGNUM; - - data->angleWeights[i] = exp((data->angleEnergy[i] + nonbonded_1_3[i]) - * -data->ff.beta); - } -} - -void DCHedron::GenerateAnglesOld(TrialMol& oldMol, uint molIndex, - uint kind, uint nTrials, uint bType) -{ - double* nonbonded_1_3 = data->nonbonded_1_3; - int i; - double distSq, thetaFix; - bool angleFix = false; - std::fill_n(nonbonded_1_3, nTrials, 0.0); - - if(data->ff.angles->AngleFixed(kind)) { - angleFix = true; - thetaFix = data->ff.angles->Angle(kind); - } - - for (i = 0; i < nTrials; ++i) { - if(angleFix) - data->angles[i] = thetaFix; - else - data->angles[i] = data->prng.rand(M_PI); - } - -#ifdef _OPENMP - #pragma omp parallel for default(shared) private(i, distSq) -#endif - for (i = 0; i < nTrials; ++i) { - if(angleFix) - data->angleEnergy[i] = 0.0; - else - data->angleEnergy[i] = data->ff.angles->Calc(kind, data->angles[i]); - - distSq = oldMol.AngleDist(anchorBondOld, bondLengthOld[bType], - data->angles[i]); - nonbonded_1_3[i] = - data->calc.IntraEnergy_1_3(distSq, prev, bonded[bType], molIndex); - - if(isnan(nonbonded_1_3[i])) - nonbonded_1_3[i] = num::BIGNUM; - - data->angleWeights[i] = exp((data->angleEnergy[i] + nonbonded_1_3[i]) - * -data->ff.beta); - } -} - -void DCHedron::FreeAnglesNew(TrialMol& newMol, uint molIndex, uint nTrials) -{ - for (uint i = 0; i < nBonds; ++i) { - GenerateAnglesNew(newMol, molIndex, angleKinds[i][i], nTrials, i); - double stepWeight = std::accumulate(data->angleWeights, - data->angleWeights + nTrials, - 0.0); - uint winner = data->prng.PickWeighted(data->angleWeights, - nTrials, stepWeight); - theta[i] = data->angles[winner]; - bendEnergy += data->angleEnergy[winner]; - oneThree += data->nonbonded_1_3[winner]; - thetaWeight[i] = stepWeight; - } -} - -void DCHedron::FreeAnglesOld(TrialMol& oldMol, uint molIndex, uint nTrials) -{ - for (uint i = 0; i < nBonds; ++i) { - GenerateAnglesOld(oldMol, molIndex, angleKinds[i][i], nTrials, i); - double stepWeight = std::accumulate(data->angleWeights, - data->angleWeights + nTrials, - 0.0); - thetaWeight[i] = stepWeight; - } -} - -void DCHedron::PrepareNew(TrialMol& newMol, uint molIndex) -{ - bendEnergy = 0.0; - oneThree = 0.0; - FreeAnglesNew(newMol, molIndex, data->nAngleTrials); - ConstrainedAngles(newMol, molIndex, data->nAngleTrials); -} - -void DCHedron::PrepareOld(TrialMol& oldMol, uint molIndex) -{ - oneThree = 0.0; - bendEnergy = 0.0; - FreeAnglesOld(oldMol, molIndex, data->nAngleTrials - 1); -} - - -void DCHedron::IncorporateOld(TrialMol& oldMol, uint molIndex) -{ - bendEnergy = 0.0; - oneThree = 0.0; - const Forcefield& ff = data->ff; - for (uint b = 0; b < nBonds; ++b) { - - oldMol.OldThetaAndPhi(bonded[b], focus, theta[b], phi[b]); - double thetaEnergy = data->ff.angles->Calc(angleKinds[b][b], theta[b]); - double distSq = oldMol.OldDistSq(prev, bonded[b]); - double nonbondedEn = - data->calc.IntraEnergy_1_3(distSq, prev, bonded[b], molIndex); - - thetaWeight[b] += exp(-1 * data->ff.beta * (thetaEnergy + nonbondedEn)); - bendEnergy += thetaEnergy; - oneThree += nonbondedEn; - - if (b != 0) { - double phiEnergy = 0.0; - nonbondedEn = 0.0; - phiWeight[b] = 0.0; - for (uint c = 0; c < b; ++c) { - double cosTerm = cos(theta[b]) * cos(theta[c]); - double sinTerm = sin(theta[b]) * sin(theta[c]); - double bfcTheta = acos(sinTerm * cos(phi[b] - phi[c]) + - cosTerm); - - double distSq = oldMol.OldDistSq(bonded[c], bonded[b]); - nonbondedEn += data->calc.IntraEnergy_1_3(distSq, bonded[c], - bonded[b], molIndex); - - phiEnergy += ff.angles->Calc(angleKinds[b][c], bfcTheta); - - } - phiWeight[b] = exp(-ff.beta * (phiEnergy + nonbondedEn)); - bendEnergy += phiEnergy; - oneThree += nonbondedEn; - } - } -} - - -void DCHedron::ConstrainedAngles(TrialMol& newMol, uint molIndex, uint nTrials) -{ - double* angles = data->angles; - double* energies = data->angleEnergy; - double* weights = data->angleWeights; - double* nonbonded_1_3 = data->nonbonded_1_3; - std::fill_n(nonbonded_1_3, nTrials, 0.0); - phi[0] = 0.0; - - for (uint b = 1; b < nBonds; ++b) { - //pick "twist" angles - for (uint i = 0; i < nTrials; ++i) { - angles[i] = data->prng.rand(M_PI * 2); - energies[i] = 0.0; - nonbonded_1_3[i] = 0.0; - } - - //compare to angles determined in previous iterations - for (uint c = 0; c < b; ++c) { - double cosTerm = cos(theta[b]) * cos(theta[c]); - double sinTerm = sin(theta[b]) * sin(theta[c]); - - for (uint i = 0; i < nTrials; ++i) { - if(data->ff.angles->AngleEnergy(angleKinds[b][c]) <= 10E7) { - double bfcTheta = acos(sinTerm * cos(angles[i] - phi[c]) + - cosTerm); - double distSq = newMol.AngleDist(bondLength[b], bondLength[c], - bfcTheta); - double tempEn = data->calc.IntraEnergy_1_3(distSq, bonded[b], - bonded[c], - molIndex); - - if(isnan(tempEn)) - tempEn = num::BIGNUM; - - nonbonded_1_3[i] += tempEn; - - energies[i] += data->ff.angles->Calc(angleKinds[b][c], - bfcTheta); - } else { - double fixedbfc = data->ff.angles->Angle(angleKinds[b][c]); - angles[i] = acos((cos(fixedbfc) - abs(cosTerm)) / sinTerm) + phi[c]; - double bfcTheta = acos(sinTerm * cos(angles[i] - phi[c]) + - cosTerm); - double distSq = newMol.AngleDist(bondLength[b], bondLength[c], - bfcTheta); - double tempEn = data->calc.IntraEnergy_1_3(distSq, bonded[b], - bonded[c], - molIndex); - if(isnan(tempEn)) - tempEn = num::BIGNUM; - - nonbonded_1_3[i] += tempEn; - energies[i] += data->ff.angles->Calc(angleKinds[b][c], - bfcTheta); - } - } - } - - //calculate weights from combined energy - double stepWeight = 0.0; - int i; -#ifdef _OPENMP - #pragma omp parallel for default(shared) private(i) reduction(+:stepWeight) -#endif - for (i = 0; i < nTrials; ++i) { - weights[i] = exp(-1 * data->ff.beta * (energies[i] + - nonbonded_1_3[i])); - stepWeight += weights[i]; - } - - uint winner = data->prng.PickWeighted(weights, nTrials, stepWeight); - phi[b] = angles[winner]; - bendEnergy += energies[winner]; - oneThree += nonbonded_1_3[winner]; - phiWeight[b] = stepWeight; - } -} - -//Calculate OldMol Bond Energy & -//Calculate phi weight for nTrials using actual theta of OldMol -void DCHedron::ConstrainedAnglesOld(uint nTrials, TrialMol& oldMol, - uint molIndex) -{ - IncorporateOld(oldMol, molIndex); - - for (uint b = 1; b < nBonds; ++b) { - double stepWeight = 0.0; - //pick "twist" angles - for (uint i = 0; i < nTrials; ++i) { - double angles = data->prng.rand(M_PI * 2); - double energies = 0.0; - double nonbondedEng = 0.0; - //compare to angles determined in previous iterations - for (uint c = 0; c < b; ++c) { - if(data->ff.angles->AngleEnergy(angleKinds[b][c]) <= 10E7) { - double cosTerm = cos(theta[b]) * cos(theta[c]); - double sinTerm = sin(theta[b]) * sin(theta[c]); - double bfcTheta = acos(sinTerm * cos(angles - phi[c]) - + cosTerm); - double distSq = oldMol.AngleDist(bondLengthOld[b], - bondLengthOld[c], bfcTheta); - nonbondedEng += data->calc.IntraEnergy_1_3(distSq, bonded[b], - bonded[c], molIndex); - if(isnan(nonbondedEng)) - nonbondedEng = num::BIGNUM; - - energies += data->ff.angles->Calc(angleKinds[b][c], bfcTheta); - } else { - double cosTerm = cos(theta[b]) * cos(theta[c]); - double sinTerm = sin(theta[b]) * sin(theta[c]); - double fixedbfc = data->ff.angles->Angle(angleKinds[b][c]); - angles = acos((cos(fixedbfc) - abs(cosTerm)) / sinTerm) + phi[c]; - double bfcTheta = acos(sinTerm * cos(angles - phi[c]) - + cosTerm); - double distSq = oldMol.AngleDist(bondLengthOld[b], - bondLengthOld[c], bfcTheta); - nonbondedEng += data->calc.IntraEnergy_1_3(distSq, bonded[b], - bonded[c], molIndex); - if(isnan(nonbondedEng)) - nonbondedEng = num::BIGNUM; - - energies += data->ff.angles->Calc(angleKinds[b][c], - bfcTheta); - } - } - - //calculate weights from combined energy - double weights = exp(-1 * data->ff.beta * (energies + nonbondedEng)); - stepWeight += weights; - } - phiWeight[b] += stepWeight; - } -} -} +/******************************************************************************* +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 +Copyright (C) 2018 GOMC Group +A copy of the GNU General Public License can be found in the COPYRIGHT.txt +along with this program, also can be found at . +********************************************************************************/ +#define _USE_MATH_DEFINES +#include +#include "DCHedron.h" +#include "TrialMol.h" +#include "DCData.h" +#include "MolSetup.h" +#include "Forcefield.h" +#include "PRNG.h" +#include "NumLib.h" +#include +#include + +namespace +{ +//Wish I could use lambdas.. +struct FindA1 { + FindA1(uint x) : x(x) {}; + bool operator()(const mol_setup::Bond& b) + { + return (b.a1 == x); + } + uint x; +}; + +struct FindAngle { + FindAngle(uint x, uint y) : x(x), y(y) {} + uint y, x; + bool operator()(const mol_setup::Angle& a) + { + return (a.a0 == x && a.a2 == y) || (a.a0 == y && a.a2 == x); + } +}; + +} + +namespace cbmc +{ + + +DCHedron::DCHedron(DCData* data, const mol_setup::MolKind& kind, + uint focus, uint prev) + : data(data), focus(focus), prev(prev) +{ + using namespace mol_setup; + using namespace std; + vector onFocus = AtomBonds(kind, focus); + onFocus.erase(remove_if(onFocus.begin(), onFocus.end(), FindA1(prev)), + onFocus.end()); + nBonds = onFocus.size(); + + for (uint i = 0; i < nBonds; ++i) { + bonded[i] = onFocus[i].a1; + } + + vector angles = AtomMidAngles(kind, focus); + for (uint i = 0; i < nBonds; ++i) { + typedef vector::const_iterator Aiter; + Aiter free = find_if(angles.begin(), angles.end(), + FindAngle(prev, bonded[i])); + assert(free != angles.end()); + angleKinds[i][i] = free->kind; + + for (uint j = i + 1; j < nBonds; ++j) { + Aiter pair = find_if(angles.begin(), angles.end(), + FindAngle(bonded[i], bonded[j])); + angleKinds[i][j] = pair->kind; + angleKinds[j][i] = pair->kind; + } + } + + phi[0] = 0.0; + phiWeight[0] = 1.0; + + if(data->nAngleTrials < 1) { + std::cout << "Error: CBMC angle trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } +} + +void DCHedron::SetBondNew(double const *bondLen, double const &anchBond) +{ + for(uint i = 0; i < nBonds; ++i) { + bondLength[i] = bondLen[i]; + } + anchorBond = anchBond; +} + +void DCHedron::SetBondOld(double const *bondLen, double const &anchBond) +{ + for(uint i = 0; i < nBonds; ++i) { + bondLengthOld[i] = bondLen[i]; + } + anchorBondOld = anchBond; +} + +double DCHedron::GetWeight() +{ + double result = 1; + for(uint i = 0; i < nBonds; ++i) { + result *= thetaWeight[i]; + result *= phiWeight[i]; + } + return result; +} + +//Randomly generate nTrials angles and save energy and weight +void DCHedron::GenerateAnglesNew(TrialMol& newMol, uint molIndex, + uint kind, uint nTrials, uint bType) +{ + double* nonbonded_1_3 = data->nonbonded_1_3; + int i; + double distSq, thetaFix; + bool angleFix = false; + std::fill_n(nonbonded_1_3, nTrials, 0.0); + + if(data->ff.angles->AngleFixed(kind)) { + angleFix = true; + thetaFix = data->ff.angles->Angle(kind); + } + + for (i = 0; i < nTrials; ++i) { + if(angleFix) + data->angles[i] = thetaFix; + else + data->angles[i] = data->prng.rand(M_PI); + } + +#ifdef _OPENMP + #pragma omp parallel for default(shared) private(i, distSq) +#endif + for (i = 0; i < nTrials; ++i) { + data->angleEnergy[i] = data->ff.angles->Calc(kind, data->angles[i]); + + distSq = newMol.AngleDist(anchorBond, bondLength[bType], + data->angles[i]); + nonbonded_1_3[i] = + data->calc.IntraEnergy_1_3(distSq, prev, bonded[bType], molIndex); + + data->angleWeights[i] = exp((data->angleEnergy[i] + nonbonded_1_3[i]) + * -data->ff.beta); + } +} + +void DCHedron::GenerateAnglesOld(TrialMol& oldMol, uint molIndex, + uint kind, uint nTrials, uint bType) +{ + double* nonbonded_1_3 = data->nonbonded_1_3; + int i; + double distSq, thetaFix; + bool angleFix = false; + std::fill_n(nonbonded_1_3, nTrials, 0.0); + + if(data->ff.angles->AngleFixed(kind)) { + angleFix = true; + thetaFix = data->ff.angles->Angle(kind); + } + + for (i = 0; i < nTrials; ++i) { + if(angleFix) + data->angles[i] = thetaFix; + else + data->angles[i] = data->prng.rand(M_PI); + } + +#ifdef _OPENMP + #pragma omp parallel for default(shared) private(i, distSq) +#endif + for (i = 0; i < nTrials; ++i) { + data->angleEnergy[i] = data->ff.angles->Calc(kind, data->angles[i]); + + distSq = oldMol.AngleDist(anchorBondOld, bondLengthOld[bType], + data->angles[i]); + nonbonded_1_3[i] = + data->calc.IntraEnergy_1_3(distSq, prev, bonded[bType], molIndex); + + data->angleWeights[i] = exp((data->angleEnergy[i] + nonbonded_1_3[i]) + * -data->ff.beta); + } +} + +void DCHedron::FreeAnglesNew(TrialMol& newMol, uint molIndex, uint nTrials) +{ + for (uint i = 0; i < nBonds; ++i) { + GenerateAnglesNew(newMol, molIndex, angleKinds[i][i], nTrials, i); + double stepWeight = std::accumulate(data->angleWeights, + data->angleWeights + nTrials, + 0.0); + uint winner = data->prng.PickWeighted(data->angleWeights, + nTrials, stepWeight); + theta[i] = data->angles[winner]; + bendEnergy += data->angleEnergy[winner]; + oneThree += data->nonbonded_1_3[winner]; + thetaWeight[i] = stepWeight; + } +} + +void DCHedron::FreeAnglesOld(TrialMol& oldMol, uint molIndex, uint nTrials) +{ + for (uint i = 0; i < nBonds; ++i) { + GenerateAnglesOld(oldMol, molIndex, angleKinds[i][i], nTrials, i); + double stepWeight = std::accumulate(data->angleWeights, + data->angleWeights + nTrials, + 0.0); + thetaWeight[i] = stepWeight; + } +} + +void DCHedron::PrepareNew(TrialMol& newMol, uint molIndex) +{ + bendEnergy = 0.0; + oneThree = 0.0; + FreeAnglesNew(newMol, molIndex, data->nAngleTrials); + ConstrainedAngles(newMol, molIndex, data->nAngleTrials); +} + +void DCHedron::PrepareOld(TrialMol& oldMol, uint molIndex) +{ + oneThree = 0.0; + bendEnergy = 0.0; + FreeAnglesOld(oldMol, molIndex, data->nAngleTrials - 1); +} + + +void DCHedron::IncorporateOld(TrialMol& oldMol, uint molIndex) +{ + bendEnergy = 0.0; + oneThree = 0.0; + const Forcefield& ff = data->ff; + for (uint b = 0; b < nBonds; ++b) { + + oldMol.OldThetaAndPhi(bonded[b], focus, theta[b], phi[b]); + double thetaEnergy = data->ff.angles->Calc(angleKinds[b][b], theta[b]); + double distSq = oldMol.OldDistSq(prev, bonded[b]); + double nonbondedEn = + data->calc.IntraEnergy_1_3(distSq, prev, bonded[b], molIndex); + + thetaWeight[b] += exp(-1 * data->ff.beta * (thetaEnergy + nonbondedEn)); + bendEnergy += thetaEnergy; + oneThree += nonbondedEn; + + if (b != 0) { + double phiEnergy = 0.0; + nonbondedEn = 0.0; + phiWeight[b] = 0.0; + for (uint c = 0; c < b; ++c) { + double cosTerm = cos(theta[b]) * cos(theta[c]); + double sinTerm = sin(theta[b]) * sin(theta[c]); + double bfcTheta = acos(sinTerm * cos(phi[b] - phi[c]) + + cosTerm); + + double distSq = oldMol.OldDistSq(bonded[c], bonded[b]); + nonbondedEn += data->calc.IntraEnergy_1_3(distSq, bonded[c], + bonded[b], molIndex); + + phiEnergy += ff.angles->Calc(angleKinds[b][c], bfcTheta); + + } + phiWeight[b] = exp(-ff.beta * (phiEnergy + nonbondedEn)); + bendEnergy += phiEnergy; + oneThree += nonbondedEn; + } + } +} + + +void DCHedron::ConstrainedAngles(TrialMol& newMol, uint molIndex, uint nTrials) +{ + double* angles = data->angles; + double* energies = data->angleEnergy; + double* weights = data->angleWeights; + double* nonbonded_1_3 = data->nonbonded_1_3; + std::fill_n(nonbonded_1_3, nTrials, 0.0); + phi[0] = 0.0; + + for (uint b = 1; b < nBonds; ++b) { + //pick "twist" angles + for (uint i = 0; i < nTrials; ++i) { + angles[i] = data->prng.rand(M_PI * 2); + energies[i] = 0.0; + nonbonded_1_3[i] = 0.0; + } + + //compare to angles determined in previous iterations + for (uint c = 0; c < b; ++c) { + double cosTerm = cos(theta[b]) * cos(theta[c]); + double sinTerm = sin(theta[b]) * sin(theta[c]); + + for (uint i = 0; i < nTrials; ++i) { + if(!data->ff.angles->AngleFixed(angleKinds[b][c])) { + double bfcTheta = acos(sinTerm * cos(angles[i] - phi[c]) + + cosTerm); + double distSq = newMol.AngleDist(bondLength[b], bondLength[c], + bfcTheta); + double tempEn = data->calc.IntraEnergy_1_3(distSq, bonded[b], + bonded[c], + molIndex); + + nonbonded_1_3[i] += tempEn; + energies[i] += data->ff.angles->Calc(angleKinds[b][c], + bfcTheta); + } else { + double bfcTheta = data->ff.angles->Angle(angleKinds[b][c]); + angles[i] = acos((cos(bfcTheta) - cosTerm) / sinTerm) + phi[c]; + double distSq = newMol.AngleDist(bondLength[b], bondLength[c], + bfcTheta); + double tempEn = data->calc.IntraEnergy_1_3(distSq, bonded[b], + bonded[c], + molIndex); + + nonbonded_1_3[i] += tempEn; + energies[i] += data->ff.angles->Calc(angleKinds[b][c], + bfcTheta); + + if(abs(angles[i]) > 2.0 * M_PI) { + std::cout << "Error: Cannot constrain fix angle for " << + newMol.GetKind().atomTypeNames[bonded[b]] << " " << + newMol.GetKind().atomTypeNames[focus] << " " << + newMol.GetKind().atomTypeNames[bonded[c]] << " !\n"; + exit(EXIT_FAILURE); + } + } + } + } + + //calculate weights from combined energy + double stepWeight = 0.0; + int i; +#ifdef _OPENMP + #pragma omp parallel for default(shared) private(i) reduction(+:stepWeight) +#endif + for (i = 0; i < nTrials; ++i) { + weights[i] = exp(-1 * data->ff.beta * (energies[i] + + nonbonded_1_3[i])); + stepWeight += weights[i]; + } + + uint winner = data->prng.PickWeighted(weights, nTrials, stepWeight); + phi[b] = angles[winner]; + bendEnergy += energies[winner]; + oneThree += nonbonded_1_3[winner]; + phiWeight[b] = stepWeight; + } +} + +//Calculate OldMol Bond Energy & +//Calculate phi weight for nTrials using actual theta of OldMol +void DCHedron::ConstrainedAnglesOld(uint nTrials, TrialMol& oldMol, + uint molIndex) +{ + IncorporateOld(oldMol, molIndex); + + for (uint b = 1; b < nBonds; ++b) { + double stepWeight = 0.0; + //pick "twist" angles + for (uint i = 0; i < nTrials; ++i) { + double angles = data->prng.rand(M_PI * 2); + double energies = 0.0; + double nonbondedEng = 0.0; + //compare to angles determined in previous iterations + for (uint c = 0; c < b; ++c) { + if(!data->ff.angles->AngleFixed(angleKinds[b][c])) { + double cosTerm = cos(theta[b]) * cos(theta[c]); + double sinTerm = sin(theta[b]) * sin(theta[c]); + double bfcTheta = acos(sinTerm * cos(angles - phi[c]) + + cosTerm); + double distSq = oldMol.AngleDist(bondLengthOld[b], + bondLengthOld[c], bfcTheta); + nonbondedEng += data->calc.IntraEnergy_1_3(distSq, bonded[b], + bonded[c], molIndex); + + energies += data->ff.angles->Calc(angleKinds[b][c], bfcTheta); + } else { + double cosTerm = cos(theta[b]) * cos(theta[c]); + double sinTerm = sin(theta[b]) * sin(theta[c]); + double bfcTheta = data->ff.angles->Angle(angleKinds[b][c]); + angles = acos((cos(bfcTheta) - cosTerm) / sinTerm) + phi[c]; + double distSq = oldMol.AngleDist(bondLengthOld[b], + bondLengthOld[c], bfcTheta); + nonbondedEng += data->calc.IntraEnergy_1_3(distSq, bonded[b], + bonded[c], molIndex); + + energies += data->ff.angles->Calc(angleKinds[b][c], + bfcTheta); + + if(abs(angles) > 2.0 * M_PI) { + std::cout << "Error: Cannot constrain fix angle for " << + oldMol.GetKind().atomTypeNames[bonded[b]] << " " << + oldMol.GetKind().atomTypeNames[focus] << " " << + oldMol.GetKind().atomTypeNames[bonded[c]] << " !\n"; + exit(EXIT_FAILURE); + } + } + } + + //calculate weights from combined energy + double weights = exp(-1 * data->ff.beta * (energies + nonbondedEng)); + stepWeight += weights; + } + phiWeight[b] += stepWeight; + } +} +} diff --git a/src/cbmc/DCHedron.h b/src/cbmc/DCHedron.h index 95f6fcbb0..ef13255c8 100644 --- a/src/cbmc/DCHedron.h +++ b/src/cbmc/DCHedron.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCLinear.cpp b/src/cbmc/DCLinear.cpp index e4f50ac5b..dd3182952 100644 --- a/src/cbmc/DCLinear.cpp +++ b/src/cbmc/DCLinear.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCLinear.h b/src/cbmc/DCLinear.h index c85d15964..68c4cc239 100644 --- a/src/cbmc/DCLinear.h +++ b/src/cbmc/DCLinear.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCLinkedHedron.cpp b/src/cbmc/DCLinkedHedron.cpp index 46de98023..8a21ddaa3 100644 --- a/src/cbmc/DCLinkedHedron.cpp +++ b/src/cbmc/DCLinkedHedron.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -73,6 +73,17 @@ DCLinkedHedron::DCLinkedHedron dihKinds[i][j] = match->kind; } } + + if(data->nLJTrialsNth < 1) { + std::cout << "Error: CBMC secondary atom trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } + + if(data->nDihTrials < 1) { + std::cout << "Error: CBMC dihedral trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } + } void DCLinkedHedron::PrepareNew(TrialMol& newMol, uint molIndex) diff --git a/src/cbmc/DCLinkedHedron.h b/src/cbmc/DCLinkedHedron.h index 9e545ca6e..323171dfd 100644 --- a/src/cbmc/DCLinkedHedron.h +++ b/src/cbmc/DCLinkedHedron.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCOnSphere.cpp b/src/cbmc/DCOnSphere.cpp index 1b85ff56b..7aa3c637a 100644 --- a/src/cbmc/DCOnSphere.cpp +++ b/src/cbmc/DCOnSphere.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -27,6 +27,11 @@ DCOnSphere::DCOnSphere(DCData* data, const mol_setup::MolKind kind, break; } } + + if(data->nLJTrialsNth < 1) { + std::cout << "Error: CBMC secondary atom trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } } void DCOnSphere::SetBondLengthNew(TrialMol& newMol) diff --git a/src/cbmc/DCOnSphere.h b/src/cbmc/DCOnSphere.h index 67d004757..a57e355b6 100644 --- a/src/cbmc/DCOnSphere.h +++ b/src/cbmc/DCOnSphere.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/DCSingle.cpp b/src/cbmc/DCSingle.cpp index c1436ee29..3e88027d1 100644 --- a/src/cbmc/DCSingle.cpp +++ b/src/cbmc/DCSingle.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -14,7 +14,14 @@ along with this program, also can be found at . namespace cbmc { - +DCSingle::DCSingle(DCData* data, uint atom) : data(data), atom(atom) +{ + if(data->nLJTrialsFirst < 1) { + std::cout << "Error: CBMC first atom trials must be greater than 0.\n"; + exit(EXIT_FAILURE); + } +} + void DCSingle::BuildOld(TrialMol& oldMol, uint molIndex) { PRNG& prng = data->prng; diff --git a/src/cbmc/DCSingle.h b/src/cbmc/DCSingle.h index a7bf15d65..984a355c9 100644 --- a/src/cbmc/DCSingle.h +++ b/src/cbmc/DCSingle.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . @@ -22,7 +22,7 @@ class DCData; class DCSingle : public DCComponent { public: - DCSingle(DCData* data, uint atom) : data(data), atom(atom) {} + DCSingle(DCData* data, uint atom); void PrepareNew(TrialMol& newMol, uint molIndex) {}; void PrepareOld(TrialMol& oldMol, uint molIndex) {}; void BuildOld(TrialMol& oldMol, uint molIndex); diff --git a/src/cbmc/TrialMol.cpp b/src/cbmc/TrialMol.cpp index 14bff1ece..12d3aa355 100644 --- a/src/cbmc/TrialMol.cpp +++ b/src/cbmc/TrialMol.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at . diff --git a/src/cbmc/TrialMol.h b/src/cbmc/TrialMol.h index 2957849ea..4c98f5738 100644 --- a/src/cbmc/TrialMol.h +++ b/src/cbmc/TrialMol.h @@ -1,5 +1,5 @@ /******************************************************************************* -GPU OPTIMIZED MONTE CARLO (GOMC) 2.30 +GPU OPTIMIZED MONTE CARLO (GOMC) 2.31 Copyright (C) 2018 GOMC Group A copy of the GNU General Public License can be found in the COPYRIGHT.txt along with this program, also can be found at .