Molecular Modeling Software
リビジョン | 80ee1f456c2ade0868dad345ea6182afeeb15f60 (tree) |
---|---|
日時 | 2019-08-17 13:11:25 |
作者 | toshinagata1964 <toshinagata1964@a2be...> |
コミッター | toshinagata1964 |
NO2, SO (sulfonyl) and SO3H (sulfonic acid) are now recognized as known fragments.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@622 a2be9bc6-48de-4e38-9406-05402d4bc13c
@@ -209,7 +209,7 @@ class Molecule | ||
209 | 209 | sd = self.find_dummy_atoms |
210 | 210 | len2 = sd.length |
211 | 211 | if len2 < mult |
212 | - raise "Self has too few dummy atoms (#{len2}) to connect the given molecule (#{mult} bond order)" | |
212 | + raise "self has too few dummy atoms (#{len2}) to connect the given molecule (#{mult} bond order)" | |
213 | 213 | elsif len2 > mult |
214 | 214 | sd.shift # Keep the first dummy atom untouched |
215 | 215 | sd.slice!(mult..-1) |
@@ -499,9 +499,9 @@ class Molecule | ||
499 | 499 | end |
500 | 500 | |
501 | 501 | # Define atom fragments |
502 | - elements = %w(C H Li Be B C N O F Na Mg Al Si P S Cl) | |
503 | - valences = [4,1,1,2,3,4,3,2,1,1,2,3,4,3,2,1] | |
504 | - degrees = {"N"=>100, "O"=>110, "P"=>95, "S"=>108} | |
502 | + elements = %w(C H Li Be B C N O F Na Mg Al Si P S Cl Zn Ga Ge As Se Br Cd In Sn Sb Te I Hg Tl Pb Bi) | |
503 | + valences = [4,1,1, 2, 3,4,3,2,1,1, 2, 3, 4, 3,2,1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1,2, 3, 4, 3] | |
504 | + degrees = {"N"=>100, "O"=>110, "P"=>95, "S"=>108, "As"=>92, "Se"=>91, "Sb"=>92, "Te"=>90, "Bi"=>90} | |
505 | 505 | elements.each_index { |i| |
506 | 506 | name = elements[i] |
507 | 507 | angle = degrees[name] |
@@ -82,20 +82,35 @@ class Molecule | ||
82 | 82 | ["MX4 tetrahedral", "coordination/MX4t.mbsf"], |
83 | 83 | ["MX4 square-planar", "coordination/MX4p.mbsf"], |
84 | 84 | ["MX5 trigonal bipyramidal", "coordination/MX5.mbsf"], |
85 | - ["MX6 octahedral", "coordination/MX6.mbsf"] | |
85 | + ["MX6 octahedral", "coordination/MX6.mbsf"], | |
86 | + | |
87 | + "...", | |
88 | + ["NO2", "fragments/NO2.mbsf", "H1"], | |
89 | + ["SO2O", "fragments/SO3H.mbsf", "H1", "H2"], | |
90 | + ["SO3", "fragments/SO3H.mbsf", "H1", "H2"], | |
91 | + ["SO3H", "fragments/SO3H.mbsf", "H1"], | |
92 | + ["SO", "fragments/SO.mbsf", "H1", "H2"] | |
86 | 93 | ] |
87 | 94 | |
88 | 95 | $named_fragments = [] |
96 | + subtitle = nil | |
89 | 97 | |
90 | 98 | table.each { |t| |
91 | 99 | if t.is_a?(String) |
92 | - $named_fragments.push([t, "-"]) # Subtitle | |
100 | + if t != "..." | |
101 | + subtitle = t | |
102 | + $named_fragments.push([t, "-"]) # Subtitle | |
103 | + else | |
104 | + subtitle = nil | |
105 | + end | |
93 | 106 | next |
94 | 107 | end |
95 | 108 | fname = t[1] |
96 | 109 | if fname =~ /\.mbsf$/ |
97 | 110 | f = new(MbsfPath + "/" + fname) # Molecule.new |
98 | - $named_fragments.push([t[0], t[1]]) # Registered fragment | |
111 | + if subtitle | |
112 | + $named_fragments.push([t[0], t[1]]) # Registered fragment | |
113 | + end | |
99 | 114 | else |
100 | 115 | f = known_fragment(fname) |
101 | 116 | end |
@@ -0,0 +1,43 @@ | ||
1 | +!:atoms | |
2 | +! idx seg_name res_seq res_name name type charge weight element atomic_number occupancy temp_factor int_charge | |
3 | +0 MAIN 1 RES N1 n3 0.00000 14.00670 N 7 1.000000 0.000000 0 | |
4 | +1 MAIN 1 RES O4 o 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
5 | +2 MAIN 1 RES O5 o 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
6 | +3 MAIN 1 RES H1 hn 0.00000 1.00790 H 1 1.000000 0.000000 0 | |
7 | + | |
8 | +!:positions ; frame 0 | |
9 | +! idx x y z [sx sy sz] | |
10 | +0 1.28420161 0.24585278 0.20573357 | |
11 | +1 1.79964975 1.10078149 -0.53013352 | |
12 | +2 1.79339434 -0.24814780 1.22295723 | |
13 | +3 -0.10852988 -0.19316457 -0.13714068 | |
14 | + | |
15 | +!:bonds | |
16 | +! from1 to1 from2 to2 from3 to3 from4 to4 | |
17 | +0 1 0 2 0 3 | |
18 | + | |
19 | +!:angles | |
20 | +! a1 b1 c1 a2 b2 c2 a3 b3 c3 | |
21 | +2 0 1 3 0 1 3 0 2 | |
22 | + | |
23 | +!:trackball | |
24 | +! scale; trx try trz; theta_deg x y z | |
25 | +0.809850 | |
26 | +-0.074035 -0.003156 -0.002550 | |
27 | +20.655737 0.000000 1.000000 0.000000 | |
28 | + | |
29 | +!:view | |
30 | +show_unit_cell 0 | |
31 | +show_periodic_box 1 | |
32 | +show_expanded_atoms 1 | |
33 | +show_ellipsoids 0 | |
34 | +show_hydrogens 1 | |
35 | +show_dummy_atoms 1 | |
36 | +show_rotation_center 0 | |
37 | +show_graphite_flag 0 | |
38 | +show_graphite 5 | |
39 | +show_periodic_image_flag 0 | |
40 | +show_periodic_image 0 0 0 0 0 0 | |
41 | +atom_radius 0.200000 | |
42 | +bond_radius 0.100000 | |
43 | + |
@@ -0,0 +1,42 @@ | ||
1 | +!:atoms | |
2 | +! idx seg_name res_seq res_name name type charge weight element atomic_number occupancy temp_factor int_charge | |
3 | +0 MAIN 1 RES H1 hs 0.00000 1.00790 H 1 1.000000 0.000000 0 | |
4 | +1 MAIN 1 RES S1 s 0.00000 32.06600 S 16 1.000000 0.000000 0 | |
5 | +2 MAIN 1 RES O1 o 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
6 | +3 MAIN 1 RES H2 hs 0.00000 1.00790 H 1 1.000000 0.000000 0 | |
7 | + | |
8 | +!:positions ; frame 0 | |
9 | +! idx x y z [sx sy sz] | |
10 | +0 0.04122872 0.00000000 0.15128305 | |
11 | +1 1.53451318 0.00000000 0.00950327 | |
12 | +2 2.46711340 -0.00000000 -1.60580696 | |
13 | +3 2.15837073 0.00000000 1.37361535 | |
14 | + | |
15 | +!:bonds | |
16 | +! from1 to1 from2 to2 from3 to3 from4 to4 | |
17 | +1 2 1 0 1 3 | |
18 | + | |
19 | +!:angles | |
20 | +! a1 b1 c1 a2 b2 c2 a3 b3 c3 | |
21 | +0 1 2 3 1 2 3 1 0 | |
22 | + | |
23 | +!:trackball | |
24 | +! scale; trx try trz; theta_deg x y z | |
25 | +0.657707 | |
26 | +-0.151090 -0.000000 -0.005041 | |
27 | +68.696009 0.999997 -0.001877 -0.001683 | |
28 | + | |
29 | +!:view | |
30 | +show_unit_cell 0 | |
31 | +show_periodic_box 1 | |
32 | +show_expanded_atoms 1 | |
33 | +show_ellipsoids 0 | |
34 | +show_hydrogens 1 | |
35 | +show_dummy_atoms 1 | |
36 | +show_rotation_center 0 | |
37 | +show_graphite_flag 0 | |
38 | +show_graphite 5 | |
39 | +show_periodic_image_flag 0 | |
40 | +show_periodic_image 0 0 0 0 0 0 | |
41 | +atom_radius 0.200000 | |
42 | +bond_radius 0.100000 |
@@ -0,0 +1,54 @@ | ||
1 | +!:atoms | |
2 | +! idx seg_name res_seq res_name name type charge weight element atomic_number occupancy temp_factor int_charge | |
3 | +0 MAIN 3 RES H1 hs 0.00000 1.00790 H 1 1.000000 0.000000 0 | |
4 | +1 MAIN 2 RES H2 ho 0.00000 1.00790 H 1 1.000000 0.000000 0 | |
5 | +2 MAIN 1 RES S2 s 0.00000 32.06600 S 16 1.000000 0.000000 0 | |
6 | +3 MAIN 1 RES O5 o 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
7 | +4 MAIN 1 RES O6 o 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
8 | +5 MAIN 2 RES O1 oh 0.00000 15.99940 O 8 1.000000 0.000000 0 | |
9 | + | |
10 | +!:positions ; frame 0 | |
11 | +! idx x y z [sx sy sz] | |
12 | +0 0.06138042 -0.12980594 -0.07185998 | |
13 | +1 2.85841283 -1.52612722 -0.92716404 | |
14 | +2 1.55008742 0.03399610 0.01132876 | |
15 | +3 2.04111470 1.25906318 -0.82915005 | |
16 | +4 2.06293505 -0.11310744 1.48226382 | |
17 | +5 1.90468028 -1.36242385 -0.82100022 | |
18 | + | |
19 | +!:bonds | |
20 | +! from1 to1 from2 to2 from3 to3 from4 to4 | |
21 | +2 3 2 4 5 1 2 5 | |
22 | +2 0 | |
23 | + | |
24 | +!:angles | |
25 | +! a1 b1 c1 a2 b2 c2 a3 b3 c3 | |
26 | +4 2 3 2 5 1 5 2 3 | |
27 | +5 2 4 0 2 3 0 2 4 | |
28 | +0 2 5 | |
29 | + | |
30 | +!:dihedrals | |
31 | +! a1 b1 c1 d1 a2 b2 c2 d2 | |
32 | +3 2 5 1 4 2 5 1 | |
33 | +0 2 5 1 | |
34 | + | |
35 | +!:trackball | |
36 | +! scale; trx try trz; theta_deg x y z | |
37 | +0.656495 | |
38 | +-0.149907 0.006742 0.004839 | |
39 | +1.472817 -0.703661 0.068853 -0.706992 | |
40 | + | |
41 | +!:view | |
42 | +show_unit_cell 0 | |
43 | +show_periodic_box 1 | |
44 | +show_expanded_atoms 1 | |
45 | +show_ellipsoids 0 | |
46 | +show_hydrogens 1 | |
47 | +show_dummy_atoms 1 | |
48 | +show_rotation_center 0 | |
49 | +show_graphite_flag 0 | |
50 | +show_graphite 5 | |
51 | +show_periodic_image_flag 0 | |
52 | +show_periodic_image 0 0 0 0 0 0 | |
53 | +atom_radius 0.200000 | |
54 | +bond_radius 0.100000 |