Commit 9a127fa5 authored by Jason Swails's avatar Jason Swails
Browse files

Merge branch 'master' of http://github.com/SimTk/openmm

parents f16a609b 492e7f29
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
* *
* @param pressure the default pressure acting on the system, measured in bar. * @param pressure the default pressure acting on the system, measured in bar.
*/ */
void setDefaultPressure(Vec3 pressure) { void setDefaultPressure(const Vec3& pressure) {
defaultPressure = pressure; defaultPressure = pressure;
} }
/** /**
......
...@@ -223,6 +223,10 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC ...@@ -223,6 +223,10 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
int main() { int main() {
try { try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testSingleParticle(); testSingleParticle();
testCutoffAndPeriodic(); testCutoffAndPeriodic();
for (int i = 5; i < 11; i++) { for (int i = 5; i < 11; i++) {
......
...@@ -264,6 +264,10 @@ void testRandomSeed() { ...@@ -264,6 +264,10 @@ void testRandomSeed() {
int main() { int main() {
try { try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testSingleBond(); testSingleBond();
testTemperature(); testTemperature();
testConstraints(); testConstraints();
......
...@@ -105,6 +105,10 @@ void testConstraints() { ...@@ -105,6 +105,10 @@ void testConstraints() {
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
try { try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testConstraints(); testConstraints();
} }
catch(const exception& e) { catch(const exception& e) {
......
...@@ -50,7 +50,7 @@ using namespace std; ...@@ -50,7 +50,7 @@ using namespace std;
static OpenCLPlatform platform; static OpenCLPlatform platform;
void testGaussian() { void testGaussian() {
int numAtoms = 5000; int numAtoms = 10000;
System system; System system;
for (int i = 0; i < numAtoms; i++) for (int i = 0; i < numAtoms; i++)
system.addParticle(1.0); system.addParticle(1.0);
...@@ -82,10 +82,10 @@ void testGaussian() { ...@@ -82,10 +82,10 @@ void testGaussian() {
double c2 = var-mean*mean; double c2 = var-mean*mean;
double c3 = skew-3*var*mean+2*mean*mean*mean; double c3 = skew-3*var*mean+2*mean*mean*mean;
double c4 = kurtosis-4*skew*mean-3*var*var+12*var*mean*mean-6*mean*mean*mean*mean; double c4 = kurtosis-4*skew*mean-3*var*var+12*var*mean*mean-6*mean*mean*mean*mean;
ASSERT_EQUAL_TOL(0.0, mean, 3.0/sqrt((double)numValues)); ASSERT_EQUAL_TOL(0.0, mean, 4.0/sqrt((double)numValues));
ASSERT_EQUAL_TOL(1.0, c2, 3.0/pow(numValues, 1.0/3.0)); ASSERT_EQUAL_TOL(1.0, c2, 4.0/pow(numValues, 1.0/3.0));
ASSERT_EQUAL_TOL(0.0, c3, 3.0/pow(numValues, 1.0/4.0)); ASSERT_EQUAL_TOL(0.0, c3, 4.0/pow(numValues, 1.0/4.0));
ASSERT_EQUAL_TOL(0.0, c4, 3.0/pow(numValues, 1.0/4.0)); ASSERT_EQUAL_TOL(0.0, c4, 4.0/pow(numValues, 1.0/4.0));
} }
void testRandomVelocities() { void testRandomVelocities() {
......
find_program(PYTHON_EXECUTABLE NAMES python)
############################################# #############################################
### Copy all source files to staging area ### ### Copy all source files to staging area ###
############################################# #############################################
......
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