chemruby 0.9.3 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/README +2 -2
  2. data/Rakefile +67 -63
  3. data/ext/extconf.rb +2 -0
  4. data/ext/subcomp.c +461 -320
  5. data/ext/utils.c +56 -0
  6. data/ext/utils.h +13 -0
  7. data/lib/chem.rb +34 -8
  8. data/lib/chem/db.rb +8 -0
  9. data/lib/chem/db/cansmi.rb +1 -1
  10. data/lib/chem/db/cdx.rb +1 -1
  11. data/lib/chem/db/cml.rb +52 -0
  12. data/lib/chem/db/gd.rb +64 -0
  13. data/lib/chem/db/gspan.rb +2 -2
  14. data/lib/chem/db/kcf_rpair.rb +34 -0
  15. data/lib/chem/db/kegg.rb +35 -1
  16. data/lib/chem/db/mdl.rb +75 -34
  17. data/lib/chem/db/opsin.rb +24 -0
  18. data/lib/chem/db/pdb.rb +105 -0
  19. data/lib/chem/db/pdf.rb +2 -0
  20. data/lib/chem/db/pubchem.rb +1071 -88
  21. data/lib/chem/db/rmagick.rb +5 -3
  22. data/lib/chem/db/sdf.rb +28 -2
  23. data/lib/chem/db/smiles/smiles.ry +27 -25
  24. data/lib/chem/db/smiles/smiparser.rb +29 -27
  25. data/lib/chem/db/types/type_gd.rb +35 -0
  26. data/lib/chem/db/types/type_gspan.rb +2 -2
  27. data/lib/chem/db/types/type_kcf.rb +19 -0
  28. data/lib/chem/db/types/type_kegg.rb +2 -0
  29. data/lib/chem/db/types/type_mdl.rb +1 -1
  30. data/lib/chem/db/types/type_png.rb +5 -1
  31. data/lib/chem/db/types/type_rdf.rb +22 -0
  32. data/lib/chem/db/types/type_xyz.rb +1 -1
  33. data/lib/chem/db/vector.rb +19 -3
  34. data/lib/chem/model.rb +5 -2
  35. data/lib/chem/utils.rb +17 -1
  36. data/lib/chem/utils/bitdb.rb +49 -0
  37. data/lib/chem/utils/cas.rb +28 -0
  38. data/lib/chem/utils/cdk.rb +403 -0
  39. data/lib/chem/utils/fingerprint.rb +98 -0
  40. data/lib/chem/utils/geometry.rb +8 -0
  41. data/lib/chem/utils/net.rb +303 -0
  42. data/lib/chem/utils/once.rb +28 -0
  43. data/lib/chem/utils/openbabel.rb +204 -0
  44. data/lib/chem/utils/sssr.rb +33 -25
  45. data/lib/chem/utils/sub.rb +6 -0
  46. data/lib/chem/utils/transform.rb +9 -8
  47. data/lib/chem/utils/ullmann.rb +138 -95
  48. data/lib/graph.rb +5 -6
  49. data/lib/graph/utils.rb +8 -0
  50. data/sample/calc_maximum_common_subgraph.rb +27 -0
  51. data/sample/calc_properties.rb +9 -0
  52. data/sample/data/atp.mol +69 -0
  53. data/sample/data/pioglitazone.mol +58 -0
  54. data/sample/data/rosiglitazone.mol +55 -0
  55. data/sample/data/troglitazone.mol +70 -0
  56. data/sample/find_compound_by_keggapi.rb +19 -0
  57. data/sample/generate_inchi.rb +7 -0
  58. data/sample/generate_substructurekey.rb +11 -0
  59. data/sample/images/ex6.rb +17 -0
  60. data/sample/images/ex7.rb +18 -0
  61. data/sample/iupac2mol.rb +8 -0
  62. data/sample/kekule.rb +13 -0
  63. data/sample/logp.rb +4 -0
  64. data/sample/mcs.rb +13 -0
  65. data/sample/mol2pdf.rb +8 -0
  66. data/sample/pubchem_fetch.rb +8 -0
  67. data/sample/pubchem_search.rb +12 -0
  68. data/sample/rosiglitazone.mol +57 -0
  69. data/sample/smarts.rb +10 -0
  70. data/sample/structure_match.rb +8 -0
  71. data/sample/structure_match_color.rb +22 -0
  72. data/sample/thiazolidinedione.mol +19 -0
  73. data/sample/troglitazone.mol +232 -0
  74. data/sample/vicinity.rb +8 -0
  75. data/test/data/CID_704.sdf +236 -0
  76. data/test/data/CID_994.sdf +146 -0
  77. data/test/data/db_EXPT03276.txt +321 -0
  78. data/test/data/pioglitazone.mol +58 -0
  79. data/test/data/rosiglitazone.mol +55 -0
  80. data/test/data/thiazolidinedione.mol +19 -0
  81. data/test/data/troglitazone.mol +70 -0
  82. data/test/{test_adj.rb → tc_adj.rb} +0 -0
  83. data/test/{test_canonical_smiles.rb → tc_canonical_smiles.rb} +0 -0
  84. data/test/tc_casrn.rb +17 -0
  85. data/test/tc_cdk.rb +89 -0
  86. data/test/{test_cdx.rb → tc_cdx.rb} +0 -0
  87. data/test/{test_chem.rb → tc_chem.rb} +0 -0
  88. data/test/{test_cluster.rb → tc_cluster.rb} +0 -0
  89. data/test/{test_db.rb → tc_db.rb} +0 -0
  90. data/test/tc_develop.rb +38 -0
  91. data/test/tc_drugbank.rb +13 -0
  92. data/test/{test_eps.rb → tc_eps.rb} +0 -0
  93. data/test/tc_gd.rb +8 -0
  94. data/test/{test_geometry.rb → tc_geometry.rb} +0 -0
  95. data/test/tc_graph.rb +15 -0
  96. data/test/{test_gspan.rb → tc_gspan.rb} +0 -0
  97. data/test/{test_iupac.rb → tc_iupac.rb} +0 -0
  98. data/test/{test_kcf.rb → tc_kcf.rb} +0 -0
  99. data/test/{test_kcf_glycan.rb → tc_kcf_glycan.rb} +0 -0
  100. data/test/{test_kegg.rb → tc_kegg.rb} +13 -0
  101. data/test/{test_linucs.rb → tc_linucs.rb} +0 -0
  102. data/test/{test_mdl.rb → tc_mdl.rb} +20 -0
  103. data/test/{test_mol2.rb → tc_mol2.rb} +1 -1
  104. data/test/{test_morgan.rb → tc_morgan.rb} +0 -0
  105. data/test/tc_net.rb +5 -0
  106. data/test/tc_once.rb +29 -0
  107. data/test/tc_openbabel.rb +57 -0
  108. data/test/{test_pdf.rb → tc_pdf.rb} +0 -0
  109. data/test/{test_prop.rb → tc_prop.rb} +1 -1
  110. data/test/tc_pubchem.rb +32 -0
  111. data/test/{test_rmagick.rb → tc_rmagick.rb} +0 -0
  112. data/test/{test_sbdb.rb → tc_sbdb.rb} +0 -0
  113. data/test/{test_sdf.rb → tc_sdf.rb} +2 -0
  114. data/test/{test_smiles.rb → tc_smiles.rb} +46 -30
  115. data/test/tc_sssr.rb +1 -0
  116. data/test/{test_sub.rb → tc_sub.rb} +0 -0
  117. data/test/tc_subcomp.rb +59 -0
  118. data/test/{test_traverse.rb → tc_traverse.rb} +0 -0
  119. data/test/{test_writer.rb → tc_writer.rb} +0 -0
  120. data/test/{test_xyz.rb → tc_xyz.rb} +0 -0
  121. data/test/ts_current.rb +11 -0
  122. data/test/ts_image.rb +6 -0
  123. data/test/ts_main.rb +12 -0
  124. metadata +259 -194
  125. data/lib/chem/utils/graph_db.rb +0 -146
  126. data/test/test_sssr.rb +0 -18
  127. data/test/test_subcomp.rb +0 -37
