Bicyclohexane.world
Go to the documentation of this file.
1 
3 [CONSTANTS]
4 
5 % We define a reference frame attache to each C atom with the
6 % X axis along one of the C-C bonds and with the X-Y plane in
7 % the planed defined by the two bonds coincident in the C.
8 
9 % All distances are in Amstrongs and all angles are in radiants
10 
11 % H-C bond length
12 HCb:=1.09
13 
14 % H-C distance for C the neighbouring C of the C to which H
15 % is connected
16 HCb2:=2.151077
17 
18 % C-C bond length
19 CCb:=1.526
20 
21 % C-C-C squared distnace
22 CCC2:=6.212008043466126
23 
24 % Bond bending angle
25 BBa:=1.911135530933790887
26 % BBa:=pi/2
27 
28 % The firts CC bond is aligned with the X axis and has lenght CCb
29 % The second is in the XY plane at position:
30 CC2x:=CCb*cos(BBa)
31 CC2y:=CCb*sin(BBa)
32 
33 % x-y-z position of one of the H w.r.t. a frame attached to the C
34 % The second H is symmetrically placed (w.r.t. the X-Y plane).
35 % This H is at (Hx,Hy,Hz) that is at the intersection of three circunferences
36 % Hx^2+Hy^2+Hz^2=HCb^2
37 % (Hx-CCb)^2+Hy^2+Hz^2=HCb2^2
38 % (Hx-CC2x)^2+(Hy-CC2y)^2+Hz^2=HCb2^2
39 %
40 Hx:=(HCb^2-HCb2^2+CCb^2)/(2*CCb)
41 Hy:=((Hx-CC2x)^2-(Hx-CCb)^2+CC2y^2)/(2*CC2y)
42 Hz:=sqrt(Hx^2+Hy^2)
43 
44 % x-y-z position of the Carbon atom in the "other" ring for atoms 4 and 5
45 % This is like the H position but taking into account the correct C-C bond lenght
46 % Cx^2+Cy^2+Cz^2=CCb^2
47 % (Cx-CCb)^2+Cy^2+Cz^2=CCC2
48 % (Cx-CC2x)^2+(Cy-CC2y)^2+Cz^2=CCC2
49 %
50 Cx:=(2*CCb^2-CCC2)/(2*CCb)
51 Cy:=((Cx-CC2x)^2-(Cx-CCb)^2+CC2y^2)/(2*CC2y)
52 Cz:=sqrt(CCb^2-Cx^2-Cy^2)
53 
54 % Radious of the spheres representing atoms (75% Van der Waals radii)
55 rC:=1.7*0.25
56 rH:=1.2*0.25
57 
58 % Radii of the cylinders representing bonds
59 rCC:=0.15
60 rCH:=0.15
61 
62 % Colors for the atoms (Carbon/Hydrogen)
63 Cr:=0.2
64 Cg:=0.6
65 Cb:=0.6
66 
67 Hr:=1
68 Hg:=1
69 Hb:=1
70 
71 [LINKS]
72 
73 C1 : sphere rC (0,0,0) color (Cr,Cg,Cb)
74  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
75  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
76  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
77  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
78  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
79  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
80  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
81  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
82 
83 C2 : sphere rC (0,0,0) color (Cr,Cg,Cb)
84  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
85  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
86  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
87  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
88  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
89  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
90  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
91  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
92 
93 C3 : sphere rC (0,0,0) color (Cr,Cg,Cb)
94  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
95  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
96  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
97  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
98  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
99  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
100  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
101  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
102 
103 C4 : sphere rC (0,0,0) color (Cr,Cg,Cb)
104  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
105  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
106  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
107  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
108  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
109  cylinder rCC (0,0,0) (Cx/2,Cy/2,-Cz/2) color (Cr,Cg,Cb) decoration
110 
111 C5 : sphere rC (0,0,0) color (Cr,Cg,Cb)
112  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
113  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
114  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
115  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
116  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
117  cylinder rCC (0,0,0) (Cx/2,Cy/2,-Cz/2) color (Cr,Cg,Cb) decoration
118 
119 C6 : sphere rC (0,0,0) color (Cr,Cg,Cb)
120  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
121  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
122  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
123  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
124  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
125  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
126  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
127  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
128 
129 
130 C7 : sphere rC (0,0,0) color (Cr,Cg,Cb)
131  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
132  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
133  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
134  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
135  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
136  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
137  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
138  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
139 
140 C8 : sphere rC (0,0,0) color (Cr,Cg,Cb)
141  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
142  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
143  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
144  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
145  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
146  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
147  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
148  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
149 
150 C9 : sphere rC (0,0,0) color (Cr,Cg,Cb)
151  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
152  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
153  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
154  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
155  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
156  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
157  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
158  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
159 
160 C10: sphere rC (0,0,0) color (Cr,Cg,Cb)
161  cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb) decoration
162  cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb) decoration
163  cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb) decoration
164  cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb) decoration
165  sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
166  cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb) decoration
167  cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb) decoration
168  sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
169 
170 [JOINTS]
171 
172 % We define the revolute joints trying to use as much zeros as possible
173 % in the two first points of the two axes in local coordinates. This produces
174 % simpler equation sets.
175 revolute: C1 (CCb,0,0) (0,0,0)
176  C2 (0,0,0) (CC2x,CC2y,0)
177 
178 revolute: C2 (CCb,0,0) (0,0,0)
179  C3 (0,0,0) (CC2x,CC2y,0)
180 
181 revolute: C3 (CCb,0,0) (0,0,0)
182  C4 (0,0,0) (CC2x,CC2y,0)
183 
184 revolute: C4 (CCb,0,0) (0,0,0)
185  C5 (0,0,0) (CC2x,CC2y,0)
186 
187 revolute: C5 (CCb,0,0) (0,0,0)
188  C6 (0,0,0) (CC2x,CC2y,0)
189 
190 revolute: C6 (CCb,0,0) (0,0,0)
191  C1 (0,0,0) (CC2x,CC2y,0)
192 
193 revolute: C4 (Cx,Cy,-Cz) (0,0,0)
194  C7 (0,0,0) (CC2x,CC2y,0)
195 
196 revolute: C7 (CCb,0,0) (0,0,0)
197  C8 (0,0,0) (CC2x,CC2y,0)
198 
199 revolute: C8 (CCb,0,0) (0,0,0)
200  C9 (0,0,0) (CC2x,CC2y,0)
201 
202 revolute: C9 (CCb,0,0) (0,0,0)
203  C10 (0,0,0) (CC2x,CC2y,0)
204 
205 revolute: C10 (CCb,0,0) (0,0,0)
206  C5 (0,0,0) (Cx,Cy,-Cz)
207 
208 [COLLISIONS]
209 
210 CHECK : ALL
211