diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-08-19 12:57:23 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-08-19 12:57:23 +0200 |
commit | 36e10aa98a3d19a78a1889857262abe338a05eef (patch) | |
tree | 38ac1c2e03ade553ea3402d79934c295e76ce6c9 /lib/compound.rb | |
parent | 4067d78c78c1f503b5f21d043ece8042260a3d78 (diff) |
libfminer rpath fixed, installation instructions
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index e51e9ad..fdec019 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -213,11 +213,22 @@ module OpenTox when /smi|can|inchi/ obconversion.write_string(obmol).gsub(/\s/,'').chomp when /sdf/ -# TODO set 3D +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) + + builder = OpenBabel::OBBuilder.new + builder.build(obmol); + sdf = obconversion.write_string(obmol) +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/) |