Skip to content

Commit

Permalink
Merge pull request BVLC#21 from gnina/lrp
Browse files Browse the repository at this point in the history
Score mapping is failing on some differently (but correctly) formatted PDB's
  • Loading branch information
dkoes committed Jan 30, 2018
2 parents 5485c31 + 8b68f61 commit 7cdb0d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/caffe/layers/molgrid_data_layer.hpp
Expand Up @@ -678,6 +678,11 @@ class MolGridDataLayer : public BaseDataLayer<Dtype> {
template<typename T>
static string xyz_to_string(T x, T y, T z)
{
//avoid negative zeros in string representation
if(x == 0) x = 0;
if(y == 0) y = 0;
if(z == 0) z = 0;

std::stringstream ss;
ss << std::fixed << std::setprecision(3) << x;
std::string rounded_x = ss.str();
Expand Down

0 comments on commit 7cdb0d5

Please sign in to comment.