Rev 7293 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13573 | obado | 1 | <!DOCTYPE html> |
7246 | schaersvoo | 2 | <html> |
13573 | obado | 3 | <head> |
4 | <title>WimsChem Test 1</title> |
||
5 | </head> |
||
7246 | schaersvoo | 6 | <body> |
7 | <!-- |
||
8 | <form id="form" action="$wims_refname?form-data$session" method="post" enctype="multipart/form-data" > |
||
9 | <input type="hidden" name="session" value="$session" /> |
||
10 | <input type="hidden" name="lang" value="nl" /> |
||
11 | <input type="hidden" name="cmd" value="reply" /> |
||
12 | <input type="hidden" name="module" value="$module" /> |
||
13 | <input type="hidden" id="reply" name="reply$counter" value="" /> |
||
14 | </form> |
||
15 | --> |
||
13573 | obado | 16 | <script> |
7246 | schaersvoo | 17 | var testmol="CCCCCCC(O)CCCCCCCCCCC(=O)O\n"+ |
18 | "JME 2006.05 Tue Aug 19 08:32:49 CEST 2008\n"+ |
||
19 | "\n"+ |
||
20 | " 21 20 0 0 0 0 0 0 0 0999 V2000\n"+ |
||
21 | " 0.7000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
22 | " 13.3000 2.4249 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
23 | " 13.3000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
24 | " 0.0000 8.4870 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
25 | " 0.0000 1.2124 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
26 | " 0.7000 2.4249 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
27 | " 7.0000 3.6373 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
28 | " 6.3000 4.8497 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
29 | " 8.4000 3.6373 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
30 | " 4.9000 4.8497 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
31 | " 0.0000 3.6373 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
32 | " 9.1000 2.4249 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
33 | " 4.2000 6.0622 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
34 | " 10.5000 2.4249 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
35 | " 0.7000 4.8497 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
36 | " 2.8000 6.0622 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
37 | " 11.2000 1.2124 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
38 | " 0.0000 6.0622 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
39 | " 2.1000 7.2746 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
40 | " 12.6000 1.2124 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
41 | " 0.7000 7.2746 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n"+ |
||
42 | " 1 5 1 0 0 0 0\n"+ |
||
43 | " 2 20 2 0 0 0 0\n"+ |
||
44 | " 3 20 1 0 0 0 0\n"+ |
||
45 | " 4 21 1 0 0 0 0\n"+ |
||
46 | " 5 6 1 0 0 0 0\n"+ |
||
47 | " 6 11 1 0 0 0 0\n"+ |
||
48 | " 7 8 1 0 0 0 0\n"+ |
||
49 | " 7 9 1 0 0 0 0\n"+ |
||
50 | " 8 10 1 0 0 0 0\n"+ |
||
51 | " 9 12 1 0 0 0 0\n"+ |
||
52 | " 10 13 1 0 0 0 0\n"+ |
||
53 | " 11 15 1 0 0 0 0\n"+ |
||
54 | " 12 14 1 0 0 0 0\n"+ |
||
55 | " 13 16 1 0 0 0 0\n"+ |
||
56 | " 14 17 1 0 0 0 0\n"+ |
||
57 | " 15 18 1 0 0 0 0\n"+ |
||
58 | " 16 19 1 0 0 0 0\n"+ |
||
59 | " 17 20 1 0 0 0 0\n"+ |
||
60 | " 18 21 1 0 0 0 0\n"+ |
||
61 | " 19 21 1 0 0 0 0\n"+ |
||
62 | "M END\n"; |
||
63 | function show(t){ |
||
13573 | obado | 64 | var wimschem = document.getElementById("wimschem.new") |
65 | var outputdiv = document.getElementById("outputdiv"); |
||
66 | switch(t){ |
||
7246 | schaersvoo | 67 | case 0: wimschem.SetMoleculeMDLMol(testmol);break; |
68 | case 1:outputdiv.innerHTML = wimschem.getSVG(1); |
||
13573 | obado | 69 | outputdiv.style.backgroundColor = "orange"; |
70 | outputdiv.style.display = "block"; |
||
71 | break; |
||
7246 | schaersvoo | 72 | case 2:outputdiv.innerHTML = wimschem.ReadAtomSelection(); |
13573 | obado | 73 | outputdiv.style.backgroundColor = "orange"; |
74 | outputdiv.style.display = "block"; |
||
75 | break; |
||
7246 | schaersvoo | 76 | case 3:outputdiv.innerHTML = wimschem.ReadBondSelection(); |
13573 | obado | 77 | outputdiv.style.backgroundColor = "orange"; |
78 | outputdiv.style.display = "block"; |
||
79 | break; |
||
7246 | schaersvoo | 80 | case 4:sendanswer(); |
13573 | obado | 81 | } |
7246 | schaersvoo | 82 | } |
83 | function sendanswer(){ |
||
13573 | obado | 84 | var wimschem = document.getElementById('wimschem.new'); |
85 | var your_svg = wimschem.getSVG("1"); |
||
86 | var my_svg = wimschem.getSVG("2"); |
||
87 | var mdmol = wimschem.GetMoleculeMDLMol(); |
||
88 | reply = my_svg+"\n"+your_svg+"\n"+mdmol; |
||
89 | document.write(reply); |
||
90 | return; |
||
7246 | schaersvoo | 91 | } |
92 | </script> |
||
93 | |||
94 | <table> |
||
13573 | obado | 95 | <tr> |
96 | <th> |
||
97 | <div id="outputdiv" ></div> |
||
98 | </th> |
||
99 | </tr> |
||
100 | <tr> |
||
101 | <th> |
||
102 | <applet name="WIMSchem" id="wimschem.new" code="WIMSchem.MainApplet" archive="dist/WIMSchem.jar" width="550" height="650"> |
||
103 | <param name="atoms" value="C,N,O,S,Mn,Ni,Mg,Pb,Ca,Li,K,Na,Si"><!-- provate collection of usable atoms --> |
||
104 | <param name="language" value="en"><!-- supportded en / nl : fr not translated --> |
||
105 | <param name="atom_button_row" value="1"><!-- show an addional row with atom buttons: buttonrow may be detached from applet --> |
||
106 | <param name="zoomfactor" value="1.3"><!-- append javascript zoom to SVG export --> |
||
107 | <!-- <param name="file" value="http://localhost/molfiles/a.mol"> ==> <!-- this molecule will be shown in the apple if param 'showfile' = 1 --> |
||
108 | <param name="showfile" value="yes"><!-- if 1/yes loaded file (MDLMol/Native) is shown --> |
||
109 | <param name="user_selection" value="1"><!-- allow student to select bonds & atoms --> |
||
110 | <!-- optional for all colors Atoms & Bonds : default 100 --> |
||
111 | <param name="color_alpha" value="100"><!-- needed otherwise atoms will be hidden by solid disk --> |
||
112 | <param name="default_atom_select_color" value="255,0,0"><!-- optional : default 255,0,0 [red] --> |
||
113 | <param name="default_bond_select_color" value="255,0,0"><!-- optional : default 255,0,0 [red] --> |
||
114 | <param name="select_atoms" value="1,3"><!-- line numbers in server loaded MDLMol file --> |
||
115 | <param name="select_bonds" value="2,4"><!-- line numbers in server loaded MDLMol file --> |
||
116 | <!-- colors used for showing server selected atoms and bonds --> |
||
117 | <param name="select_atom_color1" value="255,0,0"><!-- optional : default colors = red or default_select_color --> |
||
118 | <param name="select_atom_color2" value="0,255,0"><!-- optional : default colors = red or default_select_color --> |
||
119 | <param name="select_atom_color3" value="0,0,255"><!-- optional : default colors = red or default_select_color --> |
||
120 | <param name="select_atom_color4" value="0,0,255"><!-- optional : default colors = red or default_select_color --> |
||
121 | |||
122 | <param name="select_bond_color1" value="255,0,0"><!-- optional : default colors = red or default_select_color --> |
||
123 | <param name="select_bond_color2" value="0,255,0"><!-- optional : default colors = red or default_select_color --> |
||
124 | <param name="select_bond_color3" value="0,0,255"><!-- optional : default colors = red or default_select_color --> |
||
125 | <param name="select_bond_color4" value="0,0,255"><!-- optional : default colors = red or default_select_color --> |
||
126 | |||
127 | <param name="show_hydrogen" value="1"><!-- optional; default is yes / 1 --> |
||
128 | <param name="show_carbon" value="1"><!-- optional; default is yes / 1 --> |
||
129 | <param name="rotation" value="45"> <!-- optional : angle in degrees --> |
||
130 | <!-- the lefthand tool button bar : buttonrow is detachable from main applet window --> |
||
131 | <param name="TOOL_CURSOR" value="yes"><!-- needed for mouse action --> |
||
132 | <param name="TOOL_UNSELECT" value="yes"> <!--unselect studen drawing --> |
||
133 | <param name="TOOL_SELECT" value="yes"> <!--unselect studen drawing --> |
||
134 | <param name="TOOL_ROTATOR" value="yes"> |
||
135 | <param name="TOOL_ERASOR" value="yes"> |
||
136 | <param name="TOOL_DIALOG" value="yes"> |
||
137 | <param name="TOOL_EDIT" value="yes"> |
||
138 | <param name="TOOL_SETATOM" value="yes"> |
||
139 | <param name="TOOL_SINGLE" value="yes"> |
||
140 | <param name="TOOL_DOUBLE" value="yes"> |
||
141 | <param name="TOOL_TRIPLE" value="yes"> |
||
142 | <param name="TOOL_ZERO" value="yes"> |
||
143 | <param name="TOOL_INCLINED" value="yes"> |
||
144 | <param name="TOOL_DECLINED" value="yes"> |
||
145 | <param name="TOOL_CHARGE" value="yes"> |
||
146 | <param name="TOOL_UNDO=" value="no"> |
||
147 | <param name="TOOL_REDO=" value="no"> |
||
148 | <param name="TOOL_TEMPLATE" value="yes"> |
||
149 | <param name="TOOL_CUT" value="no"> |
||
150 | <param name="TOOL_COPY" value="no"> |
||
151 | <param name="TOOL_PASTE" value="no"> |
||
152 | <!-- the top menu --> |
||
153 | <param name="MENU_BLOCK" value="yes"> |
||
154 | <param name="MENU_SELECT" value="yes"> |
||
155 | <param name="MENU_TRANSFORM" value="yes"> |
||
156 | <param name="MENU_ZOOM" value="yes"> |
||
157 | <param name="MENU_SHOW" value="yes"> |
||
158 | <param name="MENU_HYDROGEN" value="yes"> |
||
159 | <param name="MENU_STEREO" value="yes"> |
||
160 | <param name="MENU_HELP" value="yes"> |
||
161 | (java unavailable) |
||
162 | </applet> |
||
163 | </th> |
||
164 | </tr> |
||
165 | <tr> |
||
166 | <th> |
||
167 | <input type="button" onclick="javascript:show(0)" value="SHOW A MOLECULE" /> |
||
168 | <input type="button" onclick="javascript:show(1)" value="SHOW SVG" /> |
||
169 | <input type="button" onclick="javascript:show(2)" value="SHOW ATOM SELECTION" /> |
||
170 | <input type="button" onclick="javascript:show(3)" value="SHOW BOND SELECTION" /> |
||
171 | <input type="button" onclick="javascript:show(4)" value="SENT TO WIMS" /> |
||
172 | </th> |
||
173 | </tr> |
||
7246 | schaersvoo | 174 | </table> |
175 | </body> |
||
176 | </html> |
||
177 |