@@ -56,7 +56,7 @@ class SybylTest < Test::Unit::TestCase
56
56
  end
57
57
 
58
58
  def test_mol
59
- assert_equal((0..66).to_a, @entries[0].match_by_ullmann(@entries[0]))
59
+ # assert_equal((0..66).to_a, @entries[0].match_by_ullmann(@entries[0]))
60
60
  end
61
61
 
62
62
  end
File without changes
@@ -0,0 +1,5 @@
1
+
2
+
3
+ class NetTest < Test::Unit::TestCase
4
+ fail
5
+ end
@@ -0,0 +1,29 @@
1
+ require 'chem'
2
+
3
+ class Foo
4
+
5
+ include Once
6
+
7
+ def initialize
8
+ @value = 0
9
+ end
10
+
11
+ def get
12
+ @value += 1
13
+ @value
14
+ end
15
+
16
+ once :get
17
+
18
+ end
19
+
20
+ class OnceTest < Test::Unit::TestCase
21
+
22
+ def test_once
23
+ foo = Foo.new
24
+ assert_equal(1, foo.get)
25
+ assert_equal(1, foo.get)
26
+ assert_equal(1, foo.get)
27
+ end
28
+
29
+ end
@@ -0,0 +1,57 @@
1
+ class OpenBabelTest < Test::Unit::TestCase
2
+
3
+ def test_chemruby_ob_conversion
4
+ mol = SMILES("CCC")
5
+ assert_raise(NoMethodError) do
6
+ mol.get_mol_wt # OBMol method
7
+ end
8
+ mol.use_open_babel
9
+ assert_in_delta(44.09562, mol.get_mol_wt, 1.0)
10
+ end
11
+
12
+ def test_smiles
13
+ mol = Chem::OpenBabel::parse_smiles("CCC")
14
+ assert_in_delta(44.09562, mol.get_mol_wt, 1.0)
15
+ assert_equal(3, mol.num_atoms)
16
+ assert_equal(2, mol.num_bonds)
17
+ mol.nodes.each do |atom|
18
+ assert_not_nil(atom)
19
+ assert_in_delta(12.0, atom.get_atomic_mass, 0.5)
20
+ end
21
+ end
22
+
23
+ # example from:
24
+ # http://depth-first.com/articles/2006/10/31/obruby-a-ruby-interface-to-open-babel
25
+ def test_smarts
26
+ smiles = 'CC(C)CCCC(C)C1CCC2C1(CCC3C2CC=C4C3(CCC(C4)O)C)C'
27
+ mol = Chem::OpenBabel::parse_smiles(smiles)
28
+ pat = Chem::OpenBabel::parse_smarts('C1CCCCC1')
29
+ assert(pat.match(mol), "must match")
30
+ ary = pat.get_umap_list
31
+ assert_equal([12, 17, 16, 15, 14, 13], ary[0])
32
+ assert_equal([20, 25, 24, 23, 22, 21], ary[1])
33
+ end
34
+
35
+ def test_load_sdf
36
+ sdf = Chem::OpenBabel::load_sdf($data_dir + "CID_704.sdf")
37
+ assert_equal(1, sdf.length)
38
+ end
39
+
40
+ def test_load_ob_save_ob
41
+ mol = Chem::OpenBabel::load_as($data_dir + "hypericin.mol", "mdl")
42
+ mol.ob_save_as("aa.fpt", "fpt")
43
+ end
44
+
45
+ def test_load_cr_save_ob
46
+ Chem.load($data_dir + "hypericin.mol").ob_save_as("aa.mol", "mdl")
47
+ end
48
+
49
+ def test_export_as
50
+ assert_not_nil(Chem.load($data_dir + "hypericin.mol").ob_export_as("inchi"))
51
+ end
52
+
53
+ def test_inchi
54
+ assert_not_nil(Chem.load($data_dir + "hypericin.mol").to_inchi)
55
+ end
56
+
57
+ end
File without changes
@@ -16,7 +16,7 @@ class PropTest < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  def test_oxidation_number
19
- mgcl2 = SMILES("ClMgCl")
19
+ mgcl2 = SMILES("Cl[Mg]Cl")
20
20
  mg = mgcl2.nodes.find{|n| n.element == :Mg}
