Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
3cae6a22
"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "e5c065dfd01cd101170d78beb609760287c8c43f"
Commit
3cae6a22
authored
Sep 29, 2010
by
Mark Friedrichs
Browse files
More cleanup for Windows compilation
parent
c178a65c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
19 deletions
+31
-19
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
+1
-1
platforms/cuda/src/kernels/bbsort.h
platforms/cuda/src/kernels/bbsort.h
+2
-1
platforms/cuda/src/kernels/cudaKernels.h
platforms/cuda/src/kernels/cudaKernels.h
+1
-1
plugins/amoeba/openmmapi/include/internal/AmoebaMultipoleForceImpl.h
...eba/openmmapi/include/internal/AmoebaMultipoleForceImpl.h
+1
-1
plugins/amoeba/openmmapi/include/internal/AmoebaWcaDispersionForceImpl.h
...openmmapi/include/internal/AmoebaWcaDispersionForceImpl.h
+1
-1
plugins/amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.cpp
...amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.cpp
+25
-14
No files found.
openmmapi/include/openmm/internal/AndersenThermostatImpl.h
View file @
3cae6a22
...
@@ -45,7 +45,7 @@ class System;
...
@@ -45,7 +45,7 @@ class System;
* This is the internal implementation of AndersenThermostat.
* This is the internal implementation of AndersenThermostat.
*/
*/
class
AndersenThermostatImpl
:
public
ForceImpl
{
class
OPENMM_EXPORT
AndersenThermostatImpl
:
public
ForceImpl
{
public:
public:
AndersenThermostatImpl
(
AndersenThermostat
&
owner
);
AndersenThermostatImpl
(
AndersenThermostat
&
owner
);
void
initialize
(
ContextImpl
&
context
);
void
initialize
(
ContextImpl
&
context
);
...
...
platforms/cuda/src/kernels/bbsort.h
View file @
3cae6a22
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
*/
*/
#ifndef _BBSORT_H_
#ifndef _BBSORT_H_
#define _BBSORT_H_
#define _BBSORT_H_
#include "windowsExportCuda.h"
#define BLOCK_SIZE 512
#define BLOCK_SIZE 512
...
@@ -18,6 +19,6 @@
...
@@ -18,6 +19,6 @@
#define AUTO_EVALUATE 2
#define AUTO_EVALUATE 2
template
<
typename
T
>
template
<
typename
T
>
void
bbSort
(
T
*
dData
,
int
number
,
int
listOrder
=
AUTO_EVALUATE
);
void
OPENMMCUDA_EXPORT
bbSort
(
T
*
dData
,
int
number
,
int
listOrder
=
AUTO_EVALUATE
);
#endif // _BBSORT_H_
#endif // _BBSORT_H_
platforms/cuda/src/kernels/cudaKernels.h
View file @
3cae6a22
...
@@ -97,7 +97,7 @@ extern void SetCalculateObcGbsaBornSumSim(gpuContext gpu);
...
@@ -97,7 +97,7 @@ extern void SetCalculateObcGbsaBornSumSim(gpuContext gpu);
extern
void
GetCalculateObcGbsaBornSumSim
(
gpuContext
gpu
);
extern
void
GetCalculateObcGbsaBornSumSim
(
gpuContext
gpu
);
extern
void
SetCalculateGBVIBornSumSim
(
gpuContext
gpu
);
extern
void
SetCalculateGBVIBornSumSim
(
gpuContext
gpu
);
extern
void
GetCalculateGBVIBornSumSim
(
gpuContext
gpu
);
extern
void
GetCalculateGBVIBornSumSim
(
gpuContext
gpu
);
extern
void
SetCalculateObcGbsaForces2Sim
(
gpuContext
gpu
);
extern
void
OPENMMCUDA_EXPORT
SetCalculateObcGbsaForces2Sim
(
gpuContext
gpu
);
extern
void
GetCalculateObcGbsaForces2Sim
(
gpuContext
gpu
);
extern
void
GetCalculateObcGbsaForces2Sim
(
gpuContext
gpu
);
extern
void
SetCalculateGBVIForces2Sim
(
gpuContext
gpu
);
extern
void
SetCalculateGBVIForces2Sim
(
gpuContext
gpu
);
extern
void
GetCalculateGBVIForces2Sim
(
gpuContext
gpu
);
extern
void
GetCalculateGBVIForces2Sim
(
gpuContext
gpu
);
...
...
plugins/amoeba/openmmapi/include/internal/AmoebaMultipoleForceImpl.h
View file @
3cae6a22
...
@@ -44,7 +44,7 @@ namespace OpenMM {
...
@@ -44,7 +44,7 @@ namespace OpenMM {
* This is the internal implementation of AmoebaMultipoleForce.
* This is the internal implementation of AmoebaMultipoleForce.
*/
*/
class
AmoebaMultipoleForceImpl
:
public
ForceImpl
{
class
OPENMM_EXPORT
AmoebaMultipoleForceImpl
:
public
ForceImpl
{
public:
public:
AmoebaMultipoleForceImpl
(
AmoebaMultipoleForce
&
owner
);
AmoebaMultipoleForceImpl
(
AmoebaMultipoleForce
&
owner
);
~
AmoebaMultipoleForceImpl
();
~
AmoebaMultipoleForceImpl
();
...
...
plugins/amoeba/openmmapi/include/internal/AmoebaWcaDispersionForceImpl.h
View file @
3cae6a22
...
@@ -45,7 +45,7 @@ namespace OpenMM {
...
@@ -45,7 +45,7 @@ namespace OpenMM {
* This is the internal implementation of AmoebaWcaDispersionForce.
* This is the internal implementation of AmoebaWcaDispersionForce.
*/
*/
class
AmoebaWcaDispersionForceImpl
:
public
ForceImpl
{
class
OPENMM_EXPORT
AmoebaWcaDispersionForceImpl
:
public
ForceImpl
{
public:
public:
AmoebaWcaDispersionForceImpl
(
AmoebaWcaDispersionForce
&
owner
);
AmoebaWcaDispersionForceImpl
(
AmoebaWcaDispersionForce
&
owner
);
~
AmoebaWcaDispersionForceImpl
();
~
AmoebaWcaDispersionForceImpl
();
...
...
plugins/amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.cpp
View file @
3cae6a22
...
@@ -40,8 +40,6 @@
...
@@ -40,8 +40,6 @@
#include <sys/time.h>
#include <sys/time.h>
#endif
#endif
extern
int
isNanOrInfinity
(
double
number
);
using
namespace
std
;
using
namespace
std
;
...
@@ -591,6 +589,19 @@ static int readIntVector( FILE* filePtr, const StringVector& tokens, int numberT
...
@@ -591,6 +589,19 @@ static int readIntVector( FILE* filePtr, const StringVector& tokens, int numberT
return
static_cast
<
int
>
(
intVector
.
size
());
return
static_cast
<
int
>
(
intVector
.
size
());
}
}
/**---------------------------------------------------------------------------------------
Report whether a number is a nan or infinity
@param number number to test
@return 1 if number is nan or infinity; else return 0
--------------------------------------------------------------------------------------- */
int
isNan
(
double
number
){
return
(
number
!=
number
||
number
==
std
::
numeric_limits
<
double
>::
infinity
()
||
number
==
-
std
::
numeric_limits
<
double
>::
infinity
())
?
1
:
0
;
}
/**---------------------------------------------------------------------------------------
/**---------------------------------------------------------------------------------------
Read particles count
Read particles count
...
@@ -3766,7 +3777,7 @@ void initializeForceMap( MapStringInt& forceMap, int initialValue ){
...
@@ -3766,7 +3777,7 @@ void initializeForceMap( MapStringInt& forceMap, int initialValue ){
return
;
return
;
}
}
/*
void checkIntermediateMultipoleQuantities( Context* context, MapStringVectorOfVectors& supplementary,
void checkIntermediateMultipoleQuantities( Context* context, MapStringVectorOfVectors& supplementary,
int useOpenMMUnits, FILE* log ) {
int useOpenMMUnits, FILE* log ) {
...
@@ -3939,7 +3950,7 @@ void checkIntermediateMultipoleQuantities( Context* context, MapStringVectorOfVe
...
@@ -3939,7 +3950,7 @@ void checkIntermediateMultipoleQuantities( Context* context, MapStringVectorOfVe
(void) fflush( log );
(void) fflush( log );
}
}
}
}
*/
void
calculateBorn1
(
System
&
amoebaSystem
,
std
::
vector
<
Vec3
>&
tinkerCoordinates
,
FILE
*
log
)
{
void
calculateBorn1
(
System
&
amoebaSystem
,
std
::
vector
<
Vec3
>&
tinkerCoordinates
,
FILE
*
log
)
{
/*
/*
...
@@ -4725,7 +4736,7 @@ void testUsingAmoebaTinkerParameterFile( const std::string& amoebaTinkerParamete
...
@@ -4725,7 +4736,7 @@ void testUsingAmoebaTinkerParameterFile( const std::string& amoebaTinkerParamete
if
(
gkIsActive
==
false
){
if
(
gkIsActive
==
false
){
isPresent
=
forceMap
.
find
(
AMOEBA_MULTIPOLE_FORCE
);
isPresent
=
forceMap
.
find
(
AMOEBA_MULTIPOLE_FORCE
);
if
(
isPresent
!=
forceMap
.
end
()
&&
isPresent
->
second
!=
0
){
if
(
isPresent
!=
forceMap
.
end
()
&&
isPresent
->
second
!=
0
){
checkIntermediateMultipoleQuantities
(
context
,
supplementary
,
useOpenMMUnits
,
log
);
//
checkIntermediateMultipoleQuantities( context, supplementary, useOpenMMUnits, log );
}
}
}
}
...
@@ -4813,15 +4824,15 @@ void testEnergyForcesConsistent( std::string parameterFileName, MapStringInt& fo
...
@@ -4813,15 +4824,15 @@ void testEnergyForcesConsistent( std::string parameterFileName, MapStringInt& fo
// check norm is not nan
// check norm is not nan
if
(
isNan
OrInfinity
(
forceNorm
)
){
if
(
isNan
(
forceNorm
)
){
if
(
log
){
if
(
log
){
(
void
)
fprintf
(
log
,
"%s norm of force is nan -- aborting.
\n
"
,
methodName
.
c_str
()
);
(
void
)
fprintf
(
log
,
"%s norm of force is nan -- aborting.
\n
"
,
methodName
.
c_str
()
);
unsigned
int
hitNan
=
0
;
unsigned
int
hitNan
=
0
;
for
(
unsigned
int
ii
=
0
;
(
ii
<
forces
.
size
())
&&
(
hitNan
<
10
);
ii
++
){
for
(
unsigned
int
ii
=
0
;
(
ii
<
forces
.
size
())
&&
(
hitNan
<
10
);
ii
++
){
if
(
isNan
OrInfinity
(
forces
[
ii
][
0
]
)
||
if
(
isNan
(
forces
[
ii
][
0
]
)
||
isNan
OrInfinity
(
forces
[
ii
][
1
]
)
||
isNan
(
forces
[
ii
][
1
]
)
||
isNan
OrInfinity
(
forces
[
ii
][
2
]
)
)
hitNan
++
;
isNan
(
forces
[
ii
][
2
]
)
)
hitNan
++
;
(
void
)
fprintf
(
log
,
"%6u x[%15.7e %15.7e %15.7e] f[%15.7e %15.7e %15.7e]
\n
"
,
ii
,
(
void
)
fprintf
(
log
,
"%6u x[%15.7e %15.7e %15.7e] f[%15.7e %15.7e %15.7e]
\n
"
,
ii
,
coordinates
[
ii
][
0
],
coordinates
[
ii
][
1
],
coordinates
[
ii
][
2
],
coordinates
[
ii
][
0
],
coordinates
[
ii
][
1
],
coordinates
[
ii
][
2
],
...
@@ -4974,15 +4985,15 @@ void testEnergyForceByFiniteDifference( std::string parameterFileName, MapString
...
@@ -4974,15 +4985,15 @@ void testEnergyForceByFiniteDifference( std::string parameterFileName, MapString
// check norm is not nan
// check norm is not nan
if
(
isNan
OrInfinity
(
forceNorm
)
){
if
(
isNan
(
forceNorm
)
){
if
(
log
){
if
(
log
){
(
void
)
fprintf
(
log
,
"%s norm of force is nan -- aborting.
\n
"
,
methodName
.
c_str
()
);
(
void
)
fprintf
(
log
,
"%s norm of force is nan -- aborting.
\n
"
,
methodName
.
c_str
()
);
unsigned
int
hitNan
=
0
;
unsigned
int
hitNan
=
0
;
for
(
unsigned
int
ii
=
0
;
(
ii
<
forces
.
size
())
&&
(
hitNan
<
10
);
ii
++
){
for
(
unsigned
int
ii
=
0
;
(
ii
<
forces
.
size
())
&&
(
hitNan
<
10
);
ii
++
){
if
(
isNan
OrInfinity
(
forces
[
ii
][
0
]
)
||
if
(
isNan
(
forces
[
ii
][
0
]
)
||
isNan
OrInfinity
(
forces
[
ii
][
1
]
)
||
isNan
(
forces
[
ii
][
1
]
)
||
isNan
OrInfinity
(
forces
[
ii
][
2
]
)
)
hitNan
++
;
isNan
(
forces
[
ii
][
2
]
)
)
hitNan
++
;
(
void
)
fprintf
(
log
,
"%6u x[%15.7e %15.7e %15.7e] f[%15.7e %15.7e %15.7e]
\n
"
,
ii
,
(
void
)
fprintf
(
log
,
"%6u x[%15.7e %15.7e %15.7e] f[%15.7e %15.7e %15.7e]
\n
"
,
ii
,
coordinates
[
ii
][
0
],
coordinates
[
ii
][
1
],
coordinates
[
ii
][
2
],
coordinates
[
ii
][
0
],
coordinates
[
ii
][
1
],
coordinates
[
ii
][
2
],
...
@@ -5696,7 +5707,7 @@ void testEnergyConservation( std::string parameterFileName, MapStringInt& forceM
...
@@ -5696,7 +5707,7 @@ void testEnergyConservation( std::string parameterFileName, MapStringInt& forceM
}
}
}
}
if
(
isNan
OrInfinity
(
totalEnergy
)
){
if
(
isNan
(
totalEnergy
)
){
char
buffer
[
1024
];
char
buffer
[
1024
];
(
void
)
sprintf
(
buffer
,
"%s nans detected at time %12.3f -- aborting.
\n
"
,
methodName
.
c_str
(),
currentTime
);
(
void
)
sprintf
(
buffer
,
"%s nans detected at time %12.3f -- aborting.
\n
"
,
methodName
.
c_str
(),
currentTime
);
throwException
(
__FILE__
,
__LINE__
,
buffer
);
throwException
(
__FILE__
,
__LINE__
,
buffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment