Skip to content

Commit

Permalink
ioSaturn merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Younes Nejahi committed Mar 24, 2016
2 parents 0f5ee1a + baf41c5 commit 94ff1ac
Show file tree
Hide file tree
Showing 139 changed files with 6,676 additions and 4,679 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

#Versioning
set (GOMC_VERSION_MAJOR 1)
set (GOMC_VERSION_MINOR 00)
set (GOMC_VERSION_MINOR 17)

IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release CACHE STRING
Expand Down Expand Up @@ -38,6 +38,7 @@ elseif(MSVC)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT} /MT /Zi /O2 /Ob1 /D NDEBUG")
endif()


#EnsemblePreprocessor defines NVT = 1, GEMC = 2, GCMC = 3
#Grand Canonical Monte Carlo
set(GC_flags "-DENSEMBLE=3")
Expand Down
34 changes: 33 additions & 1 deletion Change log
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.6] - 03/24/2016
+ Code cleaning

## [1.5] - 03/24/2016
+ Support for Ewald Summation

## [1.1] - 01/20/2016
+ Supporting Martini forcefield

## [1.0] - 10/18/2015
+ Changes for input file system.
+ Added Cell list optimization to the GPU and the Serial code.

##[1.00] - 12/4/2015
+ Added Examples of water and DME for NVT and GCMC
+ Added bin/linux, which contains all executable files for linux

##[1.00] Ewald branch - 12/8/2015
+ Improve the initialization of Ewald's parameters, so that non-ewald simulation can also run on ewald code without crashing.
+ CMakeList.txt file is added.

##[1.00] - 12/22/2015
+ Update CPUSide.cpp, move hist into the ifdef of GCMC. Target at the floating operation issue returned by NVT and GEMC simulations.

##[1.00] - 01/25/2016
+ Fix the coherence issue on two boxes simulations, including NPT, GEMC, and two boxes GCMC simulations.

+ To fix the issue, Calp() and SetupRecip() have to be recalculated everytime before and after the volume transfer; RecipSinSum and RecipCosSum arrays have to be synchronized in two boxes simulations; GEMC_NVT is different from GEMC_NPT, the difference between GEMC_NVT and GEMC_NPT requires "if" statement.

? GEMC is returning good result from computation; however, it does not return correct results. A potential bug inside of the computation logic.

##[1.00] - -3/15/2016
+ Fix the bug of GEMC simulation. Now all NVT, GCMC, and GEMC are working.
+ Enable the Cache version of GEMC to save time; however, the scalability is limited.

## [0.972] - 5/11/2015
+ Fixes for PDB output for NVT in the GPU code.

Expand All @@ -18,4 +49,5 @@ All notable changes to this project will be documented in this file.
+ Fixed calculation of angular weights for branched molecules coupled-decoupled configuration bias algorithm.
+ Improved move adjustments for better targeting of desired acceptance rate.
+ Various minor bug fixes for fringe conditions.
+ Improvements to I/O handling, inclusion of new output types relating to grand canonical ensemble (fluctuations, energy/particle samples, and distribution of molecule counts).
+ Improvements to I/O handling, inclusion of new output types relating to grand canonical ensemble (fluctuations, energy/particle samples, and distribution of molecule counts).

Binary file modified GOMC Manual.pdf
Binary file not shown.
8 changes: 0 additions & 8 deletions lib/BasicTypes.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef BASIC_TYPES_H
#define BASIC_TYPES_H

Expand Down Expand Up @@ -58,4 +51,3 @@ struct XYZ
};

#endif /*BASIC_TYPES_H*/

8 changes: 0 additions & 8 deletions lib/BitLib.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef BIT_LIB_H
#define BIT_LIB_H

Expand Down Expand Up @@ -35,4 +28,3 @@ namespace bits
}

#endif /*BIT_LIB_H*/

18 changes: 6 additions & 12 deletions lib/GeomLib.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef GEOM_LIB_H
#define GEOM_LIB_H

//Standard way to get pi constant on most platforms
//Needs to be defined _before_ including math.h
//so that the PI constants come from math.h
#define _USE_MATH_DEFINES

#include <math.h> //For sqrt, fabs, M_PI
#include <limits> //for double limits

Expand All @@ -17,10 +15,7 @@ along with this program, also can be found at <http://www.gnu.org/licenses/>.
// DEFINES //
///////////////

//Standard way to get pi constant on most platforms
#define _USE_MATH_DEFINES

//In case that didn't work
//Just in case any of these weren't included from math.h
#ifndef M_PI
//From Mathematica:
//N[Pi, 75]
Expand Down Expand Up @@ -104,4 +99,3 @@ namespace geom
}

#endif /*GEOM_LIB_H*/

25 changes: 11 additions & 14 deletions lib/NumLib.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef NUMERIC_LIB_H
#define NUMERIC_LIB_H

Expand All @@ -15,6 +8,8 @@ along with this program, also can be found at <http://www.gnu.org/licenses/>.
namespace num
{
static const double dbl_margin = 0.00001;
static const double qqFact = 167000.00;
static const double BIGNUM = 10E40;
static const uint VDW_STD_KIND = 0, VDW_SHIFT_KIND = 1, VDW_SWITCH_KIND = 2;

template <typename T>
Expand All @@ -36,16 +31,16 @@ namespace num
BoundGt<T>(val, upper);
}