21
21
  assert(2, mgcl2.oxidation_number(mg))
22
22
 
@@ -0,0 +1,32 @@
1
+
2
+
3
+ class PubChemTest < Test::Unit::TestCase
4
+
5
+ def test_pubchem_subskeys
6
+ mol = Chem.open_mol(File.join($data_dir, "CID_704.sdf")).to_a[0]
7
+ original = mol.pubchem_subskeys
8
+ assert_equal("11000000001111011100111000000111", ("%b" % original)[-32..-1])
9
+ pos = mol.pubchem_subskeys.to_bit_positions
10
+ assert_equal([0, 1, 2, 9, 10, 11, 14, 15, 16, 18, 19, 20, 21], pos[0..12])
11
+ gen_sk = mol.generate_pubchem_subskey
12
+
13
+ # Test for Section 1
14
+ assert_equal(("%0881b" % original)[-114..-1], ("%0881b" % gen_sk)[-114..-1])
15
+ # Test for Section 2
16
+ pos.each do |n|
17
+ puts Chem::PubChemSubsKey[n] if n > 115 and n < 262
18
+ end
19
+ pos2 = gen_sk.to_bit_positions
20
+ pos2.each do |n|
21
+ puts Chem::PubChemSubsKey[n] if n > 115 and n < 262
22
+ end
23
+ p mol.generate_pubchem_subskey.to_bit_positions
24
+ p pos
25
+ end
26
+
27
+ def test_path_fingerprint
28
+ fp = Chem.open_mol(File.join($data_dir, "hypericin.mol")).fingerprint(7, 32)
29
+ assert_operator(32, :<, fp)
30
+ end
31
+
32
+ end
File without changes
File without changes
@@ -1,5 +1,7 @@
1
1
  # $Id: test_sdf.rb 151 2006-02-08 08:21:08Z tanaka $
2
2
 
3
+ require 'test/unit'
4
+ require 'chem'
3
5
  require 'test/type_test'
4
6
  require 'chem/db/types/type_sdf'
5
7
 
@@ -5,38 +5,10 @@ require 'test/all'
5
5
 
6
6
  require 'test/ctab_test'
7
7
 
8
-
9
- class SmilesTest < Test::Unit::TestCase
8
+ class SmilesSampleTest < Test::Unit::TestCase
10
9
 
11
10
  include Chem::CtabTest
12
11
 
13
- def test_cubane
14
- Chem.parse_smiles("C12C3C4C1C5C2C3C45")
15
- end
16
-
17
- def test_atom_types
18
- [
19
- ["H" , {:element => :H}],
20
- ["C" , {:element => :C, :is_aromatic => false, :mass => 12.0107}],
21
- ["c" , {:element => :C, :is_aromatic => true}],
22
- ["se" , {:element => :Se, :is_aromatic => true}],
23
- ["[235U]" , {:element => :U, :mass => 235.0}],
24
- ["[nH]" , {:element => :N, :is_aromatic => true}], # Hydrogen
25
- ["[OH3+]" , {:element => :O, :hydrogen_count => 3}],
26
- ["[Fe2+]" , {:element => :Fe, :charge => 2}],
27
- ["[Fe++]" , {:element => :Fe, :charge => 2}],
28
- ["[13CH4]", {:element => :C, :hydrogen_count => 4, :mass => 13}],
29
- ["[2H]" , {:element => :H, :mass => 2}],
30
- # ["[C@H]" , {:element => :H}],
31
- # ["[C@@H]" , {:element => :H}],
32
- ].each do |sm, prop|
33
- mol = SMILES(sm)
34
- prop.each do |key, val|
35
- assert_equal(val, mol.nodes[0].send(key))
36
- end
37
- end
38
- end
39
-
40
12
  def setup
41
13
  @entries = []
42
14
 
@@ -52,33 +24,77 @@ class SmilesTest < Test::Unit::TestCase
52
24
  "CC(C)C(=O)O",
53
25
  "O=Cl(=O)(=O)[O-]", # Cl(=O)(=O)(=O)[O-]
54
26
  "CCCC(C(=O)O)CCC", # 4-heptanoic acid
27
+
55
28
  # Ring
56
29
  "C1CCCCC1", # Cyclohexane
57
30
  "C1=CCCCC1", # cyclohexene
58
31
  "c12c(cccc1)cccc2", # naphthalene
59
32
  "c1ccccc1c2ccccc2", # biphenyl
60
33
  "C12C3C4C1C5C4C3C25", # Cubane
34
+
61
35
  # Isotopic specification
62
36
  "[C]", # elemental carbon
63
37
  "[12C]", # elemental carbon-12
64
38
  "[13C]", # elemental carbon-13
65
39
  "[13CH4]", # C-13 methane
40
+
66
41
  # Specifying double-bond configuration
67
42
  'F/C=C/F', # trans-difluoroethene
68
43
  'F\C=C\F', # trans-difluoroethene
69
44
  'F/C=C\F', # cis-difluoroethene
70
45
  'F\C=C/F', # cis-difluoroethene
46
+
71
47
  # Specifying tetrahedral chirality
72
48
  "N[C@@H](C)C(=O)O", # L-alanine
73
49
  "N[C@H](C)C(=O)O", # D-alanine
74
50
  "O[C@H]1CCCC[C@H]1O", # cis-resorcinol
75
51
  "C1C[C@H]2CCCC[C@H]CC1", #cis-decaline
52
+
76
53
  # http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=043383,niaid
77
54
  "C1=CC2=C3C(=C1)C=CC4=C3C(=CC5=C4[C@H]([C@H](C=C5)O)O)C=C2",
78
55
  "NC(Cc1c[nH]c2cc[se]c12)C(O)=O", # pointed out by Dr. ktaz
