Commit dfe03fe9 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Prevent lots of memory allocation crashes on linux for the openmmapi test programs

parent 77866475
...@@ -255,7 +255,7 @@ public: ...@@ -255,7 +255,7 @@ public:
class StandardMMForceField::RBTorsionInfo { class StandardMMForceField::RBTorsionInfo {
public: public:
int atom1, atom2, atom3, atom4; int atom1, atom2, atom3, atom4;
double c[5]; double c[6];
RBTorsionInfo() { RBTorsionInfo() {
atom1 = atom2 = atom3 = atom4 = -1; atom1 = atom2 = atom3 = atom4 = -1;
c[0] = c[1] = c[2] = c[3] = c[4] = c[5] = 0.0; c[0] = c[1] = c[2] = c[3] = c[4] = c[5] = 0.0;
......
...@@ -72,7 +72,7 @@ ReferenceFloatStreamImpl::ReferenceFloatStreamImpl(std::string name, int size, S ...@@ -72,7 +72,7 @@ ReferenceFloatStreamImpl::ReferenceFloatStreamImpl(std::string name, int size, S
} }
ReferenceFloatStreamImpl::~ReferenceFloatStreamImpl() { ReferenceFloatStreamImpl::~ReferenceFloatStreamImpl() {
delete data; delete [] data;
} }
void ReferenceFloatStreamImpl::loadFromArray(const void* array) { void ReferenceFloatStreamImpl::loadFromArray(const void* array) {
......
...@@ -215,7 +215,7 @@ double ReferenceCalcStandardMMForceFieldKernel::executeEnergy(const Stream& posi ...@@ -215,7 +215,7 @@ double ReferenceCalcStandardMMForceFieldKernel::executeEnergy(const Stream& posi
ReferenceCalcGBSAOBCForceFieldKernel::~ReferenceCalcGBSAOBCForceFieldKernel() { ReferenceCalcGBSAOBCForceFieldKernel::~ReferenceCalcGBSAOBCForceFieldKernel() {
if (obc) { if (obc) {
delete obc->getObcParameters(); // delete obc->getObcParameters();
delete obc; delete obc;
} }
} }
......
...@@ -64,7 +64,7 @@ class ReferenceLJCoulombIxn : public ReferencePairIxn { ...@@ -64,7 +64,7 @@ class ReferenceLJCoulombIxn : public ReferencePairIxn {
@param c6 c6 @param c6 c6
@param c12 c12 @param c12 c12
@param q1 q1 charge atom @param q1 q1 charge atom
@param epsfacSqrt epsfacSqrt ????????????/ @param epsfacSqrt epsfacSqrt (what is this?)
@param parameters output parameters: @param parameters output parameters:
parameter[SigIndex] = sqrt(c6*c6/c12) parameter[SigIndex] = sqrt(c6*c6/c12)
parameter[EpsIndex] = 0.5*( (c12/c6)**1/6 ) parameter[EpsIndex] = 0.5*( (c12/c6)**1/6 )
......
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