//Arithmatic mean
//Arithmetic mean.
inline double MeanA(const uint v1, const uint v2) { return (v1+v2)/2.0; }
//Geometric mean.
inline double MeanG(const double v1, const double v2) { return sqrt(v1*v2); }
//Arithmatic mean
//Arithmetic mean.
inline double MeanA(std::vector<double> const& v1,
std::vector<double> const& v2,
const uint ix1, const uint ix2)
{ return (v1[ix1]+v2[ix2])*0.5; }
//Arithmatic mean
//Arithmetic mean.
inline double MeanA(std::vector<uint> const& v1,
std::vector<uint> const& v2,
const uint ix1, const uint ix2)
Expand All @@ -62,9 +57,12 @@ namespace num
const uint ix1, const uint ix2)
{ return sqrt(v1[ix1]*v2[ix2]); }

inline double Sq(const double v) { return v * v; }
inline double Cb(const double v) { return v * v * v; }
inline void Cb(double & s, double & c, const double v)
template <class Type>
inline Type Sq(const Type v) { return v * v; }
template <class Type>
inline Type Cb(const Type v) { return v * v * v; }
template <class Type>
inline void Cb(Type & s, Type & c, const Type v)
{ s = v * v; c = s * v; }

inline double POW(const double d2, const double d4, const double d6,
Expand Down Expand Up @@ -106,4 +104,3 @@ namespace num
}

#endif /*NUMERIC_LIB_H*/

8 changes: 0 additions & 8 deletions lib/StrLib.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef STR_LIB_H
#define STR_LIB_H

Expand Down Expand Up @@ -73,4 +66,3 @@ namespace str
}

#endif /*STR_LIB_H*/

8 changes: 0 additions & 8 deletions lib/StrStrmLib.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef STR_STRM_LIB_H
#define STR_STRM_LIB_H

Expand Down Expand Up @@ -197,4 +190,3 @@ namespace sstrm
}

#endif /*STR_STRM_LIB_H*/

8 changes: 0 additions & 8 deletions lib/VectorLib.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef VECTOR_LIB_H
#define VECTOR_LIB_H

Expand Down Expand Up @@ -75,4 +68,3 @@ namespace vect
}

#endif /*VECTOR_LIB_H*/

Empty file modified metamake.sh
100644 → 100755
Empty file.
8 changes: 0 additions & 8 deletions src/BlockOutput.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#include "BlockOutput.h"
#include "PDBConst.h"
#include "OutConst.h"
Expand Down Expand Up @@ -222,4 +215,3 @@ void BlockAverages::InitWatchMulti(config_setup::TrackedVars const& tracked)
}
#endif
}

8 changes: 0 additions & 8 deletions src/BlockOutput.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef BLOCK_OUTPUT_H
#define BLOCK_OUTPUT_H

Expand Down Expand Up @@ -124,4 +117,3 @@ struct BlockAverages : OutputableBase
};

#endif /*BLOCK_OUTPUT_H*/

8 changes: 0 additions & 8 deletions src/BoxDimensions.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#include "BoxDimensions.h"
#include "MoveConst.h" //For cutoff-related fail condition

Expand Down Expand Up @@ -85,4 +78,3 @@ uint BoxDimensions::ExchangeVolume
}
return state;
}

24 changes: 14 additions & 10 deletions src/BoxDimensions.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 1.0 (Serial version)
Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef BOX_DIMENSIONS_H
#define BOX_DIMENSIONS_H

Expand All @@ -24,7 +17,7 @@ along with this program, also can be found at <http://www.gnu.org/licenses/>.

//TODO:
//Rename to PeriodicBoxes at some point.
struct BoxDimensions
class BoxDimensions
{
public:
BoxDimensions() {}
Expand Down Expand Up @@ -125,7 +118,7 @@ struct BoxDimensions
void GetDistSq(double & distSq, XYZArray const& arr, const uint i,
const uint j, const uint b) const;

//private:
XYZArray axis; //x, y, z dimensions of each box (a)
XYZArray halfAx; //x, y, z dimensions / 2 of each box (a)
double volume[BOX_TOTAL]; //volume of each box in (a^3)
Expand All @@ -143,6 +136,9 @@ struct BoxDimensions

double UnwrapPBC(double& v, const double ref,
const double ax, const double halfAx) const;

double DotProduct(const uint atom, double kx, double ky,
double kz, const XYZArray & Coords, uint box) const;
};

inline BoxDimensions::BoxDimensions(BoxDimensions const& other) :
Expand Down Expand Up @@ -494,5 +490,13 @@ inline double BoxDimensions::UnwrapPBC
#endif
}

#endif /*BOX_DIMENSIONS_H*/
//Calculate dot product
inline double BoxDimensions::DotProduct(const uint atom, double kx,
double ky, double kz,
const XYZArray &Coords, uint box) const
{
double x = Coords.x[atom], y = Coords.y[atom], z = Coords.z[atom];
return(x * kx + y * ky + z * kz);
}

#endif /*BOX_DIMENSIONS_H*/
Loading

0 comments on commit 94ff1ac

Please sign in to comment.