56
+ "S=[Co]",
79
57
  ].each do |smiles|
80
58
  @entries.push(Chem.parse_smiles(smiles))
81
59
  end
82
- # mass : NUMBER
60
+ # mass : NUMBER
83
61
  end
84
62
  end
63
+
64
+ class SmilesTest < Test::Unit::TestCase
65
+
66
+ def test_cubane
67
+ Chem.parse_smiles("C12C3C4C1C5C2C3C45")
68
+ end
69
+
70
+ def test_atom_types
71
+ [
72
+ ["H" , {:element => :H}],
73
+ ["C" , {:element => :C, :is_aromatic => false, :mass => 12.0107}],
74
+ ["c" , {:element => :C, :is_aromatic => true}],
75
+ ["[se]" , {:element => :Se, :is_aromatic => true}],
76
+ ["[235U]" , {:element => :U, :mass => 235.0}],
77
+ ["[nH]" , {:element => :N, :is_aromatic => true}], # Hydrogen
78
+ ["[OH3+]" , {:element => :O, :hydrogen_count => 3}],
79
+ ["[Fe2+]" , {:element => :Fe, :charge => 2}],
80
+ ["[Fe++]" , {:element => :Fe, :charge => 2}],
81
+ ["[13CH4]", {:element => :C, :hydrogen_count => 4, :mass => 13}],
82
+ ["[2H]" , {:element => :H, :mass => 2}],
83
+ # ["[C@H]" , {:element => :H}],
84
+ # ["[C@@H]" , {:element => :H}],
85
+ ].each do |sm, prop|
86
+ mol = SMILES(sm)
87
+ prop.each do |key, val|
88
+ assert_equal(val, mol.nodes[0].send(key))
89
+ end
90
+ end
91
+ end
92
+
93
+ def test_co
94
+ # Not cobalt
95
+ comp = Chem.parse_smiles("O=CO").composition
96
+ assert_equal(2, comp[:O])
97
+ assert_equal(1, comp[:C])
98
+ end
99
+
100
+ end
@@ -0,0 +1 @@
1
+ # $
File without changes
@@ -0,0 +1,59 @@
1
+ # $Id: test_subcomp.rb 160 2006-02-14 06:49:37Z tanaka $
2
+
3
+ require 'test/unit'
4
+ require 'test/all'
5
+
6
+ require 'chem'
7
+
8
+ class SubcompTest < Test::Unit::TestCase
9
+
10
+
11
+ def test_bit_matrix
12
+ [
13
+ [31, 1],
14
+ [32, 1],
15
+ [33, 2],
16
+ [63, 2],
17
+ [64, 2],
18
+ [65, 3],
19
+ ].each do |bits, bytes|
20
+ assert_equal(bytes, Chem::BitMatrix.new(bits, bits).n_bytes)
21
+ end
22
+
23
+ bm = Chem::BitMatrix.new(40, 40)
24
+ 0.upto(39) do |n|
25
+ bm.set(n, n)
26
+ end
27
+ end
28
+
29
+ def test_db_store
30
+ # db = Chem::CompoundDB.new("test")
31
+
32
+ # 1.upto(10) do |n|
33
+ # filename = MolDir % n
34
+ # next if not File.exist?(filename)
35
+ # mol = Chem.open_mol(filename)
36
+ # db_id = db.store(mol)
37
+ # puts db_id
38
+ # end
39
+
40
+ # db.close
41
+
42
+ # assert_raises(Exception) do
43
+ # Chem.db_search("Unexpectedly_Very_Long_File_Name_So_Please_Please_Raise_Error_Or_Program_will_Cause_Memory_Leak_It_Could_Be_Serious_Security_Problem", nil)
44
+ # end
45
+
46
+ # query = Chem.open_mol(MolDir % 147)
47
+ # Chem.db_search("test", query) # { |mol| puts "found : %d" % mol }
48
+
49
+ # target = Chem.open_mol(MolDir % 4307)
50
+ # hash = query.match(target){ |q, t|
51
+ # q.element == t.element
52
+ # false
53
+ # }
54
+ # p hash
55
+ # p Chem.match_by_ullmann(query, target)
56
+ end
57
+
58
+ end
59
+
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ require 'test/unit'
2
+ require 'test/all'
3
+ require 'rubygems'
4
+
5
+ # require 'test/tc_drugbank'
6
+ # require 'test/tc_develop.rb'
7
+ #require 'test/tc_kegg.rb'
8
+ #require 'test/tc_pubchem.rb'
9
+ require 'test/tc_openbabel'
10
+ #require 'test/tc_cdk'
11
+ #require 'test/tc_mdl.rb'
@@ -0,0 +1,6 @@
1
+ require 'test/unit'
2
+ require 'tc_gd'
3
+ require 'tc_rmagick'
4
+ require 'tc_pdf'
5
+ require 'tc_eps'
6
+ require 'tc_writer'
@@ -0,0 +1,12 @@
1
+ require 'test/unit'
2
+
3
+ Dir.glob("test/tc_*").reject{|file|
4
+ [
5
+ "test/tc_net.rb",
6
+ "test/tc_develop.rb"
7
+ ].include?(file)
8
+ }.each do |test|
9
+ require test[0..-(File.extname(test).length + 1)]
10
+ end
11
+
12
+ require 'test/tc_sssr'
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: chemruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.3
7
- date: 2006-02-12
6
+ version: 1.1.9
7
+ date: 2007-12-10 00:00:00 +09:00
8
8
  summary: A framework program for cheminformatics
9
9
  require_paths:
10
10
  - lib
@@ -23,256 +23,321 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
23
23
  version: 0.0.0
24
24
  version:
25
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
26
29
  authors: []
27
30
 
28
31
  files:
29
32
  - Rakefile
30
33
  - README
31
34
  - setup.rb
32
- - lib/chem.rb
33
35
  - lib/graph.rb
34
- - lib/chem/appl.rb
36
+ - lib/chem.rb
37
+ - lib/graph/cluster.rb
38
+ - lib/graph/utils.rb
39
+ - lib/graph/morgan.rb
35
40
  - lib/chem/data.rb
36
- - lib/chem/db.rb
41
+ - lib/chem/utils/fingerprint.rb
42
+ - lib/chem/utils/prop.rb
43
+ - lib/chem/utils/net.rb
44
+ - lib/chem/utils/geometry.rb
45
+ - lib/chem/utils/traverse.rb
46
+ - lib/chem/utils/bitdb.rb
47
+ - lib/chem/utils/transform.rb
48
+ - lib/chem/utils/once.rb
49
+ - lib/chem/utils/ullmann.rb
50
+ - lib/chem/utils/cas.rb
51
+ - lib/chem/utils/sssr.rb
52
+ - lib/chem/utils/sub.rb
53
+ - lib/chem/utils/cdk.rb
54
+ - lib/chem/utils/math.rb
55
+ - lib/chem/utils/openbabel.rb
37
56
  - lib/chem/model.rb
38
- - lib/chem/utils.rb
39
57
  - lib/chem/appl/chem3dole.rb
40
58
  - lib/chem/appl/tinker/nucleic.rb
41
59
  - lib/chem/appl/tinker/tinker_reader.rb
42
- - lib/chem/data/atomic_weight.rb
43
- - lib/chem/data/character.rb
44
- - lib/chem/data/electronegativity.rb
45
- - lib/chem/data/periodic_table.rb
46
- - lib/chem/data/prime_numbers.rb
47
- - lib/chem/data/vdw_radii.rb
48
- - lib/chem/db/cansmi.rb
49
- - lib/chem/db/cdx.rb
50
- - lib/chem/db/eps.rb
51
- - lib/chem/db/g98.rb
52
- - lib/chem/db/gspan.rb
53
- - lib/chem/db/iupac.rb
54
- - lib/chem/db/kcf.rb
55
- - lib/chem/db/kcf_glycan.rb
56
- - lib/chem/db/kegg.rb
57
- - lib/chem/db/mdl.rb
58
- - lib/chem/db/molconnz.rb
59
- - lib/chem/db/mopac.rb
60
- - lib/chem/db/msi.rb
61
- - lib/chem/db/pdb_dic.rb
62
- - lib/chem/db/pdf.rb
63
- - lib/chem/db/pubchem.rb
64
- - lib/chem/db/rmagick.rb
65
- - lib/chem/db/sdf.rb
66
- - lib/chem/db/smbl.rb
67
60
  - lib/chem/db/smiles.rb
68
- - lib/chem/db/swf.rb
69
- - lib/chem/db/sybyl.rb
70
- - lib/chem/db/tinker.rb
71
- - lib/chem/db/vector.rb
72
- - lib/chem/db/xyz.rb
73
- - lib/chem/db/iupac/a_1.rb
74
61
  - lib/chem/db/iupac/iuparser.rb
75
62
  - lib/chem/db/iupac/postfix.rb
76
- - lib/chem/db/linucs/linparser.rb
77
- - lib/chem/db/smiles/smiparser.rb
78
- - lib/chem/db/types/type_cansmi.rb
63
+ - lib/chem/db/iupac/a_1.rb
79
64
  - lib/chem/db/types/type_cdx.rb
65
+ - lib/chem/db/types/type_mdl.rb
66
+ - lib/chem/db/types/type_kcf_glycan.rb
80
67
  - lib/chem/db/types/type_gspan.rb
68
+ - lib/chem/db/types/type_xyz.rb
81
69
  - lib/chem/db/types/type_kcf.rb
82
- - lib/chem/db/types/type_kcf_glycan.rb
83
70
  - lib/chem/db/types/type_kegg.rb
84
- - lib/chem/db/types/type_mdl.rb
71
+ - lib/chem/db/types/type_cansmi.rb
72
+ - lib/chem/db/types/type_gd.rb
73
+ - lib/chem/db/types/type_sybyl.rb
74
+ - lib/chem/db/types/type_rdf.rb
85
75
  - lib/chem/db/types/type_pdf.rb
86
76
  - lib/chem/db/types/type_png.rb
87
- - lib/chem/db/types/type_rxn.rb
88
77
  - lib/chem/db/types/type_sdf.rb
89
- - lib/chem/db/types/type_sybyl.rb
90
- - lib/chem/db/types/type_xyz.rb
78
+ - lib/chem/db/types/type_rxn.rb
79
+ - lib/chem/db/pubchem.rb
80
+ - lib/chem/db/eps.rb
81
+ - lib/chem/db/pdb_dic.rb
82
+ - lib/chem/db/mopac.rb
83
+ - lib/chem/db/sdf.rb
84
+ - lib/chem/db/cansmi.rb
85
+ - lib/chem/db/g98.rb
86
+ - lib/chem/db/mdl.rb
87
+ - lib/chem/db/cml.rb
88
+ - lib/chem/db/swf.rb
89
+ - lib/chem/db/gspan.rb
90
+ - lib/chem/db/gd.rb
91
+ - lib/chem/db/opsin.rb
92
+ - lib/chem/db/tinker.rb
93
+ - lib/chem/db/sybyl.rb
94
+ - lib/chem/db/xyz.rb
95
+ - lib/chem/db/smbl.rb
96
+ - lib/chem/db/pdb.rb
97
+ - lib/chem/db/smiles/smiparser.rb
98
+ - lib/chem/db/kcf_rpair.rb
99
+ - lib/chem/db/linucs/linparser.rb
100
+ - lib/chem/db/vector.rb
101
+ - lib/chem/db/molconnz.rb
102
+ - lib/chem/db/cdx.rb
103
+ - lib/chem/db/kcf_glycan.rb
104
+ - lib/chem/db/kcf.rb
105
+ - lib/chem/db/msi.rb
106
+ - lib/chem/db/iupac.rb
107
+ - lib/chem/db/pdf.rb
108
+ - lib/chem/db/rmagick.rb
109
+ - lib/chem/db/kegg.rb
110
+ - lib/chem/utils.rb
111
+ - lib/chem/db.rb
112
+ - lib/chem/data/vdw_radii.rb
113
+ - lib/chem/data/electronegativity.rb
114
+ - lib/chem/data/character.rb
115
+ - lib/chem/data/prime_numbers.rb
116
+ - lib/chem/data/atomic_weight.rb
117
+ - lib/chem/data/periodic_table.rb
91
118
  - lib/chem/model/skeleton.rb
