hydrogen_bondifier 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.gitignore +3 -0
  2. data/History +9 -0
  3. data/LICENSE +23 -0
  4. data/README.rdoc +67 -0
  5. data/Rakefile +54 -0
  6. data/VERSION +1 -0
  7. data/bin/hydrogen_bondifier.rb +159 -0
  8. data/lib/hydrogen_bondifier/utils.rb +39 -0
  9. data/lib/pymol/connections.rb +55 -0
  10. data/lib/pymol/hydrogen_bonds.rb +157 -0
  11. data/lib/pymol/orientation.rb +23 -0
  12. data/lib/pymol/surface.rb +35 -0
  13. data/lib/pymol.rb +93 -0
  14. data/reference/all_connections.py +24 -0
  15. data/reference/campbell_find_hb.py +18 -0
  16. data/reference/list_hbonds.py +47 -0
  17. data/reference/test_pymol.rb +125 -0
  18. data/spec/pymol/connections_spec.rb +25 -0
  19. data/spec/pymol/hydrogen_bonds_spec.rb +38 -0
  20. data/spec/pymol/surface_spec.rb +47 -0
  21. data/spec/pymol_spec.rb +41 -0
  22. data/spec/scripts/confirm_angle_and_h_dist.rb +126 -0
  23. data/spec/scripts/confirm_distances.rb +83 -0
  24. data/spec/scripts/mins.rb +9 -0
  25. data/spec/scripts/obj_ranges.rb +22 -0
  26. data/spec/scripts/pdb_ranges.rb +30 -0
  27. data/spec/spec_helper.rb +6 -0
  28. data/spec/testfiles/1YQS.pdb +6655 -0
  29. data/spec/testfiles/1YQS_h_added.pdb +7924 -0
  30. data/spec/testfiles/2ERK_Hbond.out +302 -0
  31. data/spec/testfiles/2pERK2_HBOND.out +303 -0
  32. data/spec/testfiles/2pERK2_Hadded.pdb +5767 -0
  33. data/spec/testfiles/2pERK2_dis-surf.txt +330 -0
  34. data/spec/testfiles/little.pdb +210 -0
  35. data/validation/jtp_vs_insight_angles.png +0 -0
  36. data/validation/jtp_vs_insight_distances.png +0 -0
  37. data/validation/jtp_vs_insight_surface_distances.png +0 -0
  38. data/validation/jtp_vs_insight_surface_distances_aa_geometric.png +0 -0
  39. data/validation/jtp_vs_insight_surface_distances_center_of_grav.png +0 -0
  40. data/validation/jtp_vs_insight_surface_distances_closest_atom.png +0 -0
  41. metadata +113 -0
@@ -0,0 +1,22 @@
1
+
2
+ x = []
3
+ y = []
4
+ z = []
5
+ all = [x,y,z]
6
+
7
+ IO.foreach(ARGV.shift) do |line|
8
+ if line =~ /^v\s+/
9
+ (_, *coords) = line.chomp.split(/\s+/)
10
+ coords.zip(all) do |coord, ar|
11
+ ar << coord.to_f
12
+ end
13
+ end
14
+ end
15
+
16
+ mins = all.map {|ar| ar.min }
17
+ maxs = all.map {|ar| ar.max }
18
+
19
+ p mins
20
+ p maxs
21
+
22
+ p mins.zip(maxs).map {|mn, mx| mx - mn }
@@ -0,0 +1,30 @@
1
+ require 'bio/db/pdb'
2
+
3
+ pdb = Bio::PDB.new(IO.read(ARGV.shift))
4
+
5
+
6
+ x = []
7
+ y = []
8
+ z = []
9
+
10
+ all = [x,y,z]
11
+
12
+ pdb.each do |model|
13
+ model.each do |chain|
14
+ chain.each do |residue|
15
+ residue.each do |atom|
16
+ atom.xyz.to_a.zip(all) do |v, ar|
17
+ ar << v
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ maxs = all.map {|v| v.max }
25
+ mins = all.map {|v| v.min }
26
+
27
+ p maxs
28
+ p mins
29
+
30
+ p mins.zip(maxs).map {|mn, mx| mx - mn }
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'spec/more'
3
+
4
+ TESTFILES = File.expand_path(File.dirname(__FILE__) + '/testfiles')
5
+
6
+ Bacon.summary_on_exit