From 36e10aa98a3d19a78a1889857262abe338a05eef Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 19 Aug 2015 12:57:23 +0200 Subject: libfminer rpath fixed, installation instructions --- lib/compound.rb | 13 ++++++++++++- lib/lazar.rb | 3 --- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lib') 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/) diff --git a/lib/lazar.rb b/lib/lazar.rb index 9e2363c..2ea8cba 100644 --- a/lib/lazar.rb +++ b/lib/lazar.rb @@ -31,9 +31,6 @@ Mongo::Logger.level = Logger::WARN #Mongoid.logger = $logger # Require sub-Repositories -# TODO: set -ENV["LD_LIBRARY_PATH"] = "#{File.join File.dirname(__FILE__),'..','openbabel','lib'}" -p ENV["LD_LIBRARY_PATH"] require_relative '../libfminer/libbbrc/bbrc' # include before openbabel require_relative '../libfminer/liblast/last' # require_relative '../last-utils/lu.rb' -- cgit v1.2.3