92
- - lib/chem/utils/geometry.rb
93
- - lib/chem/utils/graph_db.rb
94
- - lib/chem/utils/math.rb
95
- - lib/chem/utils/prop.rb
96
- - lib/chem/utils/sssr.rb
97
- - lib/chem/utils/sub.rb
98
- - lib/chem/utils/transform.rb
99
- - lib/chem/utils/traverse.rb
100
- - lib/chem/utils/ullmann.rb
101
- - lib/graph/cluster.rb
102
- - lib/graph/morgan.rb
119
+ - lib/chem/appl.rb
103
120
  - lib/chem/db/iupac/iuparser.ry
104
- - lib/chem/db/linucs/linucs.ry
105
121
  - lib/chem/db/smiles/smiles.ry
106
- - test/all.rb
107
- - test/coord_test.rb
108
- - test/ctab_test.rb
109
- - test/data
122
+ - lib/chem/db/linucs/linucs.ry
123
+ - test/tc_subcomp.rb
124
+ - test/tc_mdl.rb
125
+ - test/tc_kcf_glycan.rb
126
+ - test/tc_sub.rb
127
+ - test/tc_morgan.rb
128
+ - test/tc_openbabel.rb
129
+ - test/tc_iupac.rb
130
+ - test/tc_db.rb
131
+ - test/tc_kegg.rb
110
132
  - test/heavy_test_pubchem.rb
133
+ - test/tc_cluster.rb
134
+ - test/tc_gspan.rb
135
+ - test/tc_once.rb
136
+ - test/tc_canonical_smiles.rb
137
+ - test/coord_test.rb
138
+ - test/ts_current.rb
139
+ - test/all.rb
111
140
  - test/multiple_test.rb
112
- - test/test_adj.rb
113
- - test/test_canonical_smiles.rb
114
- - test/test_cdx.rb
115
- - test/test_chem.rb
116
- - test/test_cluster.rb
117
- - test/test_db.rb
118
- - test/test_eps.rb
119
- - test/test_geometry.rb
120
- - test/test_gspan.rb
121
- - test/test_iupac.rb
122
- - test/test_kcf.rb
123
- - test/test_kcf_glycan.rb
124
- - test/test_kegg.rb
125
- - test/test_linucs.rb
126
- - test/test_mdl.rb
127
- - test/test_mol2.rb
128
- - test/test_morgan.rb
129
- - test/test_pdf.rb
130
- - test/test_prop.rb
131
- - test/test_rmagick.rb
132
- - test/test_sbdb.rb
133
- - test/test_sdf.rb
134
- - test/test_smiles.rb
135
- - test/test_sssr.rb
136
- - test/test_sub.rb
137
- - test/test_subcomp.rb
138
- - test/test_traverse.rb
139
- - test/test_writer.rb
140
- - test/test_xyz.rb
141
+ - test/tc_eps.rb
142
+ - test/tc_sssr.rb
143
+ - test/ts_main.rb
144
+ - test/tc_smiles.rb
145
+ - test/tc_xyz.rb
146
+ - test/ts_image.rb
147
+ - test/tc_drugbank.rb
148
+ - test/tc_mol2.rb
149
+ - test/tc_cdk.rb
150
+ - test/tc_casrn.rb
151
+ - test/tc_writer.rb
152
+ - test/tc_adj.rb
153
+ - test/tc_pdf.rb
154
+ - test/tc_gd.rb
155
+ - test/tc_pubchem.rb
156
+ - test/tc_kcf.rb
157
+ - test/tc_net.rb
141
158
  - test/type_test.rb
142
- - test/data/A_21
143
- - test/data/A_21.tar.gz
144
- - test/data/atp.mol
145
- - test/data/C00147.kcf
159
+ - test/tc_graph.rb
160
+ - test/tc_develop.rb
161
+ - test/tc_prop.rb
162
+ - test/tc_sbdb.rb
163
+ - test/data
146
164
  - test/data/cyclohexane.mol
147
- - test/data/cyclohexane.ps
148
- - test/data/fullerene.mol
149
- - test/data/G00147.kcf
150
- - test/data/glycan
151
- - test/data/hypericin.cdx
152
- - test/data/hypericin.cdxml
153
- - test/data/hypericin.chm
154
- - test/data/hypericin.ct
155
- - test/data/hypericin.f1d
156
- - test/data/hypericin.f1q
157
- - test/data/hypericin.gif
158
165
  - test/data/hypericin.mol
159
- - test/data/hypericin.mol2
160
- - test/data/hypericin.msm
161
- - test/data/hypericin.pdf
162
- - test/data/hypericin.png
163
- - test/data/hypericin.ps
164
- - test/data/hypericin.skc
165
- - test/data/hypericin2.gif
166
- - test/data/hypericin2.ps
167
- - test/data/kegg
168
- - test/data/reaction
169
- - test/data/reaction.lst
170
- - test/data/reaction_mapformula.lst
171
- - test/data/rxn
172
- - test/data/test.eps
173
- - test/data/test.mol
174
- - test/data/test.sdf
166
+ - test/data/G00147.kcf
175
167
  - test/data/test.skc
168
+ - test/data/hypericin.f1d
176
169
  - test/data/test.xyz
177
- - test/data/test_lf.sdf
178
- - test/data/A_21/aceanthrylene.cdx
179
- - test/data/A_21/aceanthrylene.mol
170
+ - test/data/A_21
171
+ - test/data/A_21/azulene.mol
172
+ - test/data/A_21/naphthalene.mol
180
173
  - test/data/A_21/acenaphthylene.cdx
