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.911135530933790887
00023 % BBa:=pi/2
00024
00025 % The firts CC bond is aligned with the X axis and has lenght CCb
00026 % The second is in the XY plane at position:
00027 CC2x:=CCb*cos(BBa)
00028 CC2y:=CCb*sin(BBa)
00029
00030 % x-y-z position of one of the H w.r.t. a frame attached to the C
00031 % The second H is symmetrically placed (w.r.t. the X-Y plane).
00032 % This H is at (Hx,Hy,Hz) that is at the intersection of three circunferences
00033 % Hx^2+Hy^2+Hz^2=HCb^2
00034 % (Hx-CCb)^2+Hy^2+Hz^2=HCb2^2
00035 % (Hx-CC2x)^2+(Hy-CC2y)^2+Hz^2=HCb2^2
00036 %
00037 Hx:=(HCb^2-HCb2^2+CCb^2)/(2*CCb)
00038 Hy:=((Hx-CC2x)^2-(Hx-CCb)^2+CC2y^2)/(2*CC2y)
00039 Hz:=sqrt(Hx^2+Hy^2)
00040
00041 % Radious of the spheres representing atoms (75% Van der Waals radii)
00042 rC:=1.7*0.25
00043 rH:=1.2*0.25
00044
00045 % Radii of the cylinders representing bonds
00046 rCC:=0.15
00047 rCH:=0.15
00048
00049 % Colors for the atoms (Carbon/Hydrogen)
00050 Cr:=0.2
00051 Cg:=0.6
00052 Cb:=0.6
00053
00054 Hr:=1
00055 Hg:=1
00056 Hb:=1
00057
00058 [LINKS]
00059
00060 C1 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00061 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00062 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00063 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00064 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00065 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00066 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00067 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00068 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00069
00070 C2 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00071 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00072 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00073 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00074 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00075 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00076 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00077 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00078 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00079
00080 C3 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00081 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00082 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00083 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00084 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00085 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00086 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00087 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00088 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00089
00090 C4 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00091 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00092 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00093 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00094 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00095 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00096 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00097 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00098 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00099
00100 C5 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00101 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00102 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00103 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00104 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00105 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00106 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00107 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00108 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00109
00110 C6 : sphere rC (0,0,0) color (Cr,Cg,Cb)
00111 cylinder rCC (0,0,0) (CCb/2,0,0) color (Cr,Cg,Cb)
00112 cylinder rCC (0,0,0) (CC2x/2,CC2y/2,0) color (Cr,Cg,Cb)
00113 cylinder rCH (0,0,0) (Hx/2,Hy/2,Hz/2) color (Cr,Cg,Cb)
00114 cylinder rCH (Hx/2,Hy/2,Hz/2) (Hx,Hy,Hz) color (Hr,Hg,Hb)
00115 sphere rH (Hx,Hy,Hz) color (Hr,Hg,Hb)
00116 cylinder rCH (0,0,0) (Hx/2,Hy/2,-Hz/2) color (Cr,Cg,Cb)
00117 cylinder rCH (Hx/2,Hy/2,-Hz/2) (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00118 sphere rH (Hx,Hy,-Hz) color (Hr,Hg,Hb)
00119
00120
00121 [JOINTS]
00122
00123 % We define the revolute joints trying to use as much zeros as possible
00124 % in the two first points of the two axes in local coordinates. This produces
00125 % simpler equation sets.
00126 revolute: C1 (CCb,0,0) (0,0,0)
00127 C2 (0,0,0) (CC2x,CC2y,0)
00128
00129 revolute: C2 (CCb,0,0) (0,0,0)
00130 C3 (0,0,0) (CC2x,CC2y,0)
00131
00132 revolute: C3 (CCb,0,0) (0,0,0)
00133 C4 (0,0,0) (CC2x,CC2y,0)
00134
00135 revolute: C4 (CCb,0,0) (0,0,0)
00136 C5 (0,0,0) (CC2x,CC2y,0)
00137
00138 revolute: C5 (CCb,0,0) (0,0,0)
00139 C6 (0,0,0) (CC2x,CC2y,0)
00140
00141 revolute: C6 (CCb,0,0) (0,0,0)
00142 C1 (0,0,0) (CC2x,CC2y,0)
00143