00001
00003 [CONSTANTS]
00004
00005 % We define a reference frame attache to each C atom with the
00006 % X axis along one of the C-C bonds and with the X-Y plane in
00007 % the planed defined by the two bonds coincident in the C.
00008
00009 % All distances are in Amstrongs and all angles are in radiants
00010
00011 % H-C bond length
00012 HCb:=1.09
00013
00014 % H-C distance for C the neighbouring C of the C to which H
00015 % is connected
00016 HCb2:=2.151077
00017
00018 % C-C bond length
00019 CCb:=1.526
00020
00021 % Bond bending angle
00022 BBa:=1.9111
00023
00024 % The firts CC bond is aligned with the X axis and has lenght CCb
00025 % The second is in the XY plane at position:
00026 CC2x:=CCb*cos(BBa)
00027 CC2y:=CCb*sin(BBa)
00028
00029 % x-y-z position of one of the H w.r.t. a frame attached to the C
00030 % The second H is symmetrically placed (w.r.t. the X-Y plane).
00031 % This H is at (Hx,Hy,Hz) that is at the intersection of three circunferences
00032 % Hx^2+Hy^2+Hz^2=HCb^2
00033 % (Hx-CCb)^2+Hy^2+Hz^2=HCb2^2
00034 % (Hx-CC2x)^2+(Hy-CC2y)^2+Hz^2=HCb2^2
00035 %
00036 Hx:=(HCb^2-HCb2^2+CCb^2)/(2*CCb)
00037 Hy:=((Hx-CC2x)^2-(Hx-CCb)^2+CC2y^2)/(2*CC2y)
00038 Hz:=sqrt(Hx^2+Hy^2)
00039
00040 % Radious of the spheres representing atoms (25% Van der Waals radii)
00041 rC:=1.7*0.5
00042 rH:=1.2*0.5
00043
00044 % Radious of the cylinders representing bonds
00045 rCC:=0.15
00046 rCH:=0.15
00047
00048 % Colors for the atoms
00049 Cr:=0.2
00050 Cg:=0.6
00051 Cb:=0.6
00052
00053 Hr:=1
00054 Hg:=1
00055 Hb:=1
00056
00057 [LINKS]
00058
00059 C1 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00060 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00061 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00062 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00063 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00064 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00065 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00066 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00067 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00068
00069 C2 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00070 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00071 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00072 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00073 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00074 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00075 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00076 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00077 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00078
00079 C3 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00080 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00081 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00082 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00083 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00084 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00085 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00086 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00087 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00088
00089 C4 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00090 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00091 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00092 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00093 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00094 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00095 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00096 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00097 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00098
00099 C5 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00100 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00101 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00102 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00103 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00104 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00105 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00106 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00107 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00108
00109 C6 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00110 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00111 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00112 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00113 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00114 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00115 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00116 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00117 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00118
00119 C7 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00120 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00121 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00122 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00123 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00124 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00125 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00126 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00127 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00128
00129 C8 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00130 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00131 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00132 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00133 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00134 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00135 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00136 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00137 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00138
00139 [JOINTS]
00140
00141 % We define the revolute joints trying to use as much zeros as possible
00142 % in the two first points of the two axes in local coordinates. This produces
00143 % simpler equation sets.
00144 revolute: C1 (CCb,0,0) (0,0,0)
00145 C2 (0,0,0) (CC2x,CC2y,0)
00146
00147 revolute: C2 (CCb,0,0) (0,0,0)
00148 C3 (0,0,0) (CC2x,CC2y,0)
00149
00150 revolute: C3 (CCb,0,0) (0,0,0)
00151 C4 (0,0,0) (CC2x,CC2y,0)
00152
00153 revolute: C4 (CCb,0,0) (0,0,0)
00154 C5 (0,0,0) (CC2x,CC2y,0)
00155
00156 revolute: C5 (CCb,0,0) (0,0,0)
00157 C6 (0,0,0) (CC2x,CC2y,0)
00158
00159 revolute: C6 (CCb,0,0) (0,0,0)
00160 C7 (0,0,0) (CC2x,CC2y,0)
00161
00162 revolute: C7 (CCb,0,0) (0,0,0)
00163 C8 (0,0,0) (CC2x,CC2y,0)
00164
00165 revolute: C8 (CCb,0,0) (0,0,0)
00166 C1 (0,0,0) (CC2x,CC2y,0)
00167