Subversion Repositories wimsdev

Rev

Rev 11544 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3138 bpr 1
type=chemistry
13705 obado 2
textarea="data file scriptinput scriptoutput pre post"
3
iEdit="pre post"
3138 bpr 4
 
13705 obado 5
:Select some atoms of a molecule
3138 bpr 6
 
7
<p>
13705 obado 8
  We present a 3D interactive molecule (Jmol) and we ask to select certain atoms.
9
</p><p>
10
  To build an exercise with this model, just give the structure file and indicate the atoms to be selected.
11
</p><p class="wims_credits">
12
  Author of the model: Yves Noël & Bernadette Perrin-Riou <yves.noel@upmc.fr>
13
</p>
3138 bpr 14
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
15
 
11544 obado 16
Remove the above header if you destroy the model tags! (The lines starting
17
with a ':'.) Otherwise the exercise might not be taken back by Createxo.
3138 bpr 18
 
11544 obado 19
:%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%%
3138 bpr 20
 
13705 obado 21
:\title{Select in 3D}
5147 bpr 22
:\author{Yves, Noël ; Bernadette, Perrin-Riou}
3138 bpr 23
:\email{yves.noel@upmc.fr}
5724 bpr 24
:\credits{}
3138 bpr 25
 
13705 obado 26
:MDMol file
3138 bpr 27
\text{file=xxx
28
Jmol version 11.7.31  2009-03-28 16:42
29
EXTRACT: visible
30
 24 25  0  0  0
7718 bpr 31
 -3.380413 -1.127236 0.5733036 H
32
 0.9668296 -1.073742 -0.819822 N
33
 0.0567293 0.8527195 0.3923156 C
34
 -1.375174 -1.021224 -0.057055 N
35
 -1.261501 0.2590713 0.5234135 C
36
 -0.306833 -1.683633 -0.716934 C
37
 1.1394234 0.1874122 -0.27009  C
38
 0.5602627 2.0839095 0.8251589 N
39
 -0.492679 -2.818055 -1.209473 O
40
 -2.632807 -1.730396 -0.006095 C
41
 -2.230133 0.7988624 1.089973  O
42
 2.549699  2.9734976 0.6229589 H
43
 2.0527434 -1.736088 -1.493128 C
44
 -2.480771 -2.726952 0.4882631 H
45
 -3.008904 -1.902525 -1.049802 H
46
 2.9176102 -1.848151 -0.785786 H
47
 2.378786  -1.121191 -2.374365 H
48
 1.7189878 -2.748991 -1.843920 H
49
 -0.151845 3.0970047 1.5348347 C
50
 1.8934095 2.1181242 0.4193193 C
51
 2.2861252 0.9968439 -0.244029 N
52
 -0.168702 4.043655  0.9301094 H
53
 0.3535322 3.297906  2.5177748 H
54
 -1.207449 2.7537594 1.7203048 H
3138 bpr 55
 24 19  1
56
 22 19  1
57
 20 21  1
58
 20 12  1
59
 19 23  1
60
 19  8  1
61
 18 13  1
62
 15 10  1
63
 13 17  1
64
 13 16  1
65
 11  5  1
66
 10 14  1
67
 10  4  1
68
  9  6  1
69
  8 20  1
70
  7 21  1
71
  6  2  1
72
  5  3  1
73
  4  6  1
74
  4  5  1
75
  3  7  1
76
  3  8  1
77
  2 13  1
78
  2  7  1
79
  1 10  1
80
}
81
 
13705 obado 82
:Applet size, in pixels, width x height
3191 bpr 83
 
13705 obado 84
\text{size1=340x220}
3191 bpr 85
 
13705 obado 86
:Atoms to click on (one of the lines will be random)
87
 
3138 bpr 88
\matrix{atom=_N
89
_O
90
_C}
91
 
13705 obado 92
:Instructions specific to each previous line
3138 bpr 93
 
13705 obado 94
\matrix{names=nitrogen
95
oxygen
96
carbon}
3138 bpr 97
 
13705 obado 98
:%%%%%%%%%%%%%%
99
\text{cnt=\atom[;1]}
100
\integer{cnt=items(\cnt)}
101
\text{sel=randint(1..\cnt)}
102
\text{picked=\atom[\sel;]}
103
 
104
\text{name=\names[\sel;]}
105
:%%%%%%%%%%%%%%
106
 
107
:Text before the applet
108
Use the word \name to display the atom picked.
109
\text{pre=Select all the <strong>\name</strong> atoms.}
110
 
111
:Text after the applet
112
\text{post=<i>Check that your browser's zoom is on the normal size.</i>}
113
 
114
:Jmol script to perform when presenting the exercise
3191 bpr 115
\text{scriptinput=select all;color atoms yellow; select none;}
3138 bpr 116
 
13705 obado 117
:Jmol script to perform when presenting the response
3391 bpr 118
\text{scriptoutput=}
3138 bpr 119
 
120
 
121
 
11544 obado 122
:%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%%
3191 bpr 123
 
124
 
13705 obado 125
\statement{
126
  <div class="instruction">\pre</div>
127
  <div class="wimscenter">
128
    \embed{reply 1, \size1
129
 
3191 bpr 130
\scriptinput
3391 bpr 131
\scriptoutput}
13705 obado 132
  </div>
133
  <div class="post">\post</div>
3138 bpr 134
}
135
 
11544 obado 136
:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5
3138 bpr 137
 
13705 obado 138
\answer{}{\picked;\file}{type=jmolclick}