diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-09-10 12:54:18 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-09-10 12:54:18 +0200 |
commit | 96a476a2331daa4d1d6b5ac444bbdbd2ac221a5f (patch) | |
tree | 70d09c28efc104dee82058058b321e235421fe00 /lib/compound.rb | |
parent | 5b844250a7d3be05e3139e0ca3c819c3da8ee4f6 (diff) |
tests fixed (crossvalidations may fail due to memory constraints)
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index 8f393f5..6adf3c0 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -218,11 +218,6 @@ module OpenTox obconversion.write_string(obmol).gsub(/\s/,'').chomp when /sdf/ p "SDF conversion" - # has no effect - #obconversion.add_option("gen3D", OpenBabel::OBConversion::GENOPTIONS) - # segfaults with openbabel git master - #OpenBabel::OBOp.find_type("Gen3D").do(obmol) - # TODO: find disconnected structures # strip_salts # separate @@ -234,14 +229,13 @@ p "SDF conversion" print sdf if sdf.match(/.nan/) -# TODO: fix or eliminate 2d generation $logger.warn "3D generation failed for compound #{identifier}, trying to calculate 2D structure" obconversion.set_options("gen2D", OpenBabel::OBConversion::GENOPTIONS) - #OpenBabel::OBOp.find_type("Gen2D").do(obmol) sdf = obconversion.write_string(obmol) if sdf.match(/.nan/) - $logger.warn "2D generation failed for compound #{identifier}" - sdf = nil + $logger.warn "2D generation failed for compound #{identifier}, rendering without coordinates." + obconversion.remove_option("gen2D", OpenBabel::OBConversion::GENOPTIONS) + sdf = obconversion.write_string(obmol) end end sdf |