diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-06-22 11:34:43 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-06-22 11:34:43 +0200 |
commit | b8b51dc05d5dcbfe5ea2b8119878188c72d571b7 (patch) | |
tree | 70e5e830aa7f3c55eb24b4f9dda68fbc28c31205 /lib | |
parent | ba287d744cdc929df7e3ed3986151b813ddf8fb1 (diff) | |
parent | 4902d7d4c2d45ef98d20d5a6269e0dbf3bd01cc4 (diff) |
Merge commit 'amaunz/master' into development
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compound.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index 6ab78e0..7c7c3d8 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -69,6 +69,12 @@ module OpenTox smarts_array.collect{|s| s if match?(s)}.compact end + # AM + # Match an array of smarts features, returns (0)1 for (non)matching features at each pos + def match_all(smarts_array) + smarts_array.collect{|s| match?(s) ? 1 : 0 } + end + def sdf2inchi(sdf) obconversion(sdf,'sdf','inchi') end |