Commit f75c5ee6 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed a potential nan

parent 10b51d25
/* Portions copyright (c) 2006-2016 Stanford University and Simbios.
/* Portions copyright (c) 2006-2013 Stanford University and Simbios.
* Contributors: Pande Group * Contributors: Pande Group
* *
* Permission is hereby granted, free of charge, to any person obtaining * Permission is hereby granted, free of charge, to any person obtaining
...@@ -89,6 +88,10 @@ void CpuGBSAOBCForce::setParticleParameters(const std::vector<std::pair<float, f ...@@ -89,6 +88,10 @@ void CpuGBSAOBCForce::setParticleParameters(const std::vector<std::pair<float, f
particleParams = params; particleParams = params;
bornRadii.resize(params.size()+3); bornRadii.resize(params.size()+3);
obcChain.resize(params.size()+3); obcChain.resize(params.size()+3);
for (int i = bornRadii.size()-3; i < bornRadii.size()-1; i++) {
bornRadii[i] = 0;
obcChain[i] = 0;
}
} }
void CpuGBSAOBCForce::computeForce(const AlignedArray<float>& posq, vector<AlignedArray<float> >& threadForce, double* totalEnergy, ThreadPool& threads) { void CpuGBSAOBCForce::computeForce(const AlignedArray<float>& posq, vector<AlignedArray<float> >& threadForce, double* totalEnergy, ThreadPool& threads) {
......
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