"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "8148f51d4e83c7b61b68d99ab055343e50f3e805"
Commit b723e4af authored by Peter Eastman's avatar Peter Eastman
Browse files

Replaced lots of tabs with spaces

parent 93c467b2
...@@ -167,7 +167,7 @@ SET(OPENMM_SVN_REVISION "${OPENMM_SVN_REVISION}" CACHE STRING "subversion reposi ...@@ -167,7 +167,7 @@ SET(OPENMM_SVN_REVISION "${OPENMM_SVN_REVISION}" CACHE STRING "subversion reposi
ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME} ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME}
-DOPENMM_MAJOR_VERSION=${OPENMM_MAJOR_VERSION} -DOPENMM_MAJOR_VERSION=${OPENMM_MAJOR_VERSION}
-DOPENMM_MINOR_VERSION=${OPENMM_MINOR_VERSION} -DOPENMM_MINOR_VERSION=${OPENMM_MINOR_VERSION}
-DOPENMM_BUILD_VERSION=${OPENMM_BUILD_VERSION}) -DOPENMM_BUILD_VERSION=${OPENMM_BUILD_VERSION})
# CMake quotes automatically when building Visual Studio projects but we need # CMake quotes automatically when building Visual Studio projects but we need
# to add them ourselves for Linux or Cygwin. Two cases to avoid duplicate quotes # to add them ourselves for Linux or Cygwin. Two cases to avoid duplicate quotes
...@@ -251,7 +251,7 @@ SET(API_REL_INCLUDE_FILES) # start these out empty ...@@ -251,7 +251,7 @@ SET(API_REL_INCLUDE_FILES) # start these out empty
SET(API_ABS_INCLUDE_FILES) SET(API_ABS_INCLUDE_FILES)
FOREACH(dir ${API_INCLUDE_DIRS}) FOREACH(dir ${API_INCLUDE_DIRS})
FILE(GLOB fullpaths ${dir}/*.h) # returns full pathnames FILE(GLOB fullpaths ${dir}/*.h) # returns full pathnames
SET(API_ABS_INCLUDE_FILES ${API_ABS_INCLUDE_FILES} ${fullpaths}) SET(API_ABS_INCLUDE_FILES ${API_ABS_INCLUDE_FILES} ${fullpaths})
FOREACH(pathname ${fullpaths}) FOREACH(pathname ${fullpaths})
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#if defined(OPENMM_CUDA_BUILDING_SHARED_LIBRARY) #if defined(OPENMM_CUDA_BUILDING_SHARED_LIBRARY)
#define OPENMM_EXPORT_CUDA __declspec(dllexport) #define OPENMM_EXPORT_CUDA __declspec(dllexport)
#elif defined(OPENMM_CUDA_BUILDING_STATIC_LIBRARY) || defined(OPENMM_CUDA_USE_STATIC_LIBRARIES) #elif defined(OPENMM_CUDA_BUILDING_STATIC_LIBRARY) || defined(OPENMM_CUDA_USE_STATIC_LIBRARIES)
#define OPENMM_EXPORT_CUDA #define OPENMM_EXPORT_CUDA
#else #else
#define OPENMM_EXPORT_CUDA __declspec(dllimport) // i.e., a client of a shared library #define OPENMM_EXPORT_CUDA __declspec(dllimport) // i.e., a client of a shared library
#endif #endif
#else #else
#define OPENMM_EXPORT_CUDA // Linux, Mac #define OPENMM_EXPORT_CUDA // Linux, Mac
......
...@@ -79,7 +79,7 @@ void CudaBondedUtilities::initialize(const System& system) { ...@@ -79,7 +79,7 @@ void CudaBondedUtilities::initialize(const System& system) {
int startAtom = 0; int startAtom = 0;
while (startAtom < numAtoms) { while (startAtom < numAtoms) {
int width = min(numAtoms-startAtom, 4); int width = min(numAtoms-startAtom, 4);
int paddedWidth = (width == 3 ? 4 : width); int paddedWidth = (width == 3 ? 4 : width);
vector<unsigned int> indexVec(paddedWidth*numBonds); vector<unsigned int> indexVec(paddedWidth*numBonds);
for (int bond = 0; bond < numBonds; bond++) { for (int bond = 0; bond < numBonds; bond++) {
for (int atom = 0; atom < width; atom++) for (int atom = 0; atom < width; atom++)
......
...@@ -322,11 +322,11 @@ static bool compileInWindows(const string &command) { ...@@ -322,11 +322,11 @@ static bool compileInWindows(const string &command) {
ZeroMemory( &pi, sizeof(pi) ); ZeroMemory( &pi, sizeof(pi) );
vector<char> args(std::max(1000, (int) fullcommand.size()+1)); vector<char> args(std::max(1000, (int) fullcommand.size()+1));
strcpy(&args[0], fullcommand.c_str()); strcpy(&args[0], fullcommand.c_str());
si.dwFlags = STARTF_USESHOWWINDOW; si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE; si.wShowWindow = SW_HIDE;
if (!CreateProcess(NULL, &args[0], NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { if (!CreateProcess(NULL, &args[0], NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
return -1; return -1;
} }
WaitForSingleObject(pi.hProcess, INFINITE); WaitForSingleObject(pi.hProcess, INFINITE);
return 0; return 0;
} }
...@@ -933,7 +933,7 @@ void CudaContext::reorderAtomsImpl(bool enforcePeriodic) { ...@@ -933,7 +933,7 @@ void CudaContext::reorderAtomsImpl(bool enforcePeriodic) {
Real4 padding = {0, 0, 0, 0}; Real4 padding = {0, 0, 0, 0};
vector<Real4> oldPosq(paddedNumAtoms, padding); vector<Real4> oldPosq(paddedNumAtoms, padding);
vector<Real4> oldPosqCorrection(paddedNumAtoms, padding); vector<Real4> oldPosqCorrection(paddedNumAtoms, padding);
Mixed4 paddingMixed = {0, 0, 0, 0}; Mixed4 paddingMixed = {0, 0, 0, 0};
vector<Mixed4> oldVelm(paddedNumAtoms, paddingMixed); vector<Mixed4> oldVelm(paddedNumAtoms, paddingMixed);
posq->download(oldPosq); posq->download(oldPosq);
velm->download(oldVelm); velm->download(oldVelm);
......
...@@ -45,7 +45,7 @@ if (result != CUDA_SUCCESS) { \ ...@@ -45,7 +45,7 @@ if (result != CUDA_SUCCESS) { \
#include <Windows.h> #include <Windows.h>
static long long getTime() { static long long getTime() {
FILETIME ft; FILETIME ft;
GetSystemTimeAsFileTime(&ft); // 100-nanoseconds since 1-1-1601 GetSystemTimeAsFileTime(&ft); // 100-nanoseconds since 1-1-1601
ULARGE_INTEGER result; ULARGE_INTEGER result;
result.LowPart = ft.dwLowDateTime; result.LowPart = ft.dwLowDateTime;
result.HighPart = ft.dwHighDateTime; result.HighPart = ft.dwHighDateTime;
......
...@@ -86,18 +86,18 @@ CudaPlatform::CudaPlatform() { ...@@ -86,18 +86,18 @@ CudaPlatform::CudaPlatform() {
setPropertyDefaultValue(CudaPrecision(), "single"); setPropertyDefaultValue(CudaPrecision(), "single");
#ifdef _MSC_VER #ifdef _MSC_VER
char* bindir = getenv("CUDA_BIN_PATH"); char* bindir = getenv("CUDA_BIN_PATH");
string nvcc = (bindir == NULL ? "nvcc.exe" : string(bindir)+"\\nvcc.exe"); string nvcc = (bindir == NULL ? "nvcc.exe" : string(bindir)+"\\nvcc.exe");
int length = GetShortPathName(nvcc.c_str(), NULL, 0); int length = GetShortPathName(nvcc.c_str(), NULL, 0);
if (length > 0) { if (length > 0) {
vector<char> shortName(length); vector<char> shortName(length);
GetShortPathName(nvcc.c_str(), &shortName[0], length); GetShortPathName(nvcc.c_str(), &shortName[0], length);
nvcc = string(&shortName[0]); nvcc = string(&shortName[0]);
} }
setPropertyDefaultValue(CudaCompiler(), nvcc); setPropertyDefaultValue(CudaCompiler(), nvcc);
setPropertyDefaultValue(CudaTempDirectory(), string(getenv("TEMP"))); setPropertyDefaultValue(CudaTempDirectory(), string(getenv("TEMP")));
#else #else
char* compiler = getenv("OPENMM_CUDA_COMPILER"); char* compiler = getenv("OPENMM_CUDA_COMPILER");
string nvcc = (compiler == NULL ? "/usr/local/cuda/bin/nvcc" : string(compiler)); string nvcc = (compiler == NULL ? "/usr/local/cuda/bin/nvcc" : string(compiler));
setPropertyDefaultValue(CudaCompiler(), nvcc); setPropertyDefaultValue(CudaCompiler(), nvcc);
char* tmpdir = getenv("TMPDIR"); char* tmpdir = getenv("TMPDIR");
string tmp = (tmpdir == NULL ? string(P_tmpdir) : string(tmpdir)); string tmp = (tmpdir == NULL ? string(P_tmpdir) : string(tmpdir));
......
...@@ -165,31 +165,31 @@ gridEvaluateEnergy(real2* __restrict__ halfcomplex_pmeGrid, real* __restrict__ e ...@@ -165,31 +165,31 @@ gridEvaluateEnergy(real2* __restrict__ halfcomplex_pmeGrid, real* __restrict__ e
int remainder = index-kx*GRID_SIZE_Y*(GRID_SIZE_Z); int remainder = index-kx*GRID_SIZE_Y*(GRID_SIZE_Z);
int ky = remainder/(GRID_SIZE_Z); int ky = remainder/(GRID_SIZE_Z);
int kz = remainder-ky*(GRID_SIZE_Z); int kz = remainder-ky*(GRID_SIZE_Z);
int mx = (kx < (GRID_SIZE_X+1)/2) ? kx : (kx-GRID_SIZE_X); int mx = (kx < (GRID_SIZE_X+1)/2) ? kx : (kx-GRID_SIZE_X);
int my = (ky < (GRID_SIZE_Y+1)/2) ? ky : (ky-GRID_SIZE_Y); int my = (ky < (GRID_SIZE_Y+1)/2) ? ky : (ky-GRID_SIZE_Y);
int mz = (kz < (GRID_SIZE_Z+1)/2) ? kz : (kz-GRID_SIZE_Z); int mz = (kz < (GRID_SIZE_Z+1)/2) ? kz : (kz-GRID_SIZE_Z);
real mhx = mx*invPeriodicBoxSize.x; real mhx = mx*invPeriodicBoxSize.x;
real mhy = my*invPeriodicBoxSize.y; real mhy = my*invPeriodicBoxSize.y;
real mhz = mz*invPeriodicBoxSize.z; real mhz = mz*invPeriodicBoxSize.z;
real m2 = mhx*mhx+mhy*mhy+mhz*mhz; real m2 = mhx*mhx+mhy*mhy+mhz*mhz;
real bx = pmeBsplineModuliX[kx]; real bx = pmeBsplineModuliX[kx];
real by = pmeBsplineModuliY[ky]; real by = pmeBsplineModuliY[ky];
real bz = pmeBsplineModuliZ[kz]; real bz = pmeBsplineModuliZ[kz];
real denom = m2*bx*by*bz; real denom = m2*bx*by*bz;
real eterm = recipScaleFactor*EXP(-RECIP_EXP_FACTOR*m2)/denom; real eterm = recipScaleFactor*EXP(-RECIP_EXP_FACTOR*m2)/denom;
if(kz >= (GRID_SIZE_Z/2+1)) { if (kz >= (GRID_SIZE_Z/2+1)) {
kx = ((kx == 0) ? kx : GRID_SIZE_X-kx); kx = ((kx == 0) ? kx : GRID_SIZE_X-kx);
ky = ((ky == 0) ? ky : GRID_SIZE_Y-ky); ky = ((ky == 0) ? ky : GRID_SIZE_Y-ky);
kz = GRID_SIZE_Z-kz; kz = GRID_SIZE_Z-kz;
} }
int indexInHalfComplexGrid = kz + ky*(GRID_SIZE_Z/2+1)+kx*(GRID_SIZE_Y*(GRID_SIZE_Z/2+1)); int indexInHalfComplexGrid = kz + ky*(GRID_SIZE_Z/2+1)+kx*(GRID_SIZE_Y*(GRID_SIZE_Z/2+1));
real2 grid = halfcomplex_pmeGrid[indexInHalfComplexGrid]; real2 grid = halfcomplex_pmeGrid[indexInHalfComplexGrid];
if (kx != 0 || ky != 0 || kz != 0) { if (kx != 0 || ky != 0 || kz != 0) {
energy += eterm*(grid.x*grid.x + grid.y*grid.y); energy += eterm*(grid.x*grid.x + grid.y*grid.y);
} }
} }
energyBuffer[blockIdx.x*blockDim.x+threadIdx.x] += 0.5f*energy; energyBuffer[blockIdx.x*blockDim.x+threadIdx.x] += 0.5f*energy;
} }
extern "C" __global__ extern "C" __global__
......
...@@ -58,10 +58,10 @@ void testEwaldPME(bool includeExceptions) { ...@@ -58,10 +58,10 @@ void testEwaldPME(bool includeExceptions) {
// Use amorphous NaCl system for the tests // Use amorphous NaCl system for the tests
const int numParticles = 894; const int numParticles = 894;
const double cutoff = 1.2; const double cutoff = 1.2;
const double boxSize = 3.00646; const double boxSize = 3.00646;
double tol = 1e-5; double tol = 1e-5;
ReferencePlatform reference; ReferencePlatform reference;
System system; System system;
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#if defined(OPENMM_OPENCL_BUILDING_SHARED_LIBRARY) #if defined(OPENMM_OPENCL_BUILDING_SHARED_LIBRARY)
#define OPENMM_EXPORT_OPENCL __declspec(dllexport) #define OPENMM_EXPORT_OPENCL __declspec(dllexport)
#elif defined(OPENMM_OPENCL_BUILDING_STATIC_LIBRARY) || defined(OPENMM_OPENCL_USE_STATIC_LIBRARIES) #elif defined(OPENMM_OPENCL_BUILDING_STATIC_LIBRARY) || defined(OPENMM_OPENCL_USE_STATIC_LIBRARIES)
#define OPENMM_EXPORT_OPENCL #define OPENMM_EXPORT_OPENCL
#else #else
#define OPENMM_EXPORT_OPENCL __declspec(dllimport) // i.e., a client of a shared library #define OPENMM_EXPORT_OPENCL __declspec(dllimport) // i.e., a client of a shared library
#endif #endif
#else #else
#define OPENMM_EXPORT_OPENCL // Linux, Mac #define OPENMM_EXPORT_OPENCL // Linux, Mac
......
...@@ -36,7 +36,7 @@ using namespace std; ...@@ -36,7 +36,7 @@ using namespace std;
#include <Windows.h> #include <Windows.h>
static long long getTime() { static long long getTime() {
FILETIME ft; FILETIME ft;
GetSystemTimeAsFileTime(&ft); // 100-nanoseconds since 1-1-1601 GetSystemTimeAsFileTime(&ft); // 100-nanoseconds since 1-1-1601
ULARGE_INTEGER result; ULARGE_INTEGER result;
result.LowPart = ft.dwLowDateTime; result.LowPart = ft.dwLowDateTime;
result.HighPart = ft.dwHighDateTime; result.HighPart = ft.dwHighDateTime;
......
...@@ -17,7 +17,7 @@ __kernel void computeN2Energy( ...@@ -17,7 +17,7 @@ __kernel void computeN2Energy(
__global real4* restrict forceBuffers, __global real4* restrict forceBuffers,
#endif #endif
__global real* restrict energyBuffer, __local real4* restrict local_force, __global real* restrict energyBuffer, __local real4* restrict local_force,
__global const real4* restrict posq, __local real4* restrict local_posq, __global const unsigned int* restrict exclusions, __global const real4* restrict posq, __local real4* restrict local_posq, __global const unsigned int* restrict exclusions,
__global const ushort2* exclusionTiles, __global const ushort2* exclusionTiles,
#ifdef USE_CUTOFF #ifdef USE_CUTOFF
__global const ushort2* restrict tiles, __global const unsigned int* restrict interactionCount, real4 periodicBoxSize, real4 invPeriodicBoxSize, unsigned int maxTiles, __global const real4* restrict blockCenter, __global const int* restrict interactingAtoms __global const ushort2* restrict tiles, __global const unsigned int* restrict interactionCount, real4 periodicBoxSize, real4 invPeriodicBoxSize, unsigned int maxTiles, __global const real4* restrict blockCenter, __global const int* restrict interactingAtoms
......
...@@ -17,7 +17,7 @@ __kernel void computeN2Energy( ...@@ -17,7 +17,7 @@ __kernel void computeN2Energy(
__global real4* restrict forceBuffers, __global real4* restrict forceBuffers,
#endif #endif
__global real* restrict energyBuffer, __local real4* restrict local_force, __global real* restrict energyBuffer, __local real4* restrict local_force,
__global const real4* restrict posq, __local real4* restrict local_posq, __global const unsigned int* restrict exclusions, __global const real4* restrict posq, __local real4* restrict local_posq, __global const unsigned int* restrict exclusions,
__global const ushort2* exclusionTiles, __global const ushort2* exclusionTiles,
#ifdef USE_CUTOFF #ifdef USE_CUTOFF
__global const ushort2* restrict tiles, __global const unsigned int* restrict interactionCount, real4 periodicBoxSize, real4 invPeriodicBoxSize, unsigned int maxTiles, __global const real4* restrict blockCenter, __global const int* restrict interactingAtoms __global const ushort2* restrict tiles, __global const unsigned int* restrict interactionCount, real4 periodicBoxSize, real4 invPeriodicBoxSize, unsigned int maxTiles, __global const real4* restrict blockCenter, __global const int* restrict interactingAtoms
......
...@@ -1756,10 +1756,10 @@ void ReferenceIntegrateLangevinStepKernel::execute(ContextImpl& context, const L ...@@ -1756,10 +1756,10 @@ void ReferenceIntegrateLangevinStepKernel::execute(ContextImpl& context, const L
} }
RealOpenMM tau = static_cast<RealOpenMM>( friction == 0.0 ? 0.0 : 1.0/friction ); RealOpenMM tau = static_cast<RealOpenMM>( friction == 0.0 ? 0.0 : 1.0/friction );
dynamics = new ReferenceStochasticDynamics( dynamics = new ReferenceStochasticDynamics(
context.getSystem().getNumParticles(), context.getSystem().getNumParticles(),
static_cast<RealOpenMM>(stepSize), static_cast<RealOpenMM>(stepSize),
static_cast<RealOpenMM>(tau), static_cast<RealOpenMM>(tau),
static_cast<RealOpenMM>(temperature) ); static_cast<RealOpenMM>(temperature) );
vector<ReferenceCCMAAlgorithm::AngleInfo> angles; vector<ReferenceCCMAAlgorithm::AngleInfo> angles;
findAnglesForCCMA(context.getSystem(), angles); findAnglesForCCMA(context.getSystem(), angles);
constraints = new ReferenceCCMAAlgorithm(context.getSystem().getNumParticles(), numConstraints, constraintIndices, constraintDistances, masses, angles, (RealOpenMM)integrator.getConstraintTolerance()); constraints = new ReferenceCCMAAlgorithm(context.getSystem().getNumParticles(), numConstraints, constraintIndices, constraintDistances, masses, angles, (RealOpenMM)integrator.getConstraintTolerance());
...@@ -1823,10 +1823,10 @@ void ReferenceIntegrateBrownianStepKernel::execute(ContextImpl& context, const B ...@@ -1823,10 +1823,10 @@ void ReferenceIntegrateBrownianStepKernel::execute(ContextImpl& context, const B
delete constraints; delete constraints;
} }
dynamics = new ReferenceBrownianDynamics( dynamics = new ReferenceBrownianDynamics(
context.getSystem().getNumParticles(), context.getSystem().getNumParticles(),
static_cast<RealOpenMM>(stepSize), static_cast<RealOpenMM>(stepSize),
static_cast<RealOpenMM>(friction), static_cast<RealOpenMM>(friction),
static_cast<RealOpenMM>(temperature) ); static_cast<RealOpenMM>(temperature) );
vector<ReferenceCCMAAlgorithm::AngleInfo> angles; vector<ReferenceCCMAAlgorithm::AngleInfo> angles;
findAnglesForCCMA(context.getSystem(), angles); findAnglesForCCMA(context.getSystem(), angles);
constraints = new ReferenceCCMAAlgorithm(context.getSystem().getNumParticles(), numConstraints, constraintIndices, constraintDistances, masses, angles, (RealOpenMM)integrator.getConstraintTolerance()); constraints = new ReferenceCCMAAlgorithm(context.getSystem().getNumParticles(), numConstraints, constraintIndices, constraintDistances, masses, angles, (RealOpenMM)integrator.getConstraintTolerance());
......
...@@ -54,11 +54,11 @@ pme_t; ...@@ -54,11 +54,11 @@ pme_t;
*/ */
int int
pme_init(pme_t * ppme, pme_init(pme_t * ppme,
RealOpenMM ewaldcoeff, RealOpenMM ewaldcoeff,
int natoms, int natoms,
const int ngrid[3], const int ngrid[3],
int pme_order, int pme_order,
RealOpenMM epsilon_r); RealOpenMM epsilon_r);
/* /*
* Evaluate reciprocal space PME energy and forces. * Evaluate reciprocal space PME energy and forces.
...@@ -75,12 +75,12 @@ pme_init(pme_t * ppme, ...@@ -75,12 +75,12 @@ pme_init(pme_t * ppme,
*/ */
int int
pme_exec(pme_t pme, pme_exec(pme_t pme,
std::vector<OpenMM::RealVec>& atomCoordinates, std::vector<OpenMM::RealVec>& atomCoordinates,
std::vector<OpenMM::RealVec>& forces, std::vector<OpenMM::RealVec>& forces,
RealOpenMM ** atomParameters, RealOpenMM ** atomParameters,
const RealOpenMM periodicBoxSize[3], const RealOpenMM periodicBoxSize[3],
RealOpenMM * energy, RealOpenMM * energy,
RealOpenMM pme_virial[3][3]); RealOpenMM pme_virial[3][3]);
......
...@@ -95,8 +95,8 @@ ReferenceBondIxn::~ReferenceBondIxn( ){ ...@@ -95,8 +95,8 @@ ReferenceBondIxn::~ReferenceBondIxn( ){
Do computation in double? Do computation in double?
@param vector1 first vector @param vector1 first vector
@param vector2 second vector @param vector2 second vector
@param hasREntry if set, then vector1[ReferenceForce::RIndex] = norm of vector @param hasREntry if set, then vector1[ReferenceForce::RIndex] = norm of vector
defaults to 0 (i.e., R unavailable) defaults to 0 (i.e., R unavailable)
...@@ -175,8 +175,8 @@ RealOpenMM ReferenceBondIxn::getNormedDotProduct( RealOpenMM* vector1, RealOpenM ...@@ -175,8 +175,8 @@ RealOpenMM ReferenceBondIxn::getNormedDotProduct( RealOpenMM* vector1, RealOpenM
Get angle between two vectors Get angle between two vectors
@param vector1 first vector @param vector1 first vector
@param vector2 second vector @param vector2 second vector
@param outputDotProduct output cosine of angle between two vectors (optional) @param outputDotProduct output cosine of angle between two vectors (optional)
@param hasREntry if set, then vector1[ReferenceForce::RIndex] = norm of vector @param hasREntry if set, then vector1[ReferenceForce::RIndex] = norm of vector
defaults to 0 -> R unavailable defaults to 0 -> R unavailable
...@@ -228,9 +228,9 @@ RealOpenMM ReferenceBondIxn::getAngleBetweenTwoVectors( RealOpenMM* vector1, Rea ...@@ -228,9 +228,9 @@ RealOpenMM ReferenceBondIxn::getAngleBetweenTwoVectors( RealOpenMM* vector1, Rea
Get dihedral angle between three vectors Get dihedral angle between three vectors
@param vector1 first vector @param vector1 first vector
@param vector2 second vector @param vector2 second vector
@param vector3 third vector @param vector3 third vector
@param outputCrossProduct output cross product vectors @param outputCrossProduct output cross product vectors
@param cosineOfAngle cosine of angle (output) @param cosineOfAngle cosine of angle (output)
@param signVector vector to test sign (optional) @param signVector vector to test sign (optional)
......
...@@ -74,8 +74,8 @@ ReferenceLJCoulomb14::~ReferenceLJCoulomb14( ){ ...@@ -74,8 +74,8 @@ ReferenceLJCoulomb14::~ReferenceLJCoulomb14( ){
@param atomCoordinates atom coordinates @param atomCoordinates atom coordinates
@param parameters three parameters: @param parameters three parameters:
parameters[0]= (c12/c6)**1/6 (sigma) parameters[0]= (c12/c6)**1/6 (sigma)
parameters[1]= c6*c6/c12 (4*epsilon) parameters[1]= c6*c6/c12 (4*epsilon)
parameters[2]= epsfac*q1*q2 parameters[2]= epsfac*q1*q2
@param forces force array (forces added to current values) @param forces force array (forces added to current values)
@param totalEnergy if not null, the energy will be added to this @param totalEnergy if not null, the energy will be added to this
......
...@@ -216,14 +216,14 @@ void ReferenceLJCoulombIxn::calculateEwaldIxn(int numberOfAtoms, vector<RealVec> ...@@ -216,14 +216,14 @@ void ReferenceLJCoulombIxn::calculateEwaldIxn(int numberOfAtoms, vector<RealVec>
// PME // PME
if (pme && includeReciprocal) { if (pme && includeReciprocal) {
pme_t pmedata; /* abstract handle for PME data */ pme_t pmedata; /* abstract handle for PME data */
RealOpenMM virial[3][3]; RealOpenMM virial[3][3];
pme_init(&pmedata,alphaEwald,numberOfAtoms,meshDim,5,1); pme_init(&pmedata,alphaEwald,numberOfAtoms,meshDim,5,1);
pme_exec(pmedata,atomCoordinates,forces,atomParameters,periodicBoxSize,&recipEnergy,virial); pme_exec(pmedata,atomCoordinates,forces,atomParameters,periodicBoxSize,&recipEnergy,virial);
if( totalEnergy ) if( totalEnergy )
*totalEnergy += recipEnergy; *totalEnergy += recipEnergy;
if( energyByAtom ) if( energyByAtom )
......
...@@ -669,8 +669,8 @@ fftpack_transpose_2d(t_complex * in_data, ...@@ -669,8 +669,8 @@ fftpack_transpose_2d(t_complex * in_data,
int nx, int nx,
int ny) int ny)
{ {
t_complex * src; t_complex * src;
int i,j; int i,j;
if(nx<2 || ny<2) if(nx<2 || ny<2)
{ {
...@@ -682,45 +682,45 @@ fftpack_transpose_2d(t_complex * in_data, ...@@ -682,45 +682,45 @@ fftpack_transpose_2d(t_complex * in_data,
} }
if(in_data == out_data) if(in_data == out_data)
{ {
src = (t_complex *)malloc(sizeof(t_complex)*nx*ny); src = (t_complex *)malloc(sizeof(t_complex)*nx*ny);
memcpy(src,in_data,sizeof(t_complex)*nx*ny); memcpy(src,in_data,sizeof(t_complex)*nx*ny);
} }
else else
{ {
src = in_data; src = in_data;
} }
for(i=0;i<nx;i++) for(i=0;i<nx;i++)
{ {
for(j=0;j<ny;j++) for(j=0;j<ny;j++)
{ {
out_data[j*nx+i].re = src[i*ny+j].re; out_data[j*nx+i].re = src[i*ny+j].re;
out_data[j*nx+i].im = src[i*ny+j].im; out_data[j*nx+i].im = src[i*ny+j].im;
} }
} }
if(src != in_data) if(src != in_data)
{ {
free(src); free(src);
} }
return 0; return 0;
} }
static int static int
fftpack_transpose_2d_nelem(t_complex * in_data, fftpack_transpose_2d_nelem(t_complex * in_data,
t_complex * out_data, t_complex * out_data,
int nx, int nx,
int ny, int ny,
int nelem) int nelem)
{ {
t_complex * src; t_complex * src;
int ncopy; int ncopy;
int i,j; int i,j;
ncopy = nelem*sizeof(t_complex); ncopy = nelem*sizeof(t_complex);
if(nx<2 || ny<2) if(nx<2 || ny<2)
{ {
...@@ -732,28 +732,28 @@ fftpack_transpose_2d_nelem(t_complex * in_data, ...@@ -732,28 +732,28 @@ fftpack_transpose_2d_nelem(t_complex * in_data,
} }
if(in_data == out_data) if(in_data == out_data)
{ {
src = (t_complex *)malloc(nx*ny*ncopy); src = (t_complex *)malloc(nx*ny*ncopy);
memcpy(src,in_data,nx*ny*ncopy); memcpy(src,in_data,nx*ny*ncopy);
} }
else else
{ {
src = in_data; src = in_data;
} }
for(i=0;i<nx;i++) for(i=0;i<nx;i++)
{ {
for(j=0;j<ny;j++) for(j=0;j<ny;j++)
{ {
memcpy(out_data + (j*nx+i)*nelem , src + (i*ny+j)*nelem , ncopy); memcpy(out_data + (j*nx+i)*nelem , src + (i*ny+j)*nelem , ncopy);
} }
} }
if(src != in_data) if(src != in_data)
{ {
free(src); free(src);
} }
return 0; return 0;
} }
...@@ -877,7 +877,7 @@ fftpack_init_3d(fftpack_t * pfft, ...@@ -877,7 +877,7 @@ fftpack_init_3d(fftpack_t * pfft,
*pfft = fft; *pfft = fft;
return 0; return 0;
}; };
......
...@@ -229,7 +229,7 @@ fftpack_exec_3d (fftpack_t setup, ...@@ -229,7 +229,7 @@ fftpack_exec_3d (fftpack_t setup,
* Destroy setup and release all allocated memory. * Destroy setup and release all allocated memory.
* *
* \param setup Setup returned from fftpack_init_1d(), or one * \param setup Setup returned from fftpack_init_1d(), or one
* of the other initializers. * of the other initializers.
* *
*/ */
void void
......
...@@ -170,7 +170,7 @@ void CpuGBVI::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, Real ...@@ -170,7 +170,7 @@ void CpuGBVI::computeBornRadiiUsingQuinticSpline( RealOpenMM atomicRadius3, Real
// (A - V)*dS/dV - S(V) = (A-V)*d(qSpline) + (A-V)*U/(A-V)**2 - qSpline - U/(A-V) // (A - V)*dS/dV - S(V) = (A-V)*d(qSpline) + (A-V)*U/(A-V)**2 - qSpline - U/(A-V)
// = (A-V)*d(qSpline) - qSpline L < V < A**(-3) // = (A-V)*d(qSpline) - qSpline L < V < A**(-3)
// (A - V)*dS/dV - S(V) = (A-V)*U*/(A-V)**2 - U/(A-V) = 0 U < V // (A - V)*dS/dV - S(V) = (A-V)*U*/(A-V)**2 - U/(A-V) = 0 U < V
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment