hydrogen_bondifier 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/History +9 -0
- data/LICENSE +23 -0
- data/README.rdoc +67 -0
- data/Rakefile +54 -0
- data/VERSION +1 -0
- data/bin/hydrogen_bondifier.rb +159 -0
- data/lib/hydrogen_bondifier/utils.rb +39 -0
- data/lib/pymol/connections.rb +55 -0
- data/lib/pymol/hydrogen_bonds.rb +157 -0
- data/lib/pymol/orientation.rb +23 -0
- data/lib/pymol/surface.rb +35 -0
- data/lib/pymol.rb +93 -0
- data/reference/all_connections.py +24 -0
- data/reference/campbell_find_hb.py +18 -0
- data/reference/list_hbonds.py +47 -0
- data/reference/test_pymol.rb +125 -0
- data/spec/pymol/connections_spec.rb +25 -0
- data/spec/pymol/hydrogen_bonds_spec.rb +38 -0
- data/spec/pymol/surface_spec.rb +47 -0
- data/spec/pymol_spec.rb +41 -0
- data/spec/scripts/confirm_angle_and_h_dist.rb +126 -0
- data/spec/scripts/confirm_distances.rb +83 -0
- data/spec/scripts/mins.rb +9 -0
- data/spec/scripts/obj_ranges.rb +22 -0
- data/spec/scripts/pdb_ranges.rb +30 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/testfiles/1YQS.pdb +6655 -0
- data/spec/testfiles/1YQS_h_added.pdb +7924 -0
- data/spec/testfiles/2ERK_Hbond.out +302 -0
- data/spec/testfiles/2pERK2_HBOND.out +303 -0
- data/spec/testfiles/2pERK2_Hadded.pdb +5767 -0
- data/spec/testfiles/2pERK2_dis-surf.txt +330 -0
- data/spec/testfiles/little.pdb +210 -0
- data/validation/jtp_vs_insight_angles.png +0 -0
- data/validation/jtp_vs_insight_distances.png +0 -0
- data/validation/jtp_vs_insight_surface_distances.png +0 -0
- data/validation/jtp_vs_insight_surface_distances_aa_geometric.png +0 -0
- data/validation/jtp_vs_insight_surface_distances_center_of_grav.png +0 -0
- data/validation/jtp_vs_insight_surface_distances_closest_atom.png +0 -0
- 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 }
|