181
- - test/data/A_21/acenaphthylene.mol
182
- - test/data/A_21/acephenanthrylene.cdx
174
+ - test/data/A_21/tetraphenylene.mol
175
+ - test/data/A_21/picene.mol
176
+ - test/data/A_21/trinaphthylene.mol
183
177
  - test/data/A_21/acephenanthrylene.mol
184
- - test/data/A_21/anthracene.cdx
185
- - test/data/A_21/anthracene.mol
186
- - test/data/A_21/as-indacene.cdx
187
- - test/data/A_21/as-indacene.mol
188
- - test/data/A_21/azulene.cdx
189
- - test/data/A_21/azulene.mol
190
- - test/data/A_21/biphenylene.cdx
191
178
  - test/data/A_21/biphenylene.mol
179
+ - test/data/A_21/pleiadene.cdx
180
+ - test/data/A_21/phenanthrene.cdx
181
+ - test/data/A_21/ovalene.mol
182
+ - test/data/A_21/acephenanthrylene.cdx
183
+ - test/data/A_21/rubicene.cdx
184
+ - test/data/A_21/tetraphenylene.cdx
185
+ - test/data/A_21/anthracene.mol
186
+ - test/data/A_21/rubicene.mol
192
187
  - test/data/A_21/chrysene.cdx
193
- - test/data/A_21/chrysene.mol
194
- - test/data/A_21/coronen.cdx
195
- - test/data/A_21/coronen.mol
196
- - test/data/A_21/fluoranthene.cdx
197
- - test/data/A_21/fluoranthene.mol
198
- - test/data/A_21/fluorene.cdx
188
+ - test/data/A_21/azulene.cdx
189
+ - test/data/A_21/pentalene.mol
190
+ - test/data/A_21/acenaphthylene.mol
191
+ - test/data/A_21/perylene.mol
192
+ - test/data/A_21/phenalene.mol
193
+ - test/data/A_21/phenanthrene.mol
194
+ - test/data/A_21/iupac.txt
195
+ - test/data/A_21/pyrene.cdx
196
+ - test/data/A_21/pyranthrene.cdx
199
197
  - test/data/A_21/fluorene.mol
200
- - test/data/A_21/heptacene.cdx
201
- - test/data/A_21/heptacene.mol
202
- - test/data/A_21/heptalene.cdx
203
- - test/data/A_21/heptalene.mol
204
- - test/data/A_21/heptaphene.cdx
205
- - test/data/A_21/heptaphene.mol
206
- - test/data/A_21/hexacene.cdx
198
+ - test/data/A_21/perylene.cdx
199
+ - test/data/A_21/fluoranthene.mol
200
+ - test/data/A_21/picene.cdx
201
+ - test/data/A_21/as-indacene.cdx
202
+ - test/data/A_21/naphthacene.cdx
207
203
  - test/data/A_21/hexacene.mol
208
- - test/data/A_21/hexaphene.cdx
209
- - test/data/A_21/hexaphene.mol
210
204
  - test/data/A_21/indene.cdx
205
+ - test/data/A_21/triphenylene.mol
206
+ - test/data/A_21/coronen.mol
207
+ - test/data/A_21/heptacene.cdx
208
+ - test/data/A_21/triphenylene.cdx
209
+ - test/data/A_21/pentacene.cdx
210
+ - test/data/A_21/s-indacene.cdx
211
+ - test/data/A_21/s-indacene.mol
212
+ - test/data/A_21/ovalene.cdx
213
+ - test/data/A_21/fluorene.cdx
214
+ - test/data/A_21/heptaphene.cdx
211
215
  - test/data/A_21/indene.mol
212
- - test/data/A_21/iupac.txt
213
- - test/data/A_21/naphthacene.cdx
216
+ - test/data/A_21/aceanthrylene.mol
217
+ - test/data/A_21/heptacene.mol
218
+ - test/data/A_21/pentaphene.mol
219
+ - test/data/A_21/pentalene.cdx
220
+ - test/data/A_21/coronen.cdx
214
221
  - test/data/A_21/naphthacene.mol
222
+ - test/data/A_21/aceanthrylene.cdx
223
+ - test/data/A_21/pleiadene.mol
215
224
  - test/data/A_21/naphthalene.cdx
216
- - test/data/A_21/naphthalene.mol
217
- - test/data/A_21/ovalene.cdx
218
- - test/data/A_21/ovalene.mol
219
- - test/data/A_21/pentacene.cdx
220
- - test/data/A_21/pentacene.mol
221
- - test/data/A_21/pentalene.cdx
222
- - test/data/A_21/pentalene.mol
223
225
  - test/data/A_21/pentaphene.cdx
224
- - test/data/A_21/pentaphene.mol
225
- - test/data/A_21/perylene.cdx
226
- - test/data/A_21/perylene.mol
226
+ - test/data/A_21/trinaphthylene.cdx
227
227
  - test/data/A_21/phenalene.cdx
228
- - test/data/A_21/phenalene.mol
229
- - test/data/A_21/phenanthrene.cdx
230
- - test/data/A_21/phenanthrene.mol
231
- - test/data/A_21/picene.cdx
232
- - test/data/A_21/picene.mol
233
- - test/data/A_21/pleiadene.cdx
234
- - test/data/A_21/pleiadene.mol
235
- - test/data/A_21/pyranthrene.cdx
228
+ - test/data/A_21/biphenylene.cdx
236
229
  - test/data/A_21/pyranthrene.mol
237
- - test/data/A_21/pyrene.cdx
230
+ - test/data/A_21/heptaphene.mol
231
+ - test/data/A_21/pentacene.mol
232
+ - test/data/A_21/fluoranthene.cdx
233
+ - test/data/A_21/chrysene.mol
234
+ - test/data/A_21/anthracene.cdx
238
235
  - test/data/A_21/pyrene.mol
