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