239
- - test/data/A_21/rubicene.cdx
240
- - test/data/A_21/rubicene.mol
241
- - test/data/A_21/s-indacene.cdx
242
- - test/data/A_21/s-indacene.mol
243
- - test/data/A_21/tetraphenylene.cdx
244
- - test/data/A_21/tetraphenylene.mol
245
- - test/data/A_21/trinaphthylene.cdx
246
- - test/data/A_21/trinaphthylene.mol
247
- - test/data/A_21/triphenylene.cdx
248
- - test/data/A_21/triphenylene.mol
249
- - test/data/kegg/genomes
236
+ - test/data/A_21/heptalene.mol
237
+ - test/data/A_21/hexaphene.mol
238
+ - test/data/A_21/hexacene.cdx
239
+ - test/data/A_21/as-indacene.mol
240
+ - test/data/A_21/hexaphene.cdx
241
+ - test/data/A_21/heptalene.cdx
242
+ - test/data/reaction
243
+ - test/data/test.sdf
244
+ - test/data/hypericin.ct
245
+ - test/data/hypericin.pdf
246
+ - test/data/A_21.tar.gz
247
+ - test/data/CID_704.sdf
248
+ - test/data/hypericin2.gif
249
+ - test/data/hypericin.png
250
+ - test/data/rosiglitazone.mol
251
+ - test/data/troglitazone.mol
252
+ - test/data/hypericin.chm
253
+ - test/data/reaction_mapformula.lst
254
+ - test/data/db_EXPT03276.txt
255
+ - test/data/atp.mol
256
+ - test/data/C00147.kcf
257
+ - test/data/hypericin.gif
258
+ - test/data/thiazolidinedione.mol
259
+ - test/data/hypericin.cdxml
260
+ - test/data/kegg
250
261
  - test/data/kegg/ligand
251
- - test/data/kegg/genomes/hsa
252
- - test/data/kegg/genomes/hsa/hsa_enzyme.list
253
- - test/data/kegg/genomes/hsa/hsa_pfam.list
254
- - test/data/kegg/ligand/mol
255
262
  - test/data/kegg/ligand/reaction
256
- - test/data/kegg/ligand/reaction.lst
257
- - test/data/kegg/ligand/reaction_mapformula.lst
263
+ - test/data/kegg/ligand/mol
258
264
  - test/data/kegg/ligand/mol/C00147.mol
259
- - test/data/rxn/C00001.mol
260
- - test/data/rxn/C00011.mol
261
- - test/data/rxn/C00014.mol
265
+ - test/data/kegg/ligand/reaction_mapformula.lst
266
+ - test/data/kegg/ligand/reaction.lst
267
+ - test/data/kegg/genomes
268
+ - test/data/kegg/genomes/hsa
269
+ - test/data/kegg/genomes/hsa/hsa_pfam.list
270
+ - test/data/kegg/genomes/hsa/hsa_enzyme.list
271
+ - test/data/hypericin.f1q
272
+ - test/data/test.mol
273
+ - test/data/hypericin.cdx
274
+ - test/data/fullerene.mol
275
+ - test/data/rxn
262
276
  - test/data/rxn/C01010.mol
263
277
  - test/data/rxn/sample.rxn
278
+ - test/data/rxn/C00011.mol
279
+ - test/data/rxn/C00014.mol
280
+ - test/data/rxn/C00001.mol
264
281
  - test/data/rxn/substitution.rxn
282
+ - test/data/hypericin.ps
283
+ - test/data/glycan
284
+ - test/data/test_lf.sdf
285
+ - test/data/hypericin.skc
286
+ - test/data/test.eps
287
+ - test/data/hypericin.mol2
288
+ - test/data/hypericin2.ps
289
+ - test/data/pioglitazone.mol
290
+ - test/data/CID_994.sdf
291
+ - test/data/hypericin.msm
292
+ - test/data/reaction.lst
293
+ - test/data/cyclohexane.ps
294
+ - test/tc_cdx.rb
295
+ - test/ctab_test.rb
296
+ - test/tc_traverse.rb
297
+ - test/tc_geometry.rb
298
+ - test/tc_linucs.rb
299
+ - test/tc_rmagick.rb
300
+ - test/tc_sdf.rb
301
+ - test/tc_chem.rb
302
+ - temp/
303
+ - sample/pubchem_fetch.rb
304
+ - sample/generate_substructurekey.rb
305
+ - sample/pubchem_search.rb
306
+ - sample/mol2pdf.rb
307
+ - sample/structure_match.rb
308
+ - sample/find_compound_by_keggapi.rb
309
+ - sample/calc_properties.rb
310
+ - sample/smarts.rb
265
311
  - sample/frequent_subgraph.rb
266
- - sample/kegg_db.rb
312
+ - sample/logp.rb
313
+ - sample/calc_maximum_common_subgraph.rb
314
+ - sample/structure_match_color.rb
315
+ - sample/vicinity.rb
267
316
  - sample/images/ex1.rb
268
- - sample/images/ex2.rb
317
+ - sample/images/ex7.rb
318
+ - sample/images/ex6.rb
269
319
  - sample/images/ex3.rb
270
- - sample/images/ex4.rb
271
320
  - sample/images/ex5.rb
272
- - sample/images/mol/adenine.mol
321
+ - sample/images/ex4.rb
322
+ - sample/images/ex2.rb
323
+ - sample/generate_inchi.rb
324
+ - sample/kegg_db.rb
325
+ - sample/kekule.rb
326
+ - sample/mcs.rb
327
+ - sample/iupac2mol.rb
328
+ - sample/rosiglitazone.mol
329
+ - sample/troglitazone.mol
273
330
  - sample/images/mol/atp.mol
331
+ - sample/images/mol/adenine.mol
274
332
  - sample/images/temp/ex5.mol
333
+ - sample/thiazolidinedione.mol
334
+ - sample/data/rosiglitazone.mol
335
+ - sample/data/troglitazone.mol
336
+ - sample/data/atp.mol
337
+ - sample/data/pioglitazone.mol
338
+ - ext/utils.h
275
339
  - ext/subcomp.c
340
+ - ext/utils.c
276
341
  - ext/extconf.rb
277
342
  test_files: []
278
343