| 1 | |
| 2 | /**************************************************************************** |
| 3 | ** |
| 4 | ** Copyright (C) 2011 Christian B. Huebschle & George M. Sheldrick |
| 5 | ** All rights reserved. |
| 6 | ** Contact: [email protected] |
| 7 | ** |
| 8 | ** This file is part of the ShelXle |
| 9 | ** |
| 10 | ** This file may be used under the terms of the GNU Lesser |
| 11 | ** General Public License version 2.1 as published by the Free Software |
| 12 | ** Foundation and appearing in the file COPYING included in the |
| 13 | ** packaging of this file. Please review the following information to |
| 14 | ** ensure the GNU Lesser General Public License version 2.1 requirements |
| 15 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
| 16 | ** |
| 17 | ** |
| 18 | ****************************************************************************/ |
| 19 | #include "molecule.h" |
| 20 | #include <QtOpenGL> |
| 21 | #include <QOpenGLWidget> |
| 22 | #include <QFileDialog> |
| 23 | #include "partcolor.h" |
| 24 | const double g2r=180.0/M_PI; |
| 25 | #include "itsme.h" |
| 26 | Molecule::Molecule(){ |
| 27 | printf("Molecule contsructor \n"); |
| 28 | proba=50; |
| 29 | program_in_use=false; |
| 30 | fibo=(sqrt(5.0f)+1.0f)*0.5f; |
| 31 | fibom1=fibo-1.0f; |
| 32 | //useShaders=true; |
| 33 | mynewnameis=QString(PROGRAM_NAME); |
| 34 | if (mynewnameis=="shelXle"){ |
| 35 | theIconPath=QString(":/xle-icons/"); |
| 36 | }else{ |
| 37 | theIconPath=QString(":/bicons/"); |
| 38 | } |
| 39 | mist=false; |
| 40 | g_program=0; |
| 41 | g_Program=nullptr; |
| 42 | shaders_work=false; |
| 43 | qPeakRad=0.05; |
| 44 | growQPeak=false; |
| 45 | tubes=0; |
| 46 | planeTransparence=0.25; |
| 47 | qboMin=0.97; |
| 48 | qboMax=1.67; |
| 49 | HAWink=135; |
| 50 | HAMax=2.5; |
| 51 | dratom=0; |
| 52 | deuteriumColor=QColor("palegreen"); |
| 53 | LOD=4; |
| 54 | highlightEquivalents = true; |
| 55 | mQolor=QColor(128,76,76); |
| 56 | monoQrom=false; |
| 57 | nopm1=false; |
| 58 | bondColorStyle=0; |
| 59 | bondStrength=0.05; |
| 60 | beloRad=0.04; |
| 61 | noQPeaksPlease=false; |
| 62 | HFixSuitableAtomsOnly=false; |
| 63 | for (int i=0,j=0; i<18; i++){ |
| 64 | if ((i>5)&&(j%5==0)) j++; |
| 65 | int colori=27+j; |
| 66 | symmColors.append(QColor::colorNames().at(colori)); |
| 67 | j++; |
| 68 | } |
| 69 | theseAreAcceptors.append(6);//NOF |
| 70 | theseAreAcceptors.append(7); |
| 71 | theseAreAcceptors.append(8); |
| 72 | |
| 73 | theseAreDonors.append(5);//CNOF |
| 74 | theseAreDonors.append(6); |
| 75 | theseAreDonors.append(7); |
| 76 | theseAreDonors.append(8); |
| 77 | //QList<int> theseAreDonors; |
| 78 | beloColor= QColor("teal"); |
| 79 | beloColorByDefden=true; |
| 80 | beloLabels=true; |
| 81 | //nonPositiveDefinite=0; |
| 82 | Kovalenz_Radien[0 ]=32 ;Kovalenz_Radien[1 ]=1 ;Kovalenz_Radien[2 ]=123 ;Kovalenz_Radien[3 ]=90 ; |
| 83 | Kovalenz_Radien[4 ]=80 ;Kovalenz_Radien[5 ]=77 ;Kovalenz_Radien[6 ]=74 ;Kovalenz_Radien[7 ]=66 ; |
| 84 | Kovalenz_Radien[8 ]=72 ;Kovalenz_Radien[9 ]=1 ;Kovalenz_Radien[10 ]=154 ;Kovalenz_Radien[11 ]=149 ; |
| 85 | Kovalenz_Radien[12 ]=118 ;Kovalenz_Radien[13 ]=111 ;Kovalenz_Radien[14 ]=106 ;Kovalenz_Radien[15 ]=102 ; |
| 86 | Kovalenz_Radien[16 ]=99 ;Kovalenz_Radien[17 ]=1 ;Kovalenz_Radien[18 ]=203 ;Kovalenz_Radien[19 ]=174 ; |
| 87 | Kovalenz_Radien[20 ]=144 ;Kovalenz_Radien[21 ]=132 ;Kovalenz_Radien[22 ]=122 ;Kovalenz_Radien[23 ]=118 ; |
| 88 | Kovalenz_Radien[24 ]=117 ;Kovalenz_Radien[25 ]=117 ;Kovalenz_Radien[26 ]=116 ;Kovalenz_Radien[27 ]=124 ; |
| 89 | Kovalenz_Radien[28 ]=117 ;Kovalenz_Radien[29 ]=125 ;Kovalenz_Radien[30 ]=126 ;Kovalenz_Radien[31 ]=122 ; |
| 90 | Kovalenz_Radien[32 ]=120 ;Kovalenz_Radien[33 ]=116 ;Kovalenz_Radien[34 ]=114 ;Kovalenz_Radien[35 ]=1 ; |
| 91 | Kovalenz_Radien[36 ]=218 ;Kovalenz_Radien[37 ]=191 ;Kovalenz_Radien[38 ]=162 ;Kovalenz_Radien[39 ]=145 ; |
| 92 | Kovalenz_Radien[40 ]=134 ;Kovalenz_Radien[41 ]=130 ;Kovalenz_Radien[42 ]=127 ;Kovalenz_Radien[43 ]=125 ; |
| 93 | Kovalenz_Radien[44 ]=125 ;Kovalenz_Radien[45 ]=128 ;Kovalenz_Radien[46 ]=134 ;Kovalenz_Radien[47 ]=148 ; |
| 94 | Kovalenz_Radien[48 ]=144 ;Kovalenz_Radien[49 ]=141 ;Kovalenz_Radien[50 ]=140 ;Kovalenz_Radien[51 ]=136 ; |
| 95 | Kovalenz_Radien[52 ]=133 ;Kovalenz_Radien[53 ]=1 ;Kovalenz_Radien[54 ]=235 ;Kovalenz_Radien[55 ]=198 ; |
| 96 | Kovalenz_Radien[56 ]=169 ;Kovalenz_Radien[57 ]=165 ;Kovalenz_Radien[58 ]=165 ;Kovalenz_Radien[59 ]=164 ; |
| 97 | Kovalenz_Radien[60 ]=164 ;Kovalenz_Radien[61 ]=162 ;Kovalenz_Radien[62 ]=185 ;Kovalenz_Radien[63 ]=161 ; |
| 98 | Kovalenz_Radien[64 ]=159 ;Kovalenz_Radien[65 ]=159 ;Kovalenz_Radien[66 ]=157 ;Kovalenz_Radien[67 ]=157 ; |
| 99 | Kovalenz_Radien[68 ]=156 ;Kovalenz_Radien[69 ]=170 ;Kovalenz_Radien[70 ]=156 ;Kovalenz_Radien[71 ]=144 ; |
| 100 | Kovalenz_Radien[72 ]=134 ;Kovalenz_Radien[73 ]=130 ;Kovalenz_Radien[74 ]=128 ;Kovalenz_Radien[75 ]=126 ; |
| 101 | Kovalenz_Radien[76 ]=127 ;Kovalenz_Radien[77 ]=130 ;Kovalenz_Radien[78 ]=134 ;Kovalenz_Radien[79 ]=149 ; |
| 102 | Kovalenz_Radien[80 ]=148 ;Kovalenz_Radien[81 ]=147 ;Kovalenz_Radien[82 ]=146 ;Kovalenz_Radien[83 ]=146 ; |
| 103 | Kovalenz_Radien[84 ]=145 ;Kovalenz_Radien[85 ]=1 ;Kovalenz_Radien[86 ]=0 ;Kovalenz_Radien[87 ]=1 ; |
| 104 | Kovalenz_Radien[88 ]=188 ;Kovalenz_Radien[89 ]=165 ;Kovalenz_Radien[90 ]=161 ;Kovalenz_Radien[91 ]=142 ; |
| 105 | Kovalenz_Radien[92 ]=130 ;Kovalenz_Radien[93 ]=151 ;Kovalenz_Radien[94 ]=182 ; |
| 106 | //printf("Kovalenz_Radien H hat :%d \n",Kovalenz_Radien[0]); |
| 107 | //printf("Kovalenz_Radien N hat :%d \n",Kovalenz_Radien[6]); |
| 108 | /* //EN{ |
| 109 | ElNeg[0]=220; ElNeg[1]=550; ElNeg[2]= 97; ElNeg[3]=147; |
| 110 | ElNeg[4]=201; ElNeg[5]=250; ElNeg[6]=307; ElNeg[7]=350; |
| 111 | ElNeg[8]=410; ElNeg[9]=480; ElNeg[10]=101;ElNeg[11]=123; |
| 112 | ElNeg[12]=147;ElNeg[13]=174;ElNeg[14]=206;ElNeg[15]=244; |
| 113 | ElNeg[16]=283;ElNeg[17]=320;ElNeg[18]= 91;ElNeg[19]=104; |
| 114 | ElNeg[20]=120;ElNeg[21]=132;ElNeg[22]=145;ElNeg[23]=156; |
| 115 | ElNeg[24]=160;ElNeg[25]=164;ElNeg[26]=170;ElNeg[27]=175; |
| 116 | ElNeg[28]=175;ElNeg[29]=166;ElNeg[30]=182;ElNeg[31]=202; |
| 117 | ElNeg[32]=220;ElNeg[33]=248;ElNeg[34]=274;ElNeg[35]=290; |
| 118 | ElNeg[36]= 89;ElNeg[37]= 99;ElNeg[38]=111;ElNeg[39]=122; |
| 119 | ElNeg[40]=123;ElNeg[41]=130;ElNeg[42]=136;ElNeg[43]=142; |
| 120 | ElNeg[44]=145;ElNeg[45]=130;ElNeg[46]=142;ElNeg[47]=146; |
| 121 | ElNeg[48]=149;ElNeg[49]=172;ElNeg[50]=182;ElNeg[51]=201; |
| 122 | ElNeg[52]=221;ElNeg[53]=240;ElNeg[54]= 86;ElNeg[55]= 97; |
| 123 | ElNeg[56]=108;ElNeg[57]=108;ElNeg[58]=107;ElNeg[59]=107; |
| 124 | ElNeg[60]=107;ElNeg[61]=107;ElNeg[62]=110;ElNeg[63]=111; |
| 125 | ElNeg[64]=110;ElNeg[65]=110;ElNeg[66]=110;ElNeg[67]=111; |
| 126 | ElNeg[68]=111;ElNeg[69]=106;ElNeg[70]=114;ElNeg[71]=123; |
| 127 | ElNeg[72]=133;ElNeg[73]=140;ElNeg[74]=146;ElNeg[75]=152; |
| 128 | ElNeg[76]=155;ElNeg[77]=142;ElNeg[78]=142;ElNeg[79]=144; |
| 129 | ElNeg[80]=144;ElNeg[81]=155;ElNeg[82]=167; |
| 130 | */ |
| 131 | for (int i=0; i<103; i++){ |
| 132 | if (i<95) arad[i]=Kovalenz_Radien[i]/(250.0); |
| 133 | else arad[i]=0.5; |
| 134 | AtomStyle[i]=ATOM_STYLE_WALLS|ATOM_STYLE_RINGS|ATOM_STYLE_SPHERE; |
| 135 | |
| 136 | switch (i){ |
| 137 | case 0://H |
| 138 | AtomColor[i]=QColor(Qt::white).darker(20); |
| 139 | break; |
| 140 | case 2://Li |
| 141 | AtomColor[i]=QColor(Qt::darkRed); |
| 142 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 143 | break; |
| 144 | case 3://Be |
| 145 | AtomColor[i]=QColor("silver"); |
| 146 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 147 | break; |
| 148 | case 4://B |
| 149 | AtomColor[i]=QColor(Qt::darkBlue); |
| 150 | break; |
| 151 | case 5://C |
| 152 | AtomColor[i]=QColor("#242424"); |
| 153 | AtomStyle[i]|=ATOM_STYLE_WHITERING; |
| 154 | break; |
| 155 | case 6://N |
| 156 | AtomColor[i]=QColor(Qt::blue); |
| 157 | AtomStyle[i]|=ATOM_STYLE_WHITERING; |
| 158 | break; |
| 159 | case 7://O |
| 160 | AtomColor[i]=QColor(Qt::red); |
| 161 | AtomStyle[i]|=ATOM_STYLE_WHITERING; |
| 162 | break; |
| 163 | case 8://F |
| 164 | AtomColor[i]=QColor("chartreuse"); |
| 165 | break; |
| 166 | case 9://ne |
| 167 | AtomColor[i]=QColor(192,192,192,128); |
| 168 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 169 | break; |
| 170 | case 10://na |
| 171 | AtomColor[i]=QColor(239,154,251,128); |
| 172 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 173 | break; |
| 174 | case 11://mg |
| 175 | AtomColor[i]=QColor(51,153,255,128); |
| 176 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 177 | break; |
| 178 | case 12://al |
| 179 | AtomColor[i]=QColor(102,179,255,128); |
| 180 | break; |
| 181 | case 13://si |
| 182 | AtomColor[i]=QColor(128,128,128,128); |
| 183 | break; |
| 184 | case 14://p |
| 185 | AtomColor[i]=QColor(183,41,244,128); |
| 186 | break; |
| 187 | case 15://s |
| 188 | AtomColor[i]=QColor(190,190,0,128); |
| 189 | break; |
| 190 | case 16://cl |
| 191 | AtomColor[i]=QColor( 65,111, 65,128); |
| 192 | //printf("CL dots on\n"); |
| 193 | //AtomStyle[i]|=ATOM_STYLE_METAL; |
| 194 | break; |
| 195 | |
| 196 | case 18://k |
| 197 | AtomColor[i]=QColor(192,46,180,128); |
| 198 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 199 | break; |
| 200 | case 19://ca |
| 201 | AtomColor[i]=QColor(170,170,128,128); |
| 202 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 203 | break; |
| 204 | case 20: |
| 205 | AtomColor[i]=QColor(236,136,171,128); |
| 206 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 207 | break; |
| 208 | case 21: |
| 209 | AtomColor[i]=QColor(242,59,3,128); |
| 210 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 211 | break; |
| 212 | case 22: |
| 213 | AtomColor[i]=QColor(100,128,0,128); |
| 214 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 215 | break; |
| 216 | case 23: |
| 217 | AtomColor[i]=QColor(255,255,0,128); |
| 218 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 219 | break; |
| 220 | case 24: |
| 221 | AtomColor[i]=QColor(204,153,153,128); |
| 222 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 223 | break; |
| 224 | case 25: |
| 225 | AtomColor[i]=QColor(0,162,0,128); |
| 226 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 227 | break; |
| 228 | case 26: |
| 229 | AtomColor[i]=QColor(109,0,109,128); |
| 230 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 231 | break; |
| 232 | case 27: |
| 233 | AtomColor[i]=QColor(170,82,64,128); |
| 234 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 235 | break; |
| 236 | case 28://Cu |
| 237 | AtomColor[i]=QColor("salmon"); |
| 238 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 239 | |
| 240 | break; |
| 241 | case 29: |
| 242 | AtomColor[i]=QColor(63,123,111,128); |
| 243 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 244 | break; |
| 245 | case 30: |
| 246 | AtomColor[i]=QColor(78,254,208,128); |
| 247 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 248 | break; |
| 249 | case 31: |
| 250 | AtomColor[i]=QColor(136,136,136,128); |
| 251 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 252 | break; |
| 253 | case 32: |
| 254 | AtomColor[i]=QColor(191,218,255,128); |
| 255 | break; |
| 256 | case 33: |
| 257 | AtomColor[i]=QColor(90,23,23,128); |
| 258 | break; |
| 259 | case 34: |
| 260 | AtomColor[i]=QColor(222,188,133,128); |
| 261 | break; |
| 262 | case 35: |
| 263 | AtomColor[i]=QColor(240,120,0,128); |
| 264 | break; |
| 265 | case 36: |
| 266 | AtomColor[i]=QColor(50,15,0,128); |
| 267 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 268 | break; |
| 269 | case 37: |
| 270 | AtomColor[i]=QColor(192,192,192,128); |
| 271 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 272 | break; |
| 273 | case 38: |
| 274 | AtomColor[i]=QColor(204,113,32,128); |
| 275 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 276 | break; |
| 277 | case 39: |
| 278 | AtomColor[i]=QColor(236,97,59,128); |
| 279 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 280 | break; |
| 281 | case 40: |
| 282 | AtomColor[i]=QColor("silver"); |
| 283 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 284 | break; |
| 285 | case 41: |
| 286 | AtomColor[i]=QColor("silver"); |
| 287 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 288 | break; |
| 289 | case 42: |
| 290 | AtomColor[i]=QColor("silver"); |
| 291 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 292 | break; |
| 293 | case 43: |
| 294 | AtomColor[i]=QColor("silver"); |
| 295 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 296 | break; |
| 297 | case 44: |
| 298 | AtomColor[i]=QColor("silver"); |
| 299 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 300 | break; |
| 301 | case 45: |
| 302 | AtomColor[i]=QColor("silver"); |
| 303 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 304 | break; |
| 305 | case 46: |
| 306 | AtomColor[i]=QColor("silver"); |
| 307 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 308 | break; |
| 309 | case 47: |
| 310 | AtomColor[i]=QColor("silver"); |
| 311 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 312 | break; |
| 313 | case 48: |
| 314 | AtomColor[i]=QColor("silver"); |
| 315 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 316 | break; |
| 317 | case 49: |
| 318 | AtomColor[i]=QColor("silver"); |
| 319 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 320 | break; |
| 321 | case 54: |
| 322 | AtomColor[i]=QColor("silver"); |
| 323 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 324 | break; |
| 325 | case 55: |
| 326 | AtomColor[i]=QColor("silver"); |
| 327 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 328 | break; |
| 329 | case 56: |
| 330 | AtomColor[i]=QColor("silver"); |
| 331 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 332 | break; |
| 333 | case 57: |
| 334 | AtomColor[i]=QColor("silver"); |
| 335 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 336 | break; |
| 337 | case 58: |
| 338 | AtomColor[i]=QColor("silver"); |
| 339 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 340 | break; |
| 341 | case 59: |
| 342 | AtomColor[i]=QColor("silver"); |
| 343 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 344 | break; |
| 345 | case 61: |
| 346 | AtomColor[i]=QColor("silver"); |
| 347 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 348 | break; |
| 349 | case 62: |
| 350 | AtomColor[i]=QColor("silver"); |
| 351 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 352 | break; |
| 353 | case 63: |
| 354 | AtomColor[i]=QColor("silver"); |
| 355 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 356 | break; |
| 357 | case 67: |
| 358 | AtomColor[i]=QColor("silver"); |
| 359 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 360 | break; |
| 361 | case 68: |
| 362 | AtomColor[i]=QColor("silver"); |
| 363 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 364 | break; |
| 365 | case 69: |
| 366 | AtomColor[i]=QColor("silver"); |
| 367 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 368 | break; |
| 369 | case 70: |
| 370 | AtomColor[i]=QColor("silver"); |
| 371 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 372 | break; |
| 373 | case 71: |
| 374 | AtomColor[i]=QColor("silver"); |
| 375 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 376 | break; |
| 377 | case 72: |
| 378 | AtomColor[i]=QColor("silver"); |
| 379 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 380 | break; |
| 381 | case 73: |
| 382 | AtomColor[i]=QColor("silver"); |
| 383 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 384 | break; |
| 385 | case 74: |
| 386 | AtomColor[i]=QColor("silver"); |
| 387 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 388 | break; |
| 389 | case 75: |
| 390 | AtomColor[i]=QColor("silver"); |
| 391 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 392 | break; |
| 393 | case 76: |
| 394 | AtomColor[i]=QColor("silver"); |
| 395 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 396 | break; |
| 397 | case 77: |
| 398 | AtomColor[i]=QColor("silver"); |
| 399 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 400 | break; |
| 401 | case 79: |
| 402 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 403 | AtomColor[i]=QColor("silver"); |
| 404 | break; |
| 405 | case 80: |
| 406 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 407 | AtomColor[i]=QColor("silver"); |
| 408 | break; |
| 409 | case 81: |
| 410 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 411 | AtomColor[i]=QColor("silver"); |
| 412 | break; |
| 413 | case 82: |
| 414 | AtomColor[i]=QColor("silver"); |
| 415 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 416 | break; |
| 417 | case 83: |
| 418 | AtomColor[i]=QColor("silver"); |
| 419 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 420 | break; |
| 421 | case 86: |
| 422 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 423 | AtomColor[i]=QColor("silver"); |
| 424 | break; |
| 425 | case 87: |
| 426 | AtomColor[i]=QColor("silver"); |
| 427 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 428 | break; |
| 429 | case 88: |
| 430 | AtomColor[i]=QColor("silver"); |
| 431 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 432 | break; |
| 433 | case 89: |
| 434 | AtomColor[i]=QColor("silver"); |
| 435 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 436 | break; |
| 437 | case 91: |
| 438 | AtomColor[i]=QColor("silver"); |
| 439 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 440 | break; |
| 441 | case 92: |
| 442 | AtomColor[i]=QColor("silver"); |
| 443 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 444 | break; |
| 445 | case 93: |
| 446 | AtomColor[i]=QColor("silver"); |
| 447 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 448 | break; |
| 449 | case 97: |
| 450 | AtomColor[i]=QColor("silver"); |
| 451 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 452 | break; |
| 453 | |
| 454 | case 78://Au |
| 455 | AtomColor[i]=QColor("goldenrod"); |
| 456 | AtomStyle[i]|=ATOM_STYLE_METAL; |
| 457 | |
| 458 | break; |
| 459 | default: |
| 460 | AtomColor[i]=QColor("silver"); |
| 461 | break; |
| 462 | } |
| 463 | AtomColor[i].setAlpha(63); |
| 464 | } |
| 465 | AtomStyle[0]=ATOM_STYLE_SPHERE|ATOM_STYLE_NOLABEL|ATOM_STYLE_NOADP; |
| 466 | PSE<<"H"<<"He"<<"Li"<<"Be"<<"B"<<"C"<<"N"<<"O"<<"F"<<"Ne"<<"Na"<<"Mg"<<"Al"<<"Si"<<"P"<<"S"<<"Cl"<<"Ar"<< |
| 467 | "K"<<"Ca"<<"Sc"<<"Ti"<<"V"<<"Cr"<<"Mn"<<"Fe"<<"Co"<<"Ni"<<"Cu"<<"Zn"<<"Ga"<<"Ge"<<"As"<<"Se"<<"Br"<<"Kr"<< |
| 468 | "Rb"<<"Sr"<<"Y"<<"Zr"<<"Nb"<<"Mo"<<"Tc"<<"Ru"<<"Rh"<<"Pd"<<"Ag"<<"Cd"<<"In"<<"Sn"<<"Sb"<<"Te"<<"I"<<"Xe"<< |
| 469 | "Cs"<<"Ba"<< "La"<<"Ce"<<"Pr"<<"Nd"<<"Pm"<<"Sm"<<"Eu"<<"Gd"<<"Tb"<<"Dy"<<"Ho"<<"Er"<<"Tm"<<"Yb"<<"Lu"<< |
| 470 | "Hf"<<"Ta"<<"W"<<"Re"<<"Os"<<"Ir"<<"Pt"<<"Au"<<"Hg"<<"Tl"<<"Pb"<<"Bi"<<"Po"<<"At"<<"Rn"<<"Fr"<<"Ra"<< |
| 471 | "Ac"<<"Th"<<"Pa"<<"U"<<"Np"<<"Pu"<<"Am"<<"Cm"<<"Bk"<<"Cf"<<"Es"<<"Fm"<<"Md"<<"No"<<"Lr";//no need of these I guess--> <<"Ku"<<"Ha"<<"Rf"<<"Ns"<<"Hs"<<"Mt"; |
| 472 | } |
| 473 | |
| 474 | QColor Molecule::atomColor(int an, bool isD){ |
| 475 | if ((an == 0) && (isD)) { |
| 476 | //printf("D has %s\n",deuteriumColor.name().toStdString().c_str()); |
| 477 | return deuteriumColor; |
| 478 | } |
| 479 | return AtomColor[an]; |
| 480 | } |
| 481 | |
| 482 | int Molecule::afix5(int idx){ |
| 483 | int f5 = 0,m,cnt = 0,aafx=-1; |
| 484 | if (showatoms.at(idx).afix==0) return 0; |
| 485 | // printf("AFIXm5 %d (%s)\n",showatoms.at(idx).afix,showatoms.at(idx).Label.toStdString().c_str()); |
| 486 | for (int i = 0; (i <= idx) && (i < showatoms.size()); i++){ |
| 487 | if (showatoms.at(i).an > 0){ |
| 488 | if (aafx != showatoms.at(i).afix) cnt = 0;// afix is different than before => reset the counter |
| 489 | aafx = showatoms.at(i).afix; |
| 490 | m = showatoms.at(i).afix / 10; |
| 491 | switch (m) { |
| 492 | case 0://afix 6 afix 9 |
| 493 | //printf("ehm m is zero?\n"); |
| 494 | f5=5; |
| 495 | break; |
| 496 | case 6://66 for phenyl rings |
| 497 | cnt++; |
| 498 | f5 = (cnt % 6)? m * 10 + 5: 0; |
| 499 | // printf("cnt%d %s\n",cnt,showatoms.at(i).Label.toStdString().c_str()); |
| 500 | break; |
| 501 | case 5://56 planar regular 5 membered ring (cp) |
| 502 | cnt++; |
| 503 | f5 = (cnt % 5)? m * 10 + 5: 0; |
| 504 | break; |
| 505 | case 10://cp* |
| 506 | cnt++; |
| 507 | f5 = (cnt % 10)? m * 10 + 5: 0; |
| 508 | break; |
| 509 | case 11://naphtyl |
| 510 | cnt++; |
| 511 | f5 = (cnt % 10)? m * 10 + 5: 0; |
| 512 | break; |
| 513 | } |
| 514 | } |
| 515 | } |
| 516 | // printf("==> %d aafx%d m%d cnt%d idx%d %s\n",f5,aafx,m,cnt,idx,showatoms.at(idx).Label.toStdString().c_str()); |
| 517 | return f5; |
| 518 | } |
| 519 | |
| 520 | QString Molecule::nameSymmOp(Matrix m,int &fld,V3 &axis){ |
| 521 | QList<Matrix> so; |
| 522 | so<< |
| 523 | Matrix( 1, 0, 0, 0, 1, 0, 0, 0, 1)<<Matrix(-1, 0, 0, 0,-1, 0, 0, 0,-1)<<Matrix( 1, 0, 0, 0,-1, 0, 0, 0,-1)<<Matrix( 1,-1, 0, 0,-1, 0, 0, 0,-1)<< |
| 524 | Matrix(-1, 0, 0, 0, 1, 0, 0, 0,-1)<<Matrix(-1, 0, 0,-1, 1, 0, 0, 0,-1)<<Matrix(-1, 0, 0, 0,-1, 0, 0, 0, 1)<<Matrix( 0, 1, 0, 1, 0, 0, 0, 0,-1)<< |
| 525 | Matrix( 0,-1, 0,-1, 0, 0, 0, 0,-1)<<Matrix( 0, 0, 1, 0,-1, 0, 1, 0, 0)<<Matrix( 0, 0,-1, 0,-1, 0,-1, 0, 0)<<Matrix(-1, 0, 0, 0, 0, 1, 0, 1, 0)<< |
| 526 | Matrix(-1, 0, 0, 0, 0,-1, 0,-1, 0)<<Matrix( 1, 0, 0, 1,-1, 0, 0, 0,-1)<<Matrix(-1, 1, 0, 0, 1, 0, 0, 0,-1)<<Matrix(-1, 0, 0, 0, 1, 0, 0, 0, 1)<< |
| 527 | Matrix(-1, 1, 0, 0, 1, 0, 0, 0, 1)<<Matrix( 1, 0, 0, 0,-1, 0, 0, 0, 1)<<Matrix( 1, 0, 0, 1,-1, 0, 0, 0, 1)<<Matrix( 1, 0, 0, 0, 1, 0, 0, 0,-1)<< |
| 528 | Matrix( 0,-1, 0,-1, 0, 0, 0, 0, 1)<<Matrix( 0, 1, 0, 1, 0, 0, 0, 0, 1)<<Matrix( 0, 0,-1, 0, 1, 0,-1, 0, 0)<<Matrix( 0, 0, 1, 0, 1, 0, 1, 0, 0)<< |
| 529 | Matrix( 1, 0, 0, 0, 0,-1, 0,-1, 0)<<Matrix( 1, 0, 0, 0, 0, 1, 0, 1, 0)<<Matrix(-1, 0, 0,-1, 1, 0, 0, 0, 1)<<Matrix( 1,-1, 0, 0,-1, 0, 0, 0, 1)<< |
| 530 | Matrix( 0,-1, 0, 1,-1, 0, 0, 0, 1)<<Matrix(-1, 1, 0,-1, 0, 0, 0, 0, 1)<<Matrix( 0, 0, 1, 1, 0, 0, 0, 1, 0)<<Matrix( 0, 1, 0, 0, 0, 1, 1, 0, 0)<< |
| 531 | Matrix( 0, 0,-1,-1, 0, 0, 0, 1, 0)<<Matrix( 0,-1, 0, 0, 0, 1,-1, 0, 0)<<Matrix( 0, 0, 1,-1, 0, 0, 0,-1, 0)<<Matrix( 0,-1, 0, 0, 0,-1, 1, 0, 0)<< |
| 532 | Matrix( 0, 0,-1, 1, 0, 0, 0,-1, 0)<<Matrix( 0, 1, 0, 0, 0,-1,-1, 0, 0)<<Matrix( 0, 1, 0,-1, 1, 0, 0, 0,-1)<<Matrix( 1,-1, 0, 1, 0, 0, 0, 0,-1)<< |
| 533 | Matrix( 0, 0,-1,-1, 0, 0, 0,-1, 0)<<Matrix( 0,-1, 0, 0, 0,-1,-1, 0, 0)<<Matrix( 0, 0, 1, 1, 0, 0, 0,-1, 0)<<Matrix( 0, 1, 0, 0, 0,-1, 1, 0, 0)<< |
| 534 | Matrix( 0, 0,-1, 1, 0, 0, 0, 1, 0)<<Matrix( 0, 1, 0, 0, 0, 1,-1, 0, 0)<<Matrix( 0, 0, 1,-1, 0, 0, 0, 1, 0)<<Matrix( 0,-1, 0, 0, 0, 1, 1, 0, 0)<< |
| 535 | Matrix( 0,-1, 0, 1, 0, 0, 0, 0, 1)<<Matrix( 0, 1, 0,-1, 0, 0, 0, 0, 1)<<Matrix( 1, 0, 0, 0, 0,-1, 0, 1, 0)<<Matrix( 1, 0, 0, 0, 0, 1, 0,-1, 0)<< |
| 536 | Matrix( 0, 0, 1, 0, 1, 0,-1, 0, 0)<<Matrix( 0, 0,-1, 0, 1, 0, 1, 0, 0)<<Matrix( 0, 1, 0,-1, 0, 0, 0, 0,-1)<<Matrix( 0,-1, 0, 1, 0, 0, 0, 0,-1)<< |
| 537 | Matrix(-1, 0, 0, 0, 0, 1, 0,-1, 0)<<Matrix(-1, 0, 0, 0, 0,-1, 0, 1, 0)<<Matrix( 0, 0,-1, 0,-1, 0, 1, 0, 0)<<Matrix( 0, 0, 1, 0,-1, 0,-1, 0, 0)<< |
| 538 | Matrix( 1,-1, 0, 1, 0, 0, 0, 0, 1)<<Matrix( 0, 1, 0,-1, 1, 0, 0, 0, 1)<<Matrix(-1, 1, 0,-1, 0, 0, 0, 0,-1)<<Matrix( 0,-1, 0, 1,-1, 0, 0, 0,-1); |
| 539 | QList<V3>axn; |
| 540 | axn<< |
| 541 | |
| 542 | V3( 0, 0, 0)<<//1 "1")); |
| 543 | V3( 0, 0, 0)<<//2 "-1")); |
| 544 | V3( 1, 0, 0)<<//3 "2 x,0,0")); |
| 545 | V3( 1, 0, 0)<<//4 "2 x,0,0")); |
| 546 | V3( 0, 1, 0)<<//5 "2 0,y,0")); |
| 547 | V3( 0, 1, 0)<<//6 "2 0,y,0")); |
| 548 | V3( 0, 0, 1)<<//7 "2 0,0,z")); |
| 549 | V3( 1, 1, 0)<<//8 "2 x,x,0")); |
| 550 | V3( 1,-1, 0)<<//9 "2 x,-x,0")); |
| 551 | V3( 1, 0, 1)<<//10 "2 x,0,x")); |
| 552 | V3(-1, 0, 1)<<//11 "2 -x,0,x")); |
| 553 | V3( 0, 1, 1)<<//12 "2 0,x,x")); |
| 554 | V3( 0, 1,-1)<<//13 "2 0,x,-x")); |
| 555 | V3( 2, 1, 0)<<//14 "2 2x,x,0")); |
| 556 | V3( 1, 2, 0)<<//15 "2 x,2x,0")); |
| 557 | V3( 1, 0, 0)<<//16 "m 0,y,z")); |
| 558 | V3( 2,-1, 0)<<//17 "m x,2x,z")); |
| 559 | V3( 0, 1, 0)<<//18 "m x,0,z")); |
| 560 | V3(-1, 2, 0)<<//19 "m 2x,x,z")); |
| 561 | V3( 0, 0, 1)<<//20 "m x,y,0")); |
| 562 | V3( 1, 1, 0)<<//21 "m x,-x,z")); |
| 563 | V3( 1,-1, 0)<<//22 "m x,x,z")); |
| 564 | V3( 1, 0, 1)<<//23 "m -x,y,x")); |
| 565 | V3(-1, 0, 1)<<//24 "m x,y,x")); |
| 566 | V3( 0, 1, 1)<<//25 "m x,y,-y")); |
| 567 | V3( 0, 1,-1)<<//26 "m x,y,y")); |
| 568 | V3( 1, 0, 0)<<//27 "m 0,y,z")); |
| 569 | V3( 0, 1, 0)<<//28 "m x,0,z")); |
| 570 | V3( 0, 0, 1)<<//29 "3+ 0,0,z")); |
| 571 | V3( 0, 0, 1)<<//30 "3- 0,0,z")); |
| 572 | V3( 1, 1, 1)<<//31 "3+ x,x,x")); |
| 573 | V3( 1, 1, 1)<<//32 "3- x,x,x")); |
| 574 | V3( 1,-1,-1)<<//33 "3+ x,-x,-x")); |
| 575 | V3( 1,-1,-1)<<//34 "3- x,-x,-x")); |
| 576 | V3(-1, 1,-1)<<//35 "3+ -x,x,-x")); |
| 577 | V3(-1, 1,-1)<<//36 "3- -x,x,-x")); |
| 578 | V3(-1,-1, 1)<<//37 "3+ -x,-x,x")); |
| 579 | V3(-1,-1, 1)<<//38 "3- -x,-x,x")); |
| 580 | V3( 0, 0, 1)<<//39 "-3+ 0,0,z")); |
| 581 | V3( 0, 0, 1)<<//40 "-3- 0,0,z")); |
| 582 | V3( 1, 1, 1)<<//41 "-3+ x,x,x")); |
| 583 | V3( 1, 1, 1)<<//42 "-3- x,x,x")); |
| 584 | V3( 1,-1,-1)<<//43 "-3+ x,-x,-x")); |
| 585 | V3( 1,-1,-1)<<//44 "-3- x,-x,-x")); |
| 586 | V3(-1, 1,-1)<<//45 "-3+ -x,x,-x")); |
| 587 | V3(-1, 1,-1)<<//46 "-3- -x,x,-x")); |
| 588 | V3(-1,-1, 1)<<//47 "-3+ -x,-x,x")); |
| 589 | V3(-1,-1, 1)<<//48 "-3- -x,-x,x")); |
| 590 | V3( 0, 0, 1)<<//49 "4+ 0,0,z")); |
| 591 | V3( 0, 0, 1)<<//50 "4- 0,0,z")); |
| 592 | V3( 1, 0, 0)<<//51 "4+ x,0,0")); |
| 593 | V3( 1, 0, 0)<<//52 "4- x,0,0")); |
| 594 | V3( 0, 1, 0)<<//53 "4+ 0,y,0")); |
| 595 | V3( 0, 1, 0)<<//54 "4- 0,y,0")); |
| 596 | V3( 0, 0, 1)<<//55 "-4+ 0,0,z")); |
| 597 | V3( 0, 0, 1)<<//56 "-4- 0,0,z")); |
| 598 | V3( 1, 0, 0)<<//57 "-4+ x,0,0")); |
| 599 | V3( 1, 0, 0)<<//58 "-4- x,0,0")); |
| 600 | V3( 0, 1, 0)<<//59 "-4+ 0,y,0")); |
| 601 | V3( 0, 1, 0)<<//60 "-4- 0,y,0")); |
| 602 | V3( 0, 0, 1)<<//61 "6+ 0,0,z")); |
| 603 | V3( 0, 0, 1)<<//62 "6- 0,0,z")); |
| 604 | V3( 0, 0, 1)<<//63 "-6+ 0,0,z")); |
| 605 | V3( 0, 0, 1);//64 "-6- 0,0,z")); |
| 606 | |
| 607 | QStringList n; |
| 608 | n.append(QString("1")); |
| 609 | n.append(QString("-1")); |
| 610 | n.append(QString("2 x,0,0")); |
| 611 | n.append(QString("2 x,0,0")); |
| 612 | n.append(QString("2 0,y,0")); |
| 613 | n.append(QString("2 0,y,0")); |
| 614 | n.append(QString("2 0,0,z")); |
| 615 | n.append(QString("2 x,x,0")); |
| 616 | n.append(QString("2 x,-x,0")); |
| 617 | n.append(QString("2 x,0,x")); |
| 618 | n.append(QString("2 -x,0,x")); |
| 619 | n.append(QString("2 0,x,x")); |
| 620 | n.append(QString("2 0,x,-x")); |
| 621 | n.append(QString("2 2x,x,0")); |
| 622 | n.append(QString("2 x,2x,0")); |
| 623 | n.append(QString("m 0,y,z")); |
| 624 | n.append(QString("m x,2x,z")); |
| 625 | n.append(QString("m x,0,z")); |
| 626 | n.append(QString("m 2x,x,z")); |
| 627 | n.append(QString("m x,y,0")); |
| 628 | n.append(QString("m x,-x,z")); |
| 629 | n.append(QString("m x,x,z")); |
| 630 | n.append(QString("m -x,y,x")); |
| 631 | n.append(QString("m x,y,x")); |
| 632 | n.append(QString("m x,y,-y")); |
| 633 | n.append(QString("m x,y,y")); |
| 634 | n.append(QString("m 0,y,z")); |
| 635 | n.append(QString("m x,0,z")); |
| 636 | n.append(QString("3+ 0,0,z")); |
| 637 | n.append(QString("3- 0,0,z")); |
| 638 | n.append(QString("3+ x,x,x")); |
| 639 | n.append(QString("3- x,x,x")); |
| 640 | n.append(QString("3+ x,-x,-x")); |
| 641 | n.append(QString("3- x,-x,-x")); |
| 642 | n.append(QString("3+ -x,x,-x")); |
| 643 | n.append(QString("3- -x,x,-x")); |
| 644 | n.append(QString("3+ -x,-x,x")); |
| 645 | n.append(QString("3- -x,-x,x")); |
| 646 | n.append(QString("-3+ 0,0,z")); |
| 647 | n.append(QString("-3- 0,0,z")); |
| 648 | n.append(QString("-3+ x,x,x")); |
| 649 | n.append(QString("-3- x,x,x")); |
| 650 | n.append(QString("-3+ x,-x,-x")); |
| 651 | n.append(QString("-3- x,-x,-x")); |
| 652 | n.append(QString("-3+ -x,x,-x")); |
| 653 | n.append(QString("-3- -x,x,-x")); |
| 654 | n.append(QString("-3+ -x,-x,x")); |
| 655 | n.append(QString("-3- -x,-x,x")); |
| 656 | n.append(QString("4+ 0,0,z")); |
| 657 | n.append(QString("4- 0,0,z")); |
| 658 | n.append(QString("4+ x,0,0")); |
| 659 | n.append(QString("4- x,0,0")); |
| 660 | n.append(QString("4+ 0,y,0")); |
| 661 | n.append(QString("4- 0,y,0")); |
| 662 | n.append(QString("-4+ 0,0,z")); |
| 663 | n.append(QString("-4- 0,0,z")); |
| 664 | n.append(QString("-4+ x,0,0")); |
| 665 | n.append(QString("-4- x,0,0")); |
| 666 | n.append(QString("-4+ 0,y,0")); |
| 667 | n.append(QString("-4- 0,y,0")); |
| 668 | n.append(QString("6+ 0,0,z")); |
| 669 | n.append(QString("6- 0,0,z")); |
| 670 | n.append(QString("-6+ 0,0,z")); |
| 671 | n.append(QString("-6- 0,0,z")); |
| 672 | int i=so.indexOf(m); |
| 673 | int fold[64]={1, -1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -3, -3, |
| 674 | -3, -3, -3, -3, -3, -3, -3, -3, 4, 4, 4, 4, 4, 4, -4, -4, -4, -4, -4, -4, 6, 6, -6, -6}; |
| 675 | |
| 676 | //printf("!!## %d %s\n",i,n.at(i).toStdString().c_str()); |
| 677 | if (i>-1) { |
| 678 | fld=fold[i]; |
| 679 | axis=axn[i]; |
| 680 | return n.at(i); |
| 681 | } |
| 682 | fld=0; |
| 683 | axis=V3(0,0,0); |
| 684 | return QString("none"); |
| 685 | } |
| 686 | int Molecule::afix5(const CEnvironment &atm, int idx){ |
| 687 | int f5 = 0,m,cnt = 0,aafx=-1; |
| 688 | if (atm.at(idx).afix==0) return 0; |
| 689 | // printf("AFIXm5 %d (%s)\n",showatoms.at(idx).afix,showatoms.at(idx).Label.toStdString().c_str()); |
| 690 | for (int i = 0; (i <= idx) && (i < atm.size()); i++){ |
| 691 | if (atm.at(i).an > 0){ |
| 692 | if (aafx != atm.at(i).afix) cnt = 0;// afix is different than before => reset the counter |
| 693 | aafx = atm.at(i).afix; |
| 694 | m = atm.at(i).afix / 10; |
| 695 | switch (m) { |
| 696 | case 0://afix 6 afix 9 |
| 697 | //printf("ehm m is zero?\n"); |
| 698 | f5=5; |
| 699 | break; |
| 700 | case 6://66 for phenyl rings |
| 701 | cnt++; |
| 702 | f5 = (cnt % 6)? m * 10 + 5: 0; |
| 703 | // printf("cnt%d %s\n",cnt,showatoms.at(i).Label.toStdString().c_str()); |
| 704 | break; |
| 705 | case 5://56 planar regular 5 membered ring (cp) |
| 706 | cnt++; |
| 707 | f5 = (cnt % 5)? m * 10 + 5: 0; |
| 708 | break; |
| 709 | case 10://cp* |
| 710 | cnt++; |
| 711 | f5 = (cnt % 10)? m * 10 + 5: 0; |
| 712 | break; |
| 713 | case 11://naphtyl |
| 714 | cnt++; |
| 715 | f5 = (cnt % 10)? m * 10 + 5: 0; |
| 716 | break; |
| 717 | } |
| 718 | } |
| 719 | } |
| 720 | // printf("==> %d aafx%d m%d cnt%d idx%d %s\n",f5,aafx,m,cnt,idx,showatoms.at(idx).Label.toStdString().c_str()); |
| 721 | return f5; |
| 722 | } |
| 723 | |
| 724 | Matrix Molecule::rotarb(double *arr){ |
| 725 | double phi=arr[0]/180*M_PI; |
| 726 | double c=cos(phi); |
| 727 | double s=sin(phi); |
| 728 | double omc=1-c; |
| 729 | Matrix m(c+arr[1]*arr[1]*omc,arr[1]*arr[2]*omc-s*arr[3],arr[1]*arr[3]*omc+s*arr[2], |
| 730 | arr[1]*arr[2]*omc+s*arr[3],c+arr[2]*arr[2]*omc,arr[2]*arr[3]*omc-s*arr[1], |
| 731 | arr[1]*arr[3]*omc-s*arr[2],arr[2]*arr[3]*omc+s*arr[1],c+arr[3]*arr[3]*omc); |
| 732 | return m; |
| 733 | } |
| 734 | |
| 735 | Matrix Molecule::rotarb(double angle, V3 &arr){ |
| 736 | double phi=angle/180*M_PI; |
| 737 | double c=cos(phi); |
| 738 | double s=sin(phi); |
| 739 | double omc=1-c; |
| 740 | Matrix m(c+arr.x*arr.x*omc,arr.x*arr.y*omc-s*arr.z,arr.x*arr.z*omc+s*arr.y, |
| 741 | arr.x*arr.y*omc+s*arr.z,c+arr.y*arr.y*omc,arr.y*arr.z*omc-s*arr.x, |
| 742 | arr.x*arr.z*omc-s*arr.y,arr.y*arr.z*omc+s*arr.x,c+arr.z*arr.z*omc); |
| 743 | return m; |
| 744 | } |
| 745 | |
| 746 | void Molecule::rotarb(Matrix &mat, double angle, V3 &arr){ |
| 747 | double phi=angle/180*M_PI; |
| 748 | double c=cos(phi); |
| 749 | double s=sin(phi); |
| 750 | double omc=1-c; |
| 751 | Matrix oma=mat; |
| 752 | mat.m11= c + arr.x * arr.x * omc; |
| 753 | mat.m12= arr.x * arr.y * omc - s * arr.z; |
| 754 | mat.m13= arr.x * arr.z * omc + s * arr.y; |
| 755 | |
| 756 | mat.m21= arr.y * arr.x * omc + s * arr.z; |
| 757 | mat.m22= c + arr.y * arr.y * omc; |
| 758 | mat.m23= arr.y * arr.z * omc - s * arr.x; |
| 759 | |
| 760 | mat.m31= arr.z * arr.x * omc - s * arr.y; |
| 761 | mat.m32= arr.z * arr.y * omc + s * arr.x; |
| 762 | mat.m33= c + arr.z * arr.z * omc; |
| 763 | mat=mat*oma; |
| 764 | } |
| 765 | |
| 766 | |
| 767 | void Molecule::exportOBJ(QString fileName,const CEnvironment &_atoms, const Connection &_bonds){ |
| 768 | const GLuint idx2[960] = { |
| 769 | 1, 42, 44,// 0 0.275904 0.321244 0.275904 |
| 770 | 42, 12, 43,// 1 0.275904 0.312869 0.285473 |
| 771 | 43, 14, 44,// 2 0.312869 0.275904 0.285473 |
| 772 | 42, 43, 44,// 3 0.285473 0.285473 0.321244 |
| 773 | 12, 45, 47,// 4 0.275904 0.285473 0.312869 |
| 774 | 45, 0, 46,// 5 0.275904 0.275904 0.321244 |
| 775 | 46, 13, 47,// 6 0.275904 0.312869 0.285473 |
| 776 | 45, 46, 47,// 7 0.321244 0.285473 0.285473 |
| 777 | 13, 48, 50,// 8 0.275904 0.285473 0.312869 |
| 778 | 48, 5, 49,// 9 0.275904 0.275904 0.321244 |
| 779 | 49, 14, 50,// 10 0.275904 0.312869 0.285473 |
| 780 | 48, 49, 50,// 11 0.321244 0.285473 0.285473 |
| 781 | 12, 47, 43,// 12 0.312869 0.324920 0.312869 |
| 782 | 47, 13, 50,// 13 0.312869 0.312869 0.324920 |
| 783 | 50, 14, 43,// 14 0.312869 0.312869 0.324920 |
| 784 | 47, 50, 43,// 15 0.324920 0.324920 0.324920 |
| 785 | 0, 45, 52,// 16 0.275904 0.321244 0.275904 |
| 786 | 45, 12, 51,// 17 0.275904 0.312869 0.285473 |
| 787 | 51, 16, 52,// 18 0.312869 0.275904 0.285473 |
| 788 | 45, 51, 52,// 19 0.285473 0.285473 0.321244 |
| 789 | 12, 42, 54,// 20 0.275904 0.285473 0.312869 |
| 790 | 42, 1, 53,// 21 0.275904 0.275904 0.321244 |
| 791 | 53, 15, 54,// 22 0.275904 0.312869 0.285473 |
| 792 | 42, 53, 54,// 23 0.321244 0.285473 0.285473 |
| 793 | 15, 55, 57,// 24 0.275904 0.285473 0.312869 |
| 794 | 55, 7, 56,// 25 0.275904 0.275904 0.321244 |
| 795 | 56, 16, 57,// 26 0.275904 0.312869 0.285473 |
| 796 | 55, 56, 57,// 27 0.321244 0.285473 0.285473 |
| 797 | 12, 54, 51,// 28 0.312869 0.324920 0.312869 |
| 798 | 54, 15, 57,// 29 0.312869 0.312869 0.324920 |
| 799 | 57, 16, 51,// 30 0.312869 0.312869 0.324920 |
| 800 | 54, 57, 51,// 31 0.324920 0.324920 0.324920 |
| 801 | 10, 58, 60,// 32 0.275904 0.321244 0.275904 |
| 802 | 58, 17, 59,// 33 0.275904 0.312869 0.285473 |
| 803 | 59, 18, 60,// 34 0.312869 0.275904 0.285473 |
| 804 | 58, 59, 60,// 35 0.285473 0.285473 0.321244 |
| 805 | 17, 61, 62,// 36 0.275904 0.285473 0.312869 |
| 806 | 61, 0, 52,// 37 0.275904 0.275904 0.321244 |
| 807 | 52, 16, 62,// 38 0.275904 0.312869 0.285473 |
| 808 | 61, 52, 62,// 39 0.321244 0.285473 0.285473 |
| 809 | 16, 56, 64,// 40 0.275904 0.285473 0.312869 |
| 810 | 56, 7, 63,// 41 0.275904 0.275904 0.321244 |
| 811 | 63, 18, 64,// 42 0.275904 0.312869 0.285473 |
| 812 | 56, 63, 64,// 43 0.321244 0.285473 0.285473 |
| 813 | 17, 62, 59,// 44 0.312869 0.324920 0.312869 |
| 814 | 62, 16, 64,// 45 0.312869 0.312869 0.324920 |
| 815 | 64, 18, 59,// 46 0.312869 0.312869 0.324920 |
| 816 | 62, 64, 59,// 47 0.324920 0.324920 0.324920 |
| 817 | 0, 61, 66,// 48 0.275904 0.321244 0.275904 |
| 818 | 61, 17, 65,// 49 0.275904 0.312869 0.285473 |
| 819 | 65, 20, 66,// 50 0.312869 0.275904 0.285473 |
| 820 | 61, 65, 66,// 51 0.285473 0.285473 0.321244 |
| 821 | 17, 58, 68,// 52 0.275904 0.285473 0.312869 |
| 822 | 58, 10, 67,// 53 0.275904 0.275904 0.321244 |
| 823 | 67, 19, 68,// 54 0.275904 0.312869 0.285473 |
| 824 | 58, 67, 68,// 55 0.321244 0.285473 0.285473 |
| 825 | 19, 69, 71,// 56 0.275904 0.285473 0.312869 |
| 826 | 69, 11, 70,// 57 0.275904 0.275904 0.321244 |
| 827 | 70, 20, 71,// 58 0.275904 0.312869 0.285473 |
| 828 | 69, 70, 71,// 59 0.321244 0.285473 0.285473 |
| 829 | 17, 68, 65,// 60 0.312869 0.324920 0.312869 |
| 830 | 68, 19, 71,// 61 0.312869 0.312869 0.324920 |
| 831 | 71, 20, 65,// 62 0.312869 0.312869 0.324920 |
| 832 | 68, 71, 65,// 63 0.324920 0.324920 0.324920 |
| 833 | 11, 72, 70,// 64 0.275904 0.321244 0.275904 |
| 834 | 72, 21, 73,// 65 0.275904 0.312869 0.285473 |
| 835 | 73, 20, 70,// 66 0.312869 0.275904 0.285473 |
| 836 | 72, 73, 70,// 67 0.285473 0.285473 0.321244 |
| 837 | 21, 74, 75,// 68 0.275904 0.285473 0.312869 |
| 838 | 74, 5, 48,// 69 0.275904 0.275904 0.321244 |
| 839 | 48, 13, 75,// 70 0.275904 0.312869 0.285473 |
| 840 | 74, 48, 75,// 71 0.321244 0.285473 0.285473 |
| 841 | 13, 46, 76,// 72 0.275904 0.285473 0.312869 |
| 842 | 46, 0, 66,// 73 0.275904 0.275904 0.321244 |
| 843 | 66, 20, 76,// 74 0.275904 0.312869 0.285473 |
| 844 | 46, 66, 76,// 75 0.321244 0.285473 0.285473 |
| 845 | 21, 75, 73,// 76 0.312869 0.324920 0.312869 |
| 846 | 75, 13, 76,// 77 0.312869 0.312869 0.324920 |
| 847 | 76, 20, 73,// 78 0.312869 0.312869 0.324920 |
| 848 | 75, 76, 73,// 79 0.324920 0.324920 0.324920 |
| 849 | 5, 74, 78,// 80 0.275904 0.321244 0.275904 |
| 850 | 74, 21, 77,// 81 0.275904 0.312869 0.285473 |
| 851 | 77, 23, 78,// 82 0.312869 0.275904 0.285473 |
| 852 | 74, 77, 78,// 83 0.285473 0.285473 0.321244 |
| 853 | 21, 72, 80,// 84 0.275904 0.285473 0.312869 |
| 854 | 72, 11, 79,// 85 0.275904 0.275904 0.321244 |
| 855 | 79, 22, 80,// 86 0.275904 0.312869 0.285473 |
| 856 | 72, 79, 80,// 87 0.321244 0.285473 0.285473 |
| 857 | 22, 81, 83,// 88 0.275904 0.285473 0.312869 |
| 858 | 81, 4, 82,// 89 0.275904 0.275904 0.321244 |
| 859 | 82, 23, 83,// 90 0.275904 0.312869 0.285473 |
| 860 | 81, 82, 83,// 91 0.321244 0.285473 0.285473 |
| 861 | 21, 80, 77,// 92 0.312869 0.324920 0.312869 |
| 862 | 80, 22, 83,// 93 0.312869 0.312869 0.324920 |
| 863 | 83, 23, 77,// 94 0.312869 0.312869 0.324920 |
| 864 | 80, 83, 77,// 95 0.324920 0.324920 0.324920 |
| 865 | 2, 84, 86,// 96 0.275904 0.321244 0.275904 |
| 866 | 84, 24, 85,// 97 0.275904 0.312869 0.285473 |
| 867 | 85, 25, 86,// 98 0.312869 0.275904 0.285473 |
| 868 | 84, 85, 86,// 99 0.285473 0.285473 0.321244 |
| 869 | 24, 87, 88,//100 0.275904 0.285473 0.312869 |
| 870 | 87, 11, 69,//101 0.275904 0.275904 0.321244 |
| 871 | 69, 19, 88,//102 0.275904 0.312869 0.285473 |
| 872 | 87, 69, 88,//103 0.321244 0.285473 0.285473 |
| 873 | 19, 67, 90,//104 0.275904 0.285473 0.312869 |
| 874 | 67, 10, 89,//105 0.275904 0.275904 0.321244 |
| 875 | 89, 25, 90,//106 0.275904 0.312869 0.285473 |
| 876 | 67, 89, 90,//107 0.321244 0.285473 0.285473 |
| 877 | 24, 88, 85,//108 0.312869 0.324920 0.312869 |
| 878 | 88, 19, 90,//109 0.312869 0.312869 0.324920 |
| 879 | 90, 25, 85,//110 0.312869 0.312869 0.324920 |
| 880 | 88, 90, 85,//111 0.324920 0.324920 0.324920 |
| 881 | 11, 87, 79,//112 0.275904 0.321244 0.275904 |
| 882 | 87, 24, 91,//113 0.275904 0.312869 0.285473 |
| 883 | 91, 22, 79,//114 0.312869 0.275904 0.285473 |
| 884 | 87, 91, 79,//115 0.285473 0.285473 0.321244 |
| 885 | 24, 84, 93,//116 0.275904 0.285473 0.312869 |
| 886 | 84, 2, 92,//117 0.275904 0.275904 0.321244 |
| 887 | 92, 26, 93,//118 0.275904 0.312869 0.285473 |
| 888 | 84, 92, 93,//119 0.321244 0.285473 0.285473 |
| 889 | 26, 94, 95,//120 0.275904 0.285473 0.312869 |
| 890 | 94, 4, 81,//121 0.275904 0.275904 0.321244 |
| 891 | 81, 22, 95,//122 0.275904 0.312869 0.285473 |
| 892 | 94, 81, 95,//123 0.321244 0.285473 0.285473 |
| 893 | 24, 93, 91,//124 0.312869 0.324920 0.312869 |
| 894 | 93, 26, 95,//125 0.312869 0.312869 0.324920 |
| 895 | 95, 22, 91,//126 0.312869 0.312869 0.324920 |
| 896 | 93, 95, 91,//127 0.324920 0.324920 0.324920 |
| 897 | 10, 96, 89,//128 0.275904 0.321244 0.275904 |
| 898 | 96, 27, 97,//129 0.275904 0.312869 0.285473 |
| 899 | 97, 25, 89,//130 0.312869 0.275904 0.285473 |
| 900 | 96, 97, 89,//131 0.285473 0.285473 0.321244 |
| 901 | 27, 98, 100,//132 0.275904 0.285473 0.312869 |
| 902 | 98, 6, 99,//133 0.275904 0.275904 0.321244 |
| 903 | 99, 28, 100,//134 0.275904 0.312869 0.285473 |
| 904 | 98, 99, 100,//135 0.321244 0.285473 0.285473 |
| 905 | 28, 101, 102,//136 0.275904 0.285473 0.312869 |
| 906 | 101, 2, 86,//137 0.275904 0.275904 0.321244 |
| 907 | 86, 25, 102,//138 0.275904 0.312869 0.285473 |
| 908 | 101, 86, 102,//139 0.321244 0.285473 0.285473 |
| 909 | 27, 100, 97,//140 0.312869 0.324920 0.312869 |
| 910 | 100, 28, 102,//141 0.312869 0.312869 0.324920 |
| 911 | 102, 25, 97,//142 0.312869 0.312869 0.324920 |
| 912 | 100, 102, 97,//143 0.324920 0.324920 0.324920 |
| 913 | 6, 98, 104,//144 0.275904 0.321244 0.275904 |
| 914 | 98, 27, 103,//145 0.275904 0.312869 0.285473 |
| 915 | 103, 29, 104,//146 0.312869 0.275904 0.285473 |
| 916 | 98, 103, 104,//147 0.285473 0.285473 0.321244 |
| 917 | 27, 96, 105,//148 0.275904 0.285473 0.312869 |
| 918 | 96, 10, 60,//149 0.275904 0.275904 0.321244 |
| 919 | 60, 18, 105,//150 0.275904 0.312869 0.285473 |
| 920 | 96, 60, 105,//151 0.321244 0.285473 0.285473 |
| 921 | 18, 63, 107,//152 0.275904 0.285473 0.312869 |
| 922 | 63, 7, 106,//153 0.275904 0.275904 0.321244 |
| 923 | 106, 29, 107,//154 0.275904 0.312869 0.285473 |
| 924 | 63, 106, 107,//155 0.321244 0.285473 0.285473 |
| 925 | 27, 105, 103,//156 0.312869 0.324920 0.312869 |
| 926 | 105, 18, 107,//157 0.312869 0.312869 0.324920 |
| 927 | 107, 29, 103,//158 0.312869 0.312869 0.324920 |
| 928 | 105, 107, 103,//159 0.324920 0.324920 0.324920 |
| 929 | 7, 108, 106,//160 0.275904 0.321244 0.275904 |
| 930 | 108, 30, 109,//161 0.275904 0.312869 0.285473 |
| 931 | 109, 29, 106,//162 0.312869 0.275904 0.285473 |
| 932 | 108, 109, 106,//163 0.285473 0.285473 0.321244 |
| 933 | 30, 110, 112,//164 0.275904 0.285473 0.312869 |
| 934 | 110, 8, 111,//165 0.275904 0.275904 0.321244 |
| 935 | 111, 31, 112,//166 0.275904 0.312869 0.285473 |
| 936 | 110, 111, 112,//167 0.321244 0.285473 0.285473 |
| 937 | 31, 113, 114,//168 0.275904 0.285473 0.312869 |
| 938 | 113, 6, 104,//169 0.275904 0.275904 0.321244 |
| 939 | 104, 29, 114,//170 0.275904 0.312869 0.285473 |
| 940 | 113, 104, 114,//171 0.321244 0.285473 0.285473 |
| 941 | 30, 112, 109,//172 0.312869 0.324920 0.312869 |
| 942 | 112, 31, 114,//173 0.312869 0.312869 0.324920 |
| 943 | 114, 29, 109,//174 0.312869 0.312869 0.324920 |
| 944 | 112, 114, 109,//175 0.324920 0.324920 0.324920 |
| 945 | 8, 110, 116,//176 0.275904 0.321244 0.275904 |
| 946 | 110, 30, 115,//177 0.275904 0.312869 0.285473 |
| 947 | 115, 32, 116,//178 0.312869 0.275904 0.285473 |
| 948 | 110, 115, 116,//179 0.285473 0.285473 0.321244 |
| 949 | 30, 108, 117,//180 0.275904 0.285473 0.312869 |
| 950 | 108, 7, 55,//181 0.275904 0.275904 0.321244 |
| 951 | 55, 15, 117,//182 0.275904 0.312869 0.285473 |
| 952 | 108, 55, 117,//183 0.321244 0.285473 0.285473 |
| 953 | 15, 53, 119,//184 0.275904 0.285473 0.312869 |
| 954 | 53, 1, 118,//185 0.275904 0.275904 0.321244 |
| 955 | 118, 32, 119,//186 0.275904 0.312869 0.285473 |
| 956 | 53, 118, 119,//187 0.321244 0.285473 0.285473 |
| 957 | 30, 117, 115,//188 0.312869 0.324920 0.312869 |
| 958 | 117, 15, 119,//189 0.312869 0.312869 0.324920 |
| 959 | 119, 32, 115,//190 0.312869 0.312869 0.324920 |
| 960 | 117, 119, 115,//191 0.324920 0.324920 0.324920 |
| 961 | 9, 120, 122,//192 0.275904 0.321244 0.275904 |
| 962 | 120, 33, 121,//193 0.275904 0.312869 0.285473 |
| 963 | 121, 34, 122,//194 0.312869 0.275904 0.285473 |
| 964 | 120, 121, 122,//195 0.285473 0.285473 0.321244 |
| 965 | 33, 123, 124,//196 0.275904 0.285473 0.312869 |
| 966 | 123, 1, 44,//197 0.275904 0.275904 0.321244 |
| 967 | 44, 14, 124,//198 0.275904 0.312869 0.285473 |
| 968 | 123, 44, 124,//199 0.321244 0.285473 0.285473 |
| 969 | 14, 49, 126,//200 0.275904 0.285473 0.312869 |
| 970 | 49, 5, 125,//201 0.275904 0.275904 0.321244 |
| 971 | 125, 34, 126,//202 0.275904 0.312869 0.285473 |
| 972 | 49, 125, 126,//203 0.321244 0.285473 0.285473 |
| 973 | 33, 124, 121,//204 0.312869 0.324920 0.312869 |
| 974 | 124, 14, 126,//205 0.312869 0.312869 0.324920 |
| 975 | 126, 34, 121,//206 0.312869 0.312869 0.324920 |
| 976 | 124, 126, 121,//207 0.324920 0.324920 0.324920 |
| 977 | 1, 123, 118,//208 0.275904 0.321244 0.275904 |
| 978 | 123, 33, 127,//209 0.275904 0.312869 0.285473 |
| 979 | 127, 32, 118,//210 0.312869 0.275904 0.285473 |
| 980 | 123, 127, 118,//211 0.285473 0.285473 0.321244 |
| 981 | 33, 120, 129,//212 0.275904 0.285473 0.312869 |
| 982 | 120, 9, 128,//213 0.275904 0.275904 0.321244 |
| 983 | 128, 35, 129,//214 0.275904 0.312869 0.285473 |
| 984 | 120, 128, 129,//215 0.321244 0.285473 0.285473 |
| 985 | 35, 130, 131,//216 0.275904 0.285473 0.312869 |
| 986 | 130, 8, 116,//217 0.275904 0.275904 0.321244 |
| 987 | 116, 32, 131,//218 0.275904 0.312869 0.285473 |
| 988 | 130, 116, 131,//219 0.321244 0.285473 0.285473 |
| 989 | 33, 129, 127,//220 0.312869 0.324920 0.312869 |
| 990 | 129, 35, 131,//221 0.312869 0.312869 0.324920 |
| 991 | 131, 32, 127,//222 0.312869 0.312869 0.324920 |
| 992 | 129, 131, 127,//223 0.324920 0.324920 0.324920 |
| 993 | 4, 132, 82,//224 0.275904 0.321244 0.275904 |
| 994 | 132, 36, 133,//225 0.275904 0.312869 0.285473 |
| 995 | 133, 23, 82,//226 0.312869 0.275904 0.285473 |
| 996 | 132, 133, 82,//227 0.285473 0.285473 0.321244 |
| 997 | 36, 134, 135,//228 0.275904 0.285473 0.312869 |
| 998 | 134, 9, 122,//229 0.275904 0.275904 0.321244 |
| 999 | 122, 34, 135,//230 0.275904 0.312869 0.285473 |
| 1000 | 134, 122, 135,//231 0.321244 0.285473 0.285473 |
| 1001 | 34, 125, 136,//232 0.275904 0.285473 0.312869 |
| 1002 | 125, 5, 78,//233 0.275904 0.275904 0.321244 |
| 1003 | 78, 23, 136,//234 0.275904 0.312869 0.285473 |
| 1004 | 125, 78, 136,//235 0.321244 0.285473 0.285473 |
| 1005 | 36, 135, 133,//236 0.312869 0.324920 0.312869 |
| 1006 | 135, 34, 136,//237 0.312869 0.312869 0.324920 |
| 1007 | 136, 23, 133,//238 0.312869 0.312869 0.324920 |
| 1008 | 135, 136, 133,//239 0.324920 0.324920 0.324920 |
| 1009 | 9, 134, 138,//240 0.275904 0.321244 0.275904 |
| 1010 | 134, 36, 137,//241 0.275904 0.312869 0.285473 |
| 1011 | 137, 38, 138,//242 0.312869 0.275904 0.285473 |
| 1012 | 134, 137, 138,//243 0.285473 0.285473 0.321244 |
| 1013 | 36, 132, 140,//244 0.275904 0.285473 0.312869 |
| 1014 | 132, 4, 139,//245 0.275904 0.275904 0.321244 |
| 1015 | 139, 37, 140,//246 0.275904 0.312869 0.285473 |
| 1016 | 132, 139, 140,//247 0.321244 0.285473 0.285473 |
| 1017 | 37, 141, 143,//248 0.275904 0.285473 0.312869 |
| 1018 | 141, 3, 142,//249 0.275904 0.275904 0.321244 |
| 1019 | 142, 38, 143,//250 0.275904 0.312869 0.285473 |
| 1020 | 141, 142, 143,//251 0.321244 0.285473 0.285473 |
| 1021 | 36, 140, 137,//252 0.312869 0.324920 0.312869 |
| 1022 | 140, 37, 143,//253 0.312869 0.312869 0.324920 |
| 1023 | 143, 38, 137,//254 0.312869 0.312869 0.324920 |
| 1024 | 140, 143, 137,//255 0.324920 0.324920 0.324920 |
| 1025 | 3, 144, 142,//256 0.275904 0.321244 0.275904 |
| 1026 | 144, 39, 145,//257 0.275904 0.312869 0.285473 |
| 1027 | 145, 38, 142,//258 0.312869 0.275904 0.285473 |
| 1028 | 144, 145, 142,//259 0.285473 0.285473 0.321244 |
| 1029 | 39, 146, 147,//260 0.275904 0.285473 0.312869 |
| 1030 | 146, 8, 130,//261 0.275904 0.275904 0.321244 |
| 1031 | 130, 35, 147,//262 0.275904 0.312869 0.285473 |
| 1032 | 146, 130, 147,//263 0.321244 0.285473 0.285473 |
| 1033 | 35, 128, 148,//264 0.275904 0.285473 0.312869 |
| 1034 | 128, 9, 138,//265 0.275904 0.275904 0.321244 |
| 1035 | 138, 38, 148,//266 0.275904 0.312869 0.285473 |
| 1036 | 128, 138, 148,//267 0.321244 0.285473 0.285473 |
| 1037 | 39, 147, 145,//268 0.312869 0.324920 0.312869 |
| 1038 | 147, 35, 148,//269 0.312869 0.312869 0.324920 |
| 1039 | 148, 38, 145,//270 0.312869 0.312869 0.324920 |
| 1040 | 147, 148, 145,//271 0.324920 0.324920 0.324920 |
| 1041 | 8, 146, 111,//272 0.275904 0.321244 0.275904 |
| 1042 | 146, 39, 149,//273 0.275904 0.312869 0.285473 |
| 1043 | 149, 31, 111,//274 0.312869 0.275904 0.285473 |
| 1044 | 146, 149, 111,//275 0.285473 0.285473 0.321244 |
| 1045 | 39, 144, 151,//276 0.275904 0.285473 0.312869 |
| 1046 | 144, 3, 150,//277 0.275904 0.275904 0.321244 |
| 1047 | 150, 40, 151,//278 0.275904 0.312869 0.285473 |
| 1048 | 144, 150, 151,//279 0.321244 0.285473 0.285473 |
| 1049 | 40, 152, 153,//280 0.275904 0.285473 0.312869 |
| 1050 | 152, 6, 113,//281 0.275904 0.275904 0.321244 |
| 1051 | 113, 31, 153,//282 0.275904 0.312869 0.285473 |
| 1052 | 152, 113, 153,//283 0.321244 0.285473 0.285473 |
| 1053 | 39, 151, 149,//284 0.312869 0.324920 0.312869 |
| 1054 | 151, 40, 153,//285 0.312869 0.312869 0.324920 |
| 1055 | 153, 31, 149,//286 0.312869 0.312869 0.324920 |
| 1056 | 151, 153, 149,//287 0.324920 0.324920 0.324920 |
| 1057 | 3, 154, 150,//288 0.275904 0.321244 0.275904 |
| 1058 | 154, 41, 155,//289 0.275904 0.312869 0.285473 |
| 1059 | 155, 40, 150,//290 0.312869 0.275904 0.285473 |
| 1060 | 154, 155, 150,//291 0.285473 0.285473 0.321244 |
| 1061 | 41, 156, 157,//292 0.275904 0.285473 0.312869 |
| 1062 | 156, 2, 101,//293 0.275904 0.275904 0.321244 |
| 1063 | 101, 28, 157,//294 0.275904 0.312869 0.285473 |
| 1064 | 156, 101, 157,//295 0.321244 0.285473 0.285473 |
| 1065 | 28, 99, 158,//296 0.275904 0.285473 0.312869 |
| 1066 | 99, 6, 152,//297 0.275904 0.275904 0.321244 |
| 1067 | 152, 40, 158,//298 0.275904 0.312869 0.285473 |
| 1068 | 99, 152, 158,//299 0.321244 0.285473 0.285473 |
| 1069 | 41, 157, 155,//300 0.312869 0.324920 0.312869 |
| 1070 | 157, 28, 158,//301 0.312869 0.312869 0.324920 |
| 1071 | 158, 40, 155,//302 0.312869 0.312869 0.324920 |
| 1072 | 157, 158, 155,//303 0.324920 0.324920 0.324920 |
| 1073 | 2, 156, 92,//304 0.275904 0.321244 0.275904 |
| 1074 | 156, 41, 159,//305 0.275904 0.312869 0.285473 |
| 1075 | 159, 26, 92,//306 0.312869 0.275904 0.285473 |
| 1076 | 156, 159, 92,//307 0.285473 0.285473 0.321244 |
| 1077 | 41, 154, 160,//308 0.275904 0.285473 0.312869 |
| 1078 | 154, 3, 141,//309 0.275904 0.275904 0.321244 |
| 1079 | 141, 37, 160,//310 0.275904 0.312869 0.285473 |
| 1080 | 154, 141, 160,//311 0.321244 0.285473 0.285473 |
| 1081 | 37, 139, 161,//312 0.275904 0.285473 0.312869 |
| 1082 | 139, 4, 94,//313 0.275904 0.275904 0.321244 |
| 1083 | 94, 26, 161,//314 0.275904 0.312869 0.285473 |
| 1084 | 139, 94, 161,//315 0.321244 0.285473 0.285473 |
| 1085 | 41, 160, 159,//316 0.312869 0.324920 0.312869 |
| 1086 | 160, 37, 161,//317 0.312869 0.312869 0.324920 |
| 1087 | 161, 26, 159,//318 0.312869 0.312869 0.324920 |
| 1088 | 160, 161, 159 //319 0.324920 0.324920 0.324920 |
| 1089 | }; |
| 1090 | const GLuint idxc[60] = { |
| 1091 | 0, 20, 2, 2, 20, 22, |
| 1092 | 2, 22, 4, 4, 22, 24, |
| 1093 | 4, 24, 6, 6, 24, 26, |
| 1094 | 6, 26, 8, 8, 26, 28, |
| 1095 | 8, 28, 10, 10, 28, 30, |
| 1096 | 10, 30, 12, 12, 30, 32, |
| 1097 | 12, 32, 14, 14, 32, 34, |
| 1098 | 14, 34, 16, 16, 34, 36, |
| 1099 | 16, 36, 18, 18, 36, 38, |
| 1100 | 18, 38, 0, 0, 38, 20, |
| 1101 | }; |
| 1102 | |
| 1103 | const GLfloat vc[120] = { |
| 1104 | 1.000000000f, 0.000000000f, 0.000000000f,//0 |
| 1105 | 0.951056516f, 0.309016994f, 0.000000000f,//18 |
| 1106 | 0.809016994f, 0.587785252f, 0.000000000f,//36 |
| 1107 | 0.587785252f, 0.809016994f, 0.000000000f,//54 |
| 1108 | 0.309016994f, 0.951056516f, 0.000000000f,//72 |
| 1109 | 0.000000000f, 1.000000000f, 0.000000000f,//90 |
| 1110 | -0.309016994f, 0.951056516f, 0.000000000f,//108 |
| 1111 | -0.587785252f, 0.809016994f, 0.000000000f,//126 |
| 1112 | -0.809016994f, 0.587785252f, 0.000000000f,//144 |
| 1113 | -0.951056516f, 0.309016994f, 0.000000000f,//162 |
| 1114 | -1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1115 | -0.951056516f,-0.309016994f, 0.000000000f,//198 |
| 1116 | -0.809016994f,-0.587785252f, 0.000000000f,//216 |
| 1117 | -0.587785252f,-0.809016994f, 0.000000000f,//234 |
| 1118 | -0.309016994f,-0.951056516f, 0.000000000f,//252 |
| 1119 | -0.000000000f,-1.000000000f, 0.000000000f,//270 |
| 1120 | 0.309016994f,-0.951056516f, 0.000000000f,//288 |
| 1121 | 0.587785252f,-0.809016994f, 0.000000000f,//306 |
| 1122 | 0.809016994f,-0.587785252f, 0.000000000f,//324 |
| 1123 | 0.951056516f,-0.309016994f, 0.000000000f,//342 |
| 1124 | 1.000000000f, 0.000000000f, 1.000000000f,//0 |
| 1125 | 0.951056516f, 0.309016994f, 1.000000000f,//18 |
| 1126 | 0.809016994f, 0.587785252f, 1.000000000f,//36 |
| 1127 | 0.587785252f, 0.809016994f, 1.000000000f,//54 |
| 1128 | 0.309016994f, 0.951056516f, 1.000000000f,//72 |
| 1129 | 0.000000000f, 1.000000000f, 1.000000000f,//90 |
| 1130 | -0.309016994f, 0.951056516f, 1.000000000f,//108 |
| 1131 | -0.587785252f, 0.809016994f, 1.000000000f,//126 |
| 1132 | -0.809016994f, 0.587785252f, 1.000000000f,//144 |
| 1133 | -0.951056516f, 0.309016994f, 1.000000000f,//162 |
| 1134 | -1.000000000f, 0.000000000f, 1.000000000f,//180 |
| 1135 | -0.951056516f,-0.309016994f, 1.000000000f,//198 |
| 1136 | -0.809016994f,-0.587785252f, 1.000000000f,//216 |
| 1137 | -0.587785252f,-0.809016994f, 1.000000000f,//234 |
| 1138 | -0.309016994f,-0.951056516f, 1.000000000f,//252 |
| 1139 | -0.000000000f,-1.000000000f, 1.000000000f,//270 |
| 1140 | 0.309016994f,-0.951056516f, 1.000000000f,//288 |
| 1141 | 0.587785252f,-0.809016994f, 1.000000000f,//306 |
| 1142 | 0.809016994f,-0.587785252f, 1.000000000f,//324 |
| 1143 | 0.951056516f,-0.309016994f, 1.000000000f//342 |
| 1144 | }; |
| 1145 | /* |
| 1146 | const GLfloat nc[120] = { |
| 1147 | -1.000000000f,-0.000000000f, 0.000000000f,//0 |
| 1148 | -0.951056516f,-0.309016994f, 0.000000000f,//18 |
| 1149 | -0.809016994f,-0.587785252f, 0.000000000f,//36 |
| 1150 | -0.587785252f,-0.809016994f, 0.000000000f,//54 |
| 1151 | -0.309016994f,-0.951056516f, 0.000000000f,//72 |
| 1152 | 0.000000000f,-1.000000000f, 0.000000000f,//90 |
| 1153 | 0.309016994f,-0.951056516f, 0.000000000f,//108 |
| 1154 | 0.587785252f,-0.809016994f, 0.000000000f,//126 |
| 1155 | 0.809016994f,-0.587785252f, 0.000000000f,//144 |
| 1156 | 0.951056516f,-0.309016994f, 0.000000000f,//162 |
| 1157 | 1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1158 | 0.951056516f, 0.309016994f, 0.000000000f,//198 |
| 1159 | 0.809016994f, 0.587785252f, 0.000000000f,//216 |
| 1160 | 0.587785252f, 0.809016994f, 0.000000000f,//234 |
| 1161 | 0.309016994f, 0.951056516f, 0.000000000f,//252 |
| 1162 | 0.000000000f, 1.000000000f, 0.000000000f,//270 |
| 1163 | -0.309016994f, 0.951056516f, 0.000000000f,//288 |
| 1164 | -0.587785252f, 0.809016994f, 0.000000000f,//306 |
| 1165 | -0.809016994f, 0.587785252f, 0.000000000f,//324 |
| 1166 | -0.951056516f, 0.309016994f, 0.000000000f,//342 |
| 1167 | -1.000000000f, 0.000000000f, 0.000000000f,//0 |
| 1168 | -0.951056516f,-0.309016994f, 0.000000000f,//18 |
| 1169 | -0.809016994f,-0.587785252f, 0.000000000f,//36 |
| 1170 | -0.587785252f,-0.809016994f, 0.000000000f,//54 |
| 1171 | -0.309016994f,-0.951056516f, 0.000000000f,//72 |
| 1172 | 0.000000000f,-1.000000000f, 0.000000000f,//90 |
| 1173 | 0.309016994f,-0.951056516f, 0.000000000f,//108 |
| 1174 | 0.587785252f,-0.809016994f, 0.000000000f,//126 |
| 1175 | 0.809016994f,-0.587785252f, 0.000000000f,//144 |
| 1176 | 0.951056516f,-0.309016994f, 0.000000000f,//162 |
| 1177 | 1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1178 | 0.951056516f, 0.309016994f, 0.000000000f,//198 |
| 1179 | 0.809016994f, 0.587785252f, 0.000000000f,//216 |
| 1180 | 0.587785252f, 0.809016994f, 0.000000000f,//234 |
| 1181 | 0.309016994f, 0.951056516f, 0.000000000f,//252 |
| 1182 | 0.000000000f, 1.000000000f, 0.000000000f,//270 |
| 1183 | -0.309016994f, 0.951056516f, 0.000000000f,//288 |
| 1184 | -0.587785252f, 0.809016994f, 0.000000000f,//306 |
| 1185 | -0.809016994f, 0.587785252f, 0.000000000f,//324 |
| 1186 | -0.951056516f, 0.309016994f, 0.000000000f//342 |
| 1187 | }; |
| 1188 | */ |
| 1189 | const GLfloat vs[486] ={ //v[1926] = { |
| 1190 | -0.525731f, 0.850651f, 0.000000f,//0 |
| 1191 | 0.525731f, 0.850651f, 0.000000f,//1 |
| 1192 | -0.525731f, -0.850651f, 0.000000f,//2 |
| 1193 | 0.525731f, -0.850651f, 0.000000f,//3 |
| 1194 | 0.000000f, -0.525731f, 0.850651f,//4 |
| 1195 | 0.000000f, 0.525731f, 0.850651f,//5 |
| 1196 | 0.000000f, -0.525731f, -0.850651f,//6 |
| 1197 | 0.000000f, 0.525731f, -0.850651f,//7 |
| 1198 | 0.850651f, 0.000000f, -0.525731f,//8 |
| 1199 | 0.850651f, 0.000000f, 0.525731f,//9 |
| 1200 | -0.850651f, 0.000000f, -0.525731f,//10 |
| 1201 | -0.850651f, 0.000000f, 0.525731f,//11 |
| 1202 | 0.000000f, 1.000000f, 0.000000f,//12 |
| 1203 | -0.309017f, 0.809017f, 0.500000f,//13 |
| 1204 | 0.309017f, 0.809017f, 0.500000f,//14 |
| 1205 | 0.309017f, 0.809017f, -0.500000f,//15 |
| 1206 | -0.309017f, 0.809017f, -0.500000f,//16 |
| 1207 | -0.809017f, 0.500000f, -0.309017f,//17 |
| 1208 | -0.500000f, 0.309017f, -0.809017f,//18 |
| 1209 | -1.000000f, 0.000000f, 0.000000f,//19 |
| 1210 | -0.809017f, 0.500000f, 0.309017f,//20 |
| 1211 | -0.500000f, 0.309017f, 0.809017f,//21 |
| 1212 | -0.500000f, -0.309017f, 0.809017f,//22 |
| 1213 | 0.000000f, 0.000000f, 1.000000f,//23 |
| 1214 | -0.809017f, -0.500000f, 0.309017f,//24 |
| 1215 | -0.809017f, -0.500000f, -0.309017f,//25 |
| 1216 | -0.309017f, -0.809017f, 0.500000f,//26 |
| 1217 | -0.500000f, -0.309017f, -0.809017f,//27 |
| 1218 | -0.309017f, -0.809017f, -0.500000f,//28 |
| 1219 | 0.000000f, 0.000000f, -1.000000f,//29 |
| 1220 | 0.500000f, 0.309017f, -0.809017f,//30 |
| 1221 | 0.500000f, -0.309017f, -0.809017f,//31 |
| 1222 | 0.809017f, 0.500000f, -0.309017f,//32 |
| 1223 | 0.809017f, 0.500000f, 0.309017f,//33 |
| 1224 | 0.500000f, 0.309017f, 0.809017f,//34 |
| 1225 | 1.000000f, 0.000000f, 0.000000f,//35 |
| 1226 | 0.500000f, -0.309017f, 0.809017f,//36 |
| 1227 | 0.309017f, -0.809017f, 0.500000f,//37 |
| 1228 | 0.809017f, -0.500000f, 0.309017f,//38 |
| 1229 | 0.809017f, -0.500000f, -0.309017f,//39 |
| 1230 | 0.309017f, -0.809017f, -0.500000f,//40 |
| 1231 | 0.000000f, -1.000000f, 0.000000f,//41 |
| 1232 | 0.273267f, 0.961938f, 0.000000f,//42 |
| 1233 | 0.162460f, 0.951057f, 0.262866f,//43 |
| 1234 | 0.433889f, 0.862668f, 0.259892f,//44 |
| 1235 | -0.273267f, 0.961938f, 0.000000f,//45 |
| 1236 | -0.433889f, 0.862668f, 0.259892f,//46 |
| 1237 | -0.162460f, 0.951057f, 0.262866f,//47 |
| 1238 | -0.160622f, 0.693780f, 0.702046f,//48 |
| 1239 | 0.160622f, 0.693780f, 0.702046f,//49 |
| 1240 | 0.000000f, 0.850651f, 0.525731f,//50 |
| 1241 | -0.162460f, 0.951057f, -0.262866f,//51 |
| 1242 | -0.433889f, 0.862668f, -0.259892f,//52 |
| 1243 | 0.433889f, 0.862668f, -0.259892f,//53 |
| 1244 | 0.162460f, 0.951057f, -0.262866f,//54 |
| 1245 | 0.160622f, 0.693780f, -0.702046f,//55 |
| 1246 | -0.160622f, 0.693780f, -0.702046f,//56 |
| 1247 | 0.000000f, 0.850651f, -0.525731f,//57 |
| 1248 | -0.862668f, 0.259892f, -0.433889f,//58 |
| 1249 | -0.688191f, 0.425325f, -0.587785f,//59 |
| 1250 | -0.702046f, 0.160622f, -0.693780f,//60 |
| 1251 | -0.693780f, 0.702046f, -0.160622f,//61 |
| 1252 | -0.587785f, 0.688191f, -0.425325f,//62 |
| 1253 | -0.259892f, 0.433889f, -0.862668f,//63 |
| 1254 | -0.425325f, 0.587785f, -0.688191f,//64 |
| 1255 | -0.850651f, 0.525731f, 0.000000f,//65 |
| 1256 | -0.693780f, 0.702046f, 0.160622f,//66 |
| 1257 | -0.961938f, 0.000000f, -0.273267f,//67 |
| 1258 | -0.951057f, 0.262866f, -0.162460f,//68 |
| 1259 | -0.961938f, 0.000000f, 0.273267f,//69 |
| 1260 | -0.862668f, 0.259892f, 0.433889f,//70 |
| 1261 | -0.951057f, 0.262866f, 0.162460f,//71 |
| 1262 | -0.702046f, 0.160622f, 0.693780f,//72 |
| 1263 | -0.688191f, 0.425325f, 0.587785f,//73 |
| 1264 | -0.259892f, 0.433889f, 0.862668f,//74 |
| 1265 | -0.425325f, 0.587785f, 0.688191f,//75 |
| 1266 | -0.587785f, 0.688191f, 0.425325f,//76 |
| 1267 | -0.262866f, 0.162460f, 0.951057f,//77 |
| 1268 | 0.000000f, 0.273267f, 0.961938f,//78 |
| 1269 | -0.702046f, -0.160622f, 0.693780f,//79 |
| 1270 | -0.525731f, 0.000000f, 0.850651f,//80 |
| 1271 | -0.259892f, -0.433889f, 0.862668f,//81 |
| 1272 | 0.000000f, -0.273267f, 0.961938f,//82 |
| 1273 | -0.262866f, -0.162460f, 0.951057f,//83 |
| 1274 | -0.693780f, -0.702046f, 0.160622f,//84 |
| 1275 | -0.850651f, -0.525731f, 0.000000f,//85 |
| 1276 | -0.693780f, -0.702046f, -0.160622f,//86 |
| 1277 | -0.862668f, -0.259892f, 0.433889f,//87 |
| 1278 | -0.951057f, -0.262866f, 0.162460f,//88 |
| 1279 | -0.862668f, -0.259892f, -0.433889f,//89 |
| 1280 | -0.951057f, -0.262866f, -0.162460f,//90 |
| 1281 | -0.688191f, -0.425325f, 0.587785f,//91 |
| 1282 | -0.433889f, -0.862668f, 0.259892f,//92 |
| 1283 | -0.587785f, -0.688191f, 0.425325f,//93 |
| 1284 | -0.160622f, -0.693780f, 0.702046f,//94 |
| 1285 | -0.425325f, -0.587785f, 0.688191f,//95 |
| 1286 | -0.702046f, -0.160622f, -0.693780f,//96 |
| 1287 | -0.688191f, -0.425325f, -0.587785f,//97 |
| 1288 | -0.259892f, -0.433889f, -0.862668f,//98 |
| 1289 | -0.160622f, -0.693780f, -0.702046f,//99 |
| 1290 | -0.425325f, -0.587785f, -0.688191f,//100 |
| 1291 | -0.433889f, -0.862668f, -0.259892f,//101 |
| 1292 | -0.587785f, -0.688191f, -0.425325f,//102 |
| 1293 | -0.262866f, -0.162460f, -0.951057f,//103 |
| 1294 | 0.000000f, -0.273267f, -0.961938f,//104 |
| 1295 | -0.525731f, 0.000000f, -0.850651f,//105 |
| 1296 | 0.000000f, 0.273267f, -0.961938f,//106 |
| 1297 | -0.262866f, 0.162460f, -0.951057f,//107 |
| 1298 | 0.259892f, 0.433889f, -0.862668f,//108 |
| 1299 | 0.262866f, 0.162460f, -0.951057f,//109 |
| 1300 | 0.702046f, 0.160622f, -0.693780f,//110 |
| 1301 | 0.702046f, -0.160622f, -0.693780f,//111 |
| 1302 | 0.525731f, 0.000000f, -0.850651f,//112 |
| 1303 | 0.259892f, -0.433889f, -0.862668f,//113 |
| 1304 | 0.262866f, -0.162460f, -0.951057f,//114 |
| 1305 | 0.688191f, 0.425325f, -0.587785f,//115 |
| 1306 | 0.862668f, 0.259892f, -0.433889f,//116 |
| 1307 | 0.425325f, 0.587785f, -0.688191f,//117 |
| 1308 | 0.693780f, 0.702046f, -0.160622f,//118 |
| 1309 | 0.587785f, 0.688191f, -0.425325f,//119 |
| 1310 | 0.862668f, 0.259892f, 0.433889f,//120 |
| 1311 | 0.688191f, 0.425325f, 0.587785f,//121 |
| 1312 | 0.702046f, 0.160622f, 0.693780f,//122 |
| 1313 | 0.693780f, 0.702046f, 0.160622f,//123 |
| 1314 | 0.587785f, 0.688191f, 0.425325f,//124 |
| 1315 | 0.259892f, 0.433889f, 0.862668f,//125 |
| 1316 | 0.425325f, 0.587785f, 0.688191f,//126 |
| 1317 | 0.850651f, 0.525731f, 0.000000f,//127 |
| 1318 | 0.961938f, 0.000000f, 0.273267f,//128 |
| 1319 | 0.951057f, 0.262866f, 0.162460f,//129 |
| 1320 | 0.961938f, 0.000000f, -0.273267f,//130 |
| 1321 | 0.951057f, 0.262866f, -0.162460f,//131 |
| 1322 | 0.259892f, -0.433889f, 0.862668f,//132 |
| 1323 | 0.262866f, -0.162460f, 0.951057f,//133 |
| 1324 | 0.702046f, -0.160622f, 0.693780f,//134 |
| 1325 | 0.525731f, 0.000000f, 0.850651f,//135 |
| 1326 | 0.262866f, 0.162460f, 0.951057f,//136 |
| 1327 | 0.688191f, -0.425325f, 0.587785f,//137 |
| 1328 | 0.862668f, -0.259892f, 0.433889f,//138 |
| 1329 | 0.160622f, -0.693780f, 0.702046f,//139 |
| 1330 | 0.425325f, -0.587785f, 0.688191f,//140 |
| 1331 | 0.433889f, -0.862668f, 0.259892f,//141 |
| 1332 | 0.693780f, -0.702046f, 0.160622f,//142 |
| 1333 | 0.587785f, -0.688191f, 0.425325f,//143 |
| 1334 | 0.693780f, -0.702046f, -0.160622f,//144 |
| 1335 | 0.850651f, -0.525731f, 0.000000f,//145 |
| 1336 | 0.862668f, -0.259892f, -0.433889f,//146 |
| 1337 | 0.951057f, -0.262866f, -0.162460f,//147 |
| 1338 | 0.951057f, -0.262866f, 0.162460f,//148 |
| 1339 | 0.688191f, -0.425325f, -0.587785f,//149 |
| 1340 | 0.433889f, -0.862668f, -0.259892f,//150 |
| 1341 | 0.587785f, -0.688191f, -0.425325f,//151 |
| 1342 | 0.160622f, -0.693780f, -0.702046f,//152 |
| 1343 | 0.425325f, -0.587785f, -0.688191f,//153 |
| 1344 | 0.273267f, -0.961938f, 0.000000f,//154 |
| 1345 | 0.162460f, -0.951057f, -0.262866f,//155 |
| 1346 | -0.273267f, -0.961938f, 0.000000f,//156 |
| 1347 | -0.162460f, -0.951057f, -0.262866f,//157 |
| 1348 | 0.000000f, -0.850651f, -0.525731f,//158 |
| 1349 | -0.162460f, -0.951057f, 0.262866f,//159 |
| 1350 | 0.162460f, -0.951057f, 0.262866f,//160 |
| 1351 | 0.000000f, -0.850651f, 0.525731f//,//161 |
| 1352 | }; |
| 1353 | QString selFilter; |
| 1354 | QString name=fileName; |
| 1355 | const QFileDialog::Options noneopt = QFileDialog::Options(); |
| 1356 | name=name.replace(QRegularExpression("ins$|res$"),"obj"); |
| 1357 | QString wfobj = QFileDialog::getSaveFileName ( 0, |
| 1358 | "Export Isosurfaces to WaveFront .obj file", |
| 1359 | name, "Wavefront (*.obj)",&selFilter, noneopt); |
| 1360 | if (wfobj.isEmpty()) return; |
| 1361 | if (!wfobj.contains (QRegularExpression(".obj$"))) wfobj.append(".obj"); |
| 1362 | QString wfmtl=wfobj; |
| 1363 | |
| 1364 | wfmtl=wfmtl.replace(QRegularExpression("obj$"),"mtl"); |
| 1365 | QString wfmtlbase=wfmtl.section('/', -1); |
| 1366 | QString base= wfmtlbase; |
| 1367 | base=base.remove(QRegularExpression("mtl$")); |
| 1368 | QString path=wfmtl.section('/',0, -2); |
| 1369 | //qDebug()<<wfmtlbase<<path; |
| 1370 | V3 centr=V3(0,0,0); |
| 1371 | { |
| 1372 | int na=0; |
| 1373 | for (int j=0; j<_atoms.size(); j++){ |
| 1374 | if ((_atoms.at(j).hidden)) continue; |
| 1375 | if ((nopm1)&&(_atoms.at(j).symmGroup)&&(_atoms.at(j).part<0))continue; |
| 1376 | centr+=_atoms.at(j).pos; |
| 1377 | na++; |
| 1378 | } |
| 1379 | centr*=1.0/na; |
| 1380 | } |
| 1381 | QFile of(wfobj); |
| 1382 | of.open(QIODevice::WriteOnly|QIODevice::Text); |
| 1383 | of.write(QString("#Created by MoleCoolQt\nmtllib %1\n") |
| 1384 | .arg(wfmtlbase) |
| 1385 | .toLatin1()); |
| 1386 | uint kk=0,kk0=0; |
| 1387 | for (int j=0; j<_atoms.size();j++){ |
| 1388 | if (_atoms.at(j).an<0)continue; |
| 1389 | if ((_atoms.at(j).hidden)) continue; |
| 1390 | if ((nopm1)&&(_atoms.at(j).symmGroup)&&(_atoms.at(j).part<0))continue; |
| 1391 | int myStyle = AtomStyle[_atoms.at(j).an]; |
| 1392 | V3 ev; |
| 1393 | Matrix madp=Matrix(1,0,0,0,1,0,0,0,1); |
| 1394 | Matrix madp1=Matrix(1,0,0,0,1,0,0,0,1); |
| 1395 | Matrix madp2=Matrix(1,0,0,0,1,0,0,0,1); |
| 1396 | Matrix madp3=Matrix(1,0,0,0,1,0,0,0,1); |
| 1397 | Matrix m2=Matrix(1,0,0,0,1,0,0,0,1); |
| 1398 | if ((myStyle& ATOM_STYLE_NOADP)==0){ |
| 1399 | double *arr = jacobi(_atoms.at(j).uc,ev); |
| 1400 | double fiftypct=1.54; |
| 1401 | switch (proba ) { |
| 1402 | case 10 :fiftypct=0.76;break; //Hauptachsen der Eliipsoide 10% Wahrscheinlichkeit |
| 1403 | case 30 :fiftypct=1.19;break; //Hauptachsen der Eliipsoide 30% Wahrscheinlichkeit |
| 1404 | case 50 :fiftypct=1.54;break; //Hauptachsen der Eliipsoide 50% Wahrscheinlichkeit |
| 1405 | case 70 :fiftypct=1.91;break; //Hauptachsen der Eliipsoide 70% Wahrscheinlichkeit |
| 1406 | case 90 :fiftypct=2.50;break; //Hauptachsen der Eliipsoide 90% Wahrscheinlichkeit |
| 1407 | default: ; |
| 1408 | } |
| 1409 | madp=Matrix(fiftypct*sqrt(ev.x),0,0 |
| 1410 | ,0,fiftypct*sqrt(ev.y),0, |
| 1411 | 0,0,fiftypct*sqrt(ev.z)); |
| 1412 | madp1=Matrix(fiftypct*sqrt(ev.x)*0.15,0,0 |
| 1413 | ,0,fiftypct*sqrt(ev.y)*1.05,0, |
| 1414 | 0,0,fiftypct*sqrt(ev.z)*1.05); |
| 1415 | madp2=Matrix(fiftypct*sqrt(ev.x)*1.050,0,0 |
| 1416 | ,0,fiftypct*sqrt(ev.y)*0.15,0, |
| 1417 | 0,0,fiftypct*sqrt(ev.z)*1.05); |
| 1418 | madp3=Matrix(fiftypct*sqrt(ev.x)*1.05,0,0 |
| 1419 | ,0,fiftypct*sqrt(ev.y)*1.05,0, |
| 1420 | 0,0,fiftypct*sqrt(ev.z)*0.15); |
| 1421 | m2=rotarb(arr); |
| 1422 | } |
| 1423 | of.write(QString("\no %1\n").arg(_atoms.at(j).Label).toLatin1()); |
| 1424 | of.write(QString("\nusemtl %1\n").arg((_atoms.at(j).an<0)?_atoms.at(j).Label:PSE.at(_atoms.at(j).an)).toLatin1()); |
| 1425 | for (int i=0; i<162; i++){ |
| 1426 | V3 vec(vs[3*i],vs[3*i+1],vs[3*i+2]); |
| 1427 | if ((myStyle& ATOM_STYLE_NOADP)==0) vec=(m2*madp)*vec; |
| 1428 | else vec*=arad[_atoms.at(j).an]; |
| 1429 | //vec=m2*vec; |
| 1430 | of.write(QString("v %1 %2 %3\n") |
| 1431 | .arg(_atoms.at(j).pos.x + vec.x - centr.x,12,'f',6) |
| 1432 | .arg(_atoms.at(j).pos.y + vec.y - centr.y,12,'f',6) |
| 1433 | .arg(_atoms.at(j).pos.z + vec.z - centr.z,12,'f',6) |
| 1434 | .toLatin1() |
| 1435 | ); |
| 1436 | kk++; |
| 1437 | } |
| 1438 | if (kk0==0)for (int i=0; i<162; i++){ |
| 1439 | of.write(QString("vn %1 %2 %3\n") |
| 1440 | .arg(vs[3*i],12,'f',6) |
| 1441 | .arg(vs[3*i+1],12,'f',6) |
| 1442 | .arg(vs[3*i+2],12,'f',6) |
| 1443 | .toLatin1() |
| 1444 | ); |
| 1445 | } |
| 1446 | //of.write(QString("\nusemtl %1\n").arg((_atoms.at(j).an<0)?_atoms.at(j).Label:PSE.at(_atoms.at(j).an)).toLatin1()); |
| 1447 | for (int i=0; i<960/3;i++){ |
| 1448 | uint n= idx2[3*i]+1+kk0; |
| 1449 | uint m= idx2[3*i+1]+1+kk0; |
| 1450 | uint o= idx2[3*i+2]+1+kk0; |
| 1451 | of.write(QString("f %1//%4 %2//%5 %3//%6\n") |
| 1452 | .arg(n).arg(m).arg(o) |
| 1453 | .arg(n-kk0).arg(m-kk0).arg(o-kk0).toLatin1()); |
| 1454 | |
| 1455 | } |
| 1456 | kk0=kk; |
| 1457 | if ((myStyle& ATOM_STYLE_RINGS)&&(myStyle& ATOM_STYLE_NOADP)==0){ |
| 1458 | of.write(QString("\no %1\n").arg(_atoms.at(j).Label).toLatin1()); |
| 1459 | of.write(QString("\nusemtl %1\n").arg((myStyle&ATOM_STYLE_WHITERING)?"white":"black").toLatin1()); |
| 1460 | for (int i=0; i<162; i++){ |
| 1461 | V3 vec(vs[3*i],vs[3*i+1],vs[3*i+2]); |
| 1462 | if ((myStyle& ATOM_STYLE_NOADP)==0) vec=(m2*madp1)*vec; |
| 1463 | else vec*=arad[_atoms.at(j).an]; |
| 1464 | //vec=m2*vec; |
| 1465 | of.write(QString("v %1 %2 %3\n") |
| 1466 | .arg(_atoms.at(j).pos.x + vec.x - centr.x,12,'f',6) |
| 1467 | .arg(_atoms.at(j).pos.y + vec.y - centr.y,12,'f',6) |
| 1468 | .arg(_atoms.at(j).pos.z + vec.z - centr.z,12,'f',6) |
| 1469 | .toLatin1() |
| 1470 | ); |
| 1471 | kk++; |
| 1472 | } |
| 1473 | //of.write(QString("\nusemtl %1\n").arg((_atoms.at(j).an<0)?_atoms.at(j).Label:PSE.at(_atoms.at(j).an)).toLatin1()); |
| 1474 | |
| 1475 | for (int i=0; i<960/3;i++){ |
| 1476 | uint n= idx2[3*i]+1+kk0; |
| 1477 | uint m= idx2[3*i+1]+1+kk0; |
| 1478 | uint o= idx2[3*i+2]+1+kk0; |
| 1479 | of.write(QString("f %1 %2 %3\n") |
| 1480 | .arg(n).arg(m).arg(o) |
| 1481 | .toLatin1()); |
| 1482 | } |
| 1483 | kk0=kk; |
| 1484 | for (int i=0; i<162; i++){ |
| 1485 | V3 vec(vs[3*i],vs[3*i+1],vs[3*i+2]); |
| 1486 | if ((myStyle& ATOM_STYLE_NOADP)==0) vec=(m2*madp2)*vec; |
| 1487 | else vec*=arad[_atoms.at(j).an]; |
| 1488 | //vec=m2*vec; |
| 1489 | of.write(QString("v %1 %2 %3\n") |
| 1490 | .arg(_atoms.at(j).pos.x + vec.x - centr.x,12,'f',6) |
| 1491 | .arg(_atoms.at(j).pos.y + vec.y - centr.y,12,'f',6) |
| 1492 | .arg(_atoms.at(j).pos.z + vec.z - centr.z,12,'f',6) |
| 1493 | .toLatin1() |
| 1494 | ); |
| 1495 | kk++; |
| 1496 | } |
| 1497 | //of.write(QString("\nusemtl %1\n").arg((_atoms.at(j).an<0)?_atoms.at(j).Label:PSE.at(_atoms.at(j).an)).toLatin1()); |
| 1498 | |
| 1499 | for (int i=0; i<960/3;i++){ |
| 1500 | uint n= idx2[3*i]+1+kk0; |
| 1501 | uint m= idx2[3*i+1]+1+kk0; |
| 1502 | uint o= idx2[3*i+2]+1+kk0; |
| 1503 | of.write(QString("f %1 %2 %3\n") |
| 1504 | .arg(n).arg(m).arg(o) |
| 1505 | .toLatin1()); |
| 1506 | } |
| 1507 | kk0=kk; |
| 1508 | for (int i=0; i<162; i++){ |
| 1509 | V3 vec(vs[3*i],vs[3*i+1],vs[3*i+2]); |
| 1510 | if ((myStyle& ATOM_STYLE_NOADP)==0) vec=(m2*madp3)*vec; |
| 1511 | else vec*=arad[_atoms.at(j).an]; |
| 1512 | //vec=m2*vec; |
| 1513 | of.write(QString("v %1 %2 %3\n") |
| 1514 | .arg(_atoms.at(j).pos.x + vec.x - centr.x,12,'f',6) |
| 1515 | .arg(_atoms.at(j).pos.y + vec.y - centr.y,12,'f',6) |
| 1516 | .arg(_atoms.at(j).pos.z + vec.z - centr.z,12,'f',6) |
| 1517 | .toLatin1() |
| 1518 | ); |
| 1519 | kk++; |
| 1520 | } |
| 1521 | //of.write(QString("\nusemtl %1\n").arg((_atoms.at(j).an<0)?_atoms.at(j).Label:PSE.at(_atoms.at(j).an)).toLatin1()); |
| 1522 | |
| 1523 | for (int i=0; i<960/3;i++){ |
| 1524 | uint n= idx2[3*i]+1+kk0; |
| 1525 | uint m= idx2[3*i+1]+1+kk0; |
| 1526 | uint o= idx2[3*i+2]+1+kk0; |
| 1527 | of.write(QString("f %1 %2 %3\n") |
| 1528 | .arg(n).arg(m).arg(o) |
| 1529 | .toLatin1()); |
| 1530 | } |
| 1531 | kk0=kk; |
| 1532 | } |
| 1533 | }//atoms |
| 1534 | for (int j=0; j<_bonds.size(); j++){ |
| 1535 | |
| 1536 | if (_bonds.at(j).ato1->hidden) continue; |
| 1537 | if (_bonds.at(j).ato2->hidden) continue; |
| 1538 | if ((nopm1)&&(_bonds.at(j).ato1->symmGroup)&&(_bonds.at(j).ato1->part<0))continue; |
| 1539 | if ((nopm1)&&(_bonds.at(j).ato2->symmGroup)&&(_bonds.at(j).ato2->part<0))continue; |
| 1540 | V3 bondir= Normalize(_bonds.at(j).ato1->pos-_bonds.at(j).ato2->pos); |
| 1541 | bondir*=_bonds.at(j).length/2; |
| 1542 | V3 vec1; |
| 1543 | vec1.x=(_bonds.at(j).ato2->pos.y-_bonds.at(j).ato1->pos.y); |
| 1544 | vec1.y=(_bonds.at(j).ato1->pos.x-_bonds.at(j).ato2->pos.x); |
| 1545 | vec1.z=0; |
| 1546 | if (Norm(vec1)>0.00000001) vec1=Normalize(vec1); |
| 1547 | else vec1=V3(0,1,0); |
| 1548 | V3 anf=_bonds.at(j).ato1->pos - centr -bondir; |
| 1549 | V3 anf2=_bonds.at(j).ato2->pos - centr +bondir; |
| 1550 | double arr[4]; |
| 1551 | arr[0]=acos(((_bonds.at(j).ato1->pos.z-_bonds.at(j).ato2->pos.z)/ |
| 1552 | (sqrt((_bonds.at(j).ato1->pos.x-_bonds.at(j).ato2->pos.x)*(_bonds.at(j).ato1->pos.x-_bonds.at(j).ato2->pos.x)+ |
| 1553 | (_bonds.at(j).ato1->pos.y-_bonds.at(j).ato2->pos.y)*(_bonds.at(j).ato1->pos.y-_bonds.at(j).ato2->pos.y)+ |
| 1554 | (_bonds.at(j).ato1->pos.z-_bonds.at(j).ato2->pos.z)*(_bonds.at(j).ato1->pos.z-_bonds.at(j).ato2->pos.z)))))/M_PI*180.0; |
| 1555 | arr[1]=vec1.x; |
| 1556 | arr[2]=vec1.y; |
| 1557 | arr[3]=vec1.z; |
| 1558 | Matrix m2=rotarb(arr); |
| 1559 | of.write(QString("\no %1=%2\n").arg(_bonds.at(j).ato1->Label).arg(_bonds.at(j).ato2->Label).toLatin1()); |
| 1560 | of.write(QString("\nusemtl %1\n").arg((bondColorStyle)?"bond": PSE.at(_bonds.at(j).ato1->an)).toLatin1()); |
| 1561 | Matrix m1(bondStrength,0,0, |
| 1562 | 0,bondStrength,0, |
| 1563 | 0,0,_bonds.at(j).length/2); |
| 1564 | for (int i=0; i<40; i++){ |
| 1565 | V3 vec(vc[3*i],vc[3*i+1],vc[3*i+2]); |
| 1566 | vec=(m2*m1)*vec; |
| 1567 | of.write(QString("v %1 %2 %3\n") |
| 1568 | .arg(anf.x + vec.x ,12,'f',6) |
| 1569 | .arg(anf.y + vec.y ,12,'f',6) |
| 1570 | .arg(anf.z + vec.z ,12,'f',6) |
| 1571 | .toLatin1() |
| 1572 | ); |
| 1573 | |
| 1574 | kk++; |
| 1575 | } |
| 1576 | for (int i=0; i<20;i++){ |
| 1577 | uint n= idxc[3*i]+1+kk0; |
| 1578 | uint m= idxc[3*i+1]+1+kk0; |
| 1579 | uint o= idxc[3*i+2]+1+kk0; |
| 1580 | of.write(QString("f %1 %2 %3\n") .arg(n).arg(m).arg(o) .toLatin1()); |
| 1581 | //of.write(QString("f %1//%4 %2//%5 %3//%6\n") |
| 1582 | //.arg(n-kk0).arg(m-kk0).arg(o-kk0) |
| 1583 | |
| 1584 | } |
| 1585 | kk0=kk; |
| 1586 | //* |
| 1587 | vec1.x=(_bonds.at(j).ato1->pos.y-_bonds.at(j).ato2->pos.y); |
| 1588 | vec1.y=(_bonds.at(j).ato2->pos.x-_bonds.at(j).ato1->pos.x); |
| 1589 | vec1.z=0; |
| 1590 | if (Norm(vec1)>0.00000001) vec1=Normalize(vec1); |
| 1591 | else vec1=V3(0,1,0); |
| 1592 | arr[0]=acos(((_bonds.at(j).ato2->pos.z-_bonds.at(j).ato1->pos.z)/ |
| 1593 | (sqrt((_bonds.at(j).ato2->pos.x-_bonds.at(j).ato1->pos.x)*(_bonds.at(j).ato2->pos.x-_bonds.at(j).ato1->pos.x)+ |
| 1594 | (_bonds.at(j).ato2->pos.y-_bonds.at(j).ato1->pos.y)*(_bonds.at(j).ato2->pos.y-_bonds.at(j).ato1->pos.y)+ |
| 1595 | (_bonds.at(j).ato2->pos.z-_bonds.at(j).ato1->pos.z)*(_bonds.at(j).ato2->pos.z-_bonds.at(j).ato1->pos.z)))))/M_PI*180.0; |
| 1596 | arr[1]=vec1.x; |
| 1597 | arr[2]=vec1.y; |
| 1598 | arr[3]=vec1.z; |
| 1599 | Matrix m3=rotarb(arr); |
| 1600 | of.write(QString("\no %1=%2\n").arg(_bonds.at(j).ato2->Label).arg(_bonds.at(j).ato1->Label).toLatin1()); |
| 1601 | of.write(QString("\nusemtl %1\n").arg((bondColorStyle)?"bond": PSE.at(_bonds.at(j).ato2->an)).toLatin1()); |
| 1602 | for (int i=0; i<40; i++){ |
| 1603 | V3 vec(vc[3*i],vc[3*i+1],vc[3*i+2]); |
| 1604 | vec=(m3*m1)*vec; |
| 1605 | of.write(QString("v %1 %2 %3\n") |
| 1606 | .arg(anf2.x + vec.x ,12,'f',6) |
| 1607 | .arg(anf2.y + vec.y ,12,'f',6) |
| 1608 | .arg(anf2.z + vec.z ,12,'f',6) |
| 1609 | .toLatin1() |
| 1610 | ); |
| 1611 | |
| 1612 | kk++; |
| 1613 | } |
| 1614 | for (int i=0; i<20;i++){ |
| 1615 | uint n= idxc[3*i]+1+kk0; |
| 1616 | uint m= idxc[3*i+1]+1+kk0; |
| 1617 | uint o= idxc[3*i+2]+1+kk0; |
| 1618 | of.write(QString("f %1 %2 %3\n") .arg(n).arg(m).arg(o) .toLatin1()); |
| 1619 | //of.write(QString("f %1//%4 %2//%5 %3//%6\n") |
| 1620 | //.arg(n-kk0).arg(m-kk0).arg(o-kk0) |
| 1621 | |
| 1622 | } |
| 1623 | kk0=kk; |
| 1624 | // */ |
| 1625 | } |
| 1626 | of.close(); |
| 1627 | QFile mf(wfmtl); |
| 1628 | mf.open(QIODevice::WriteOnly|QIODevice::Text); |
| 1629 | for (int i=0; i<PSE.size(); i++){ |
| 1630 | mf.write(QString("newmtl %1\n").arg(PSE.at(i)).toLatin1()); |
| 1631 | //mf.write(QString("Kd %1 %2 %3\nKs %1 %2 %3\nNs 1000.0\n\n").arg(atomColor(i].redF()).arg(atomColor(i].greenF()).arg(atomColor(i].blueF()).toLatin1()); |
| 1632 | mf.write(QString("Kd %1 %2 %3\nKs 0.2 0.2 0.2\nNs 1000.0\n\n").arg(atomColor(i).redF()).arg(atomColor(i).greenF()).arg(atomColor(i).blueF()).toLatin1()); |
| 1633 | } |
| 1634 | mf.write(QString("newmtl bond\nKd %1 %2 %3\nKs 0 0 0\n\n").arg(bondColor.redF()).arg(bondColor.greenF()).arg(bondColor.blueF()).toLatin1()); |
| 1635 | mf.write(QString("newmtl black\nKd 0 0 0\nKs 0 0 0\n\n").toLatin1()); |
| 1636 | mf.write(QString("newmtl white\nKd 1 1 1\nKs 0 0 0\n\n").toLatin1()); |
| 1637 | mf.close(); |
| 1638 | |
| 1639 | } |
| 1640 | |
| 1641 | void Molecule::myCylinder(int rod){ |
| 1642 | static const GLuint idx3[120] = { |
| 1643 | 0, 20, 1, 1, 20, 21, |
| 1644 | 1, 21, 2, 2, 21, 22, |
| 1645 | 2, 22, 3, 3, 22, 23, |
| 1646 | 3, 23, 4, 4, 23, 24, |
| 1647 | 4, 24, 5, 5, 24, 25, |
| 1648 | 5, 25, 6, 6, 25, 26, |
| 1649 | 6, 26, 7, 7, 26, 27, |
| 1650 | 7, 27, 8, 8, 27, 28, |
| 1651 | 8, 28, 9, 9, 28, 29, |
| 1652 | 9, 29, 10, 10, 29, 30, |
| 1653 | 10, 30, 11, 11, 30, 31, |
| 1654 | 11, 31, 12, 12, 31, 32, |
| 1655 | 12, 32, 13, 13, 32, 33, |
| 1656 | 13, 33, 14, 14, 33, 34, |
| 1657 | 14, 34, 15, 15, 34, 35, |
| 1658 | 15, 35, 16, 16, 35, 36, |
| 1659 | 16, 36, 17, 17, 36, 37, |
| 1660 | 17, 37, 18, 18, 37, 38, |
| 1661 | 18, 38, 19, 19, 38, 39, |
| 1662 | 19, 39, 0, 0, 39, 20 |
| 1663 | }; |
| 1664 | static const GLuint idx2[60] = { |
| 1665 | 0, 20, 2, 2, 20, 22, |
| 1666 | 2, 22, 4, 4, 22, 24, |
| 1667 | 4, 24, 6, 6, 24, 26, |
| 1668 | 6, 26, 8, 8, 26, 28, |
| 1669 | 8, 28, 10, 10, 28, 30, |
| 1670 | 10, 30, 12, 12, 30, 32, |
| 1671 | 12, 32, 14, 14, 32, 34, |
| 1672 | 14, 34, 16, 16, 34, 36, |
| 1673 | 16, 36, 18, 18, 36, 38, |
| 1674 | 18, 38, 0, 0, 38, 20, |
| 1675 | }; |
| 1676 | static const GLuint idx1[30] = { |
| 1677 | 0, 20, 4, 4, 20, 24, |
| 1678 | 4, 24, 8, 8, 24, 28, |
| 1679 | 8, 28, 12, 12, 28, 32, |
| 1680 | 12, 32, 16, 16, 32, 36, |
| 1681 | 16, 36, 0, 0, 36, 20, |
| 1682 | }; |
| 1683 | static const GLfloat v[120] = { |
| 1684 | 1.000000000f, 0.000000000f, 0.000000000f,//0 |
| 1685 | 0.951056516f, 0.309016994f, 0.000000000f,//18 |
| 1686 | 0.809016994f, 0.587785252f, 0.000000000f,//36 |
| 1687 | 0.587785252f, 0.809016994f, 0.000000000f,//54 |
| 1688 | 0.309016994f, 0.951056516f, 0.000000000f,//72 |
| 1689 | 0.000000000f, 1.000000000f, 0.000000000f,//90 |
| 1690 | -0.309016994f, 0.951056516f, 0.000000000f,//108 |
| 1691 | -0.587785252f, 0.809016994f, 0.000000000f,//126 |
| 1692 | -0.809016994f, 0.587785252f, 0.000000000f,//144 |
| 1693 | -0.951056516f, 0.309016994f, 0.000000000f,//162 |
| 1694 | -1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1695 | -0.951056516f,-0.309016994f, 0.000000000f,//198 |
| 1696 | -0.809016994f,-0.587785252f, 0.000000000f,//216 |
| 1697 | -0.587785252f,-0.809016994f, 0.000000000f,//234 |
| 1698 | -0.309016994f,-0.951056516f, 0.000000000f,//252 |
| 1699 | -0.000000000f,-1.000000000f, 0.000000000f,//270 |
| 1700 | 0.309016994f,-0.951056516f, 0.000000000f,//288 |
| 1701 | 0.587785252f,-0.809016994f, 0.000000000f,//306 |
| 1702 | 0.809016994f,-0.587785252f, 0.000000000f,//324 |
| 1703 | 0.951056516f,-0.309016994f, 0.000000000f,//342 |
| 1704 | 1.000000000f, 0.000000000f, 1.000000000f,//0 |
| 1705 | 0.951056516f, 0.309016994f, 1.000000000f,//18 |
| 1706 | 0.809016994f, 0.587785252f, 1.000000000f,//36 |
| 1707 | 0.587785252f, 0.809016994f, 1.000000000f,//54 |
| 1708 | 0.309016994f, 0.951056516f, 1.000000000f,//72 |
| 1709 | 0.000000000f, 1.000000000f, 1.000000000f,//90 |
| 1710 | -0.309016994f, 0.951056516f, 1.000000000f,//108 |
| 1711 | -0.587785252f, 0.809016994f, 1.000000000f,//126 |
| 1712 | -0.809016994f, 0.587785252f, 1.000000000f,//144 |
| 1713 | -0.951056516f, 0.309016994f, 1.000000000f,//162 |
| 1714 | -1.000000000f, 0.000000000f, 1.000000000f,//180 |
| 1715 | -0.951056516f,-0.309016994f, 1.000000000f,//198 |
| 1716 | -0.809016994f,-0.587785252f, 1.000000000f,//216 |
| 1717 | -0.587785252f,-0.809016994f, 1.000000000f,//234 |
| 1718 | -0.309016994f,-0.951056516f, 1.000000000f,//252 |
| 1719 | -0.000000000f,-1.000000000f, 1.000000000f,//270 |
| 1720 | 0.309016994f,-0.951056516f, 1.000000000f,//288 |
| 1721 | 0.587785252f,-0.809016994f, 1.000000000f,//306 |
| 1722 | 0.809016994f,-0.587785252f, 1.000000000f,//324 |
| 1723 | 0.951056516f,-0.309016994f, 1.000000000f//342 |
| 1724 | }; |
| 1725 | /* static const GLfloat n[120] = { |
| 1726 | 1.000000000, 0.000000000, 0.000000000,//0 |
| 1727 | 0.951056516, 0.309016994, 0.000000000,//18 |
| 1728 | 0.809016994, 0.587785252, 0.000000000,//36 |
| 1729 | 0.587785252, 0.809016994, 0.000000000,//54 |
| 1730 | 0.309016994, 0.951056516, 0.000000000,//72 |
| 1731 | 0.000000000, 1.000000000, 0.000000000,//90 |
| 1732 | -0.309016994, 0.951056516, 0.000000000,//108 |
| 1733 | -0.587785252, 0.809016994, 0.000000000,//126 |
| 1734 | -0.809016994, 0.587785252, 0.000000000,//144 |
| 1735 | -0.951056516, 0.309016994, 0.000000000,//162 |
| 1736 | -1.000000000, 0.000000000, 0.000000000,//180 |
| 1737 | -0.951056516,-0.309016994, 0.000000000,//198 |
| 1738 | -0.809016994,-0.587785252, 0.000000000,//216 |
| 1739 | -0.587785252,-0.809016994, 0.000000000,//234 |
| 1740 | -0.309016994,-0.951056516, 0.000000000,//252 |
| 1741 | -0.000000000,-1.000000000, 0.000000000,//270 |
| 1742 | 0.309016994,-0.951056516, 0.000000000,//288 |
| 1743 | 0.587785252,-0.809016994, 0.000000000,//306 |
| 1744 | 0.809016994,-0.587785252, 0.000000000,//324 |
| 1745 | 0.951056516,-0.309016994, 0.000000000,//342 |
| 1746 | 1.000000000, 0.000000000, 0.000000000,//0 |
| 1747 | 0.951056516, 0.309016994, 0.000000000,//18 |
| 1748 | 0.809016994, 0.587785252, 0.000000000,//36 |
| 1749 | 0.587785252, 0.809016994, 0.000000000,//54 |
| 1750 | 0.309016994, 0.951056516, 0.000000000,//72 |
| 1751 | 0.000000000, 1.000000000, 0.000000000,//90 |
| 1752 | -0.309016994, 0.951056516, 0.000000000,//108 |
| 1753 | -0.587785252, 0.809016994, 0.000000000,//126 |
| 1754 | -0.809016994, 0.587785252, 0.000000000,//144 |
| 1755 | -0.951056516, 0.309016994, 0.000000000,//162 |
| 1756 | -1.000000000, 0.000000000, 0.000000000,//180 |
| 1757 | -0.951056516,-0.309016994, 0.000000000,//198 |
| 1758 | -0.809016994,-0.587785252, 0.000000000,//216 |
| 1759 | -0.587785252,-0.809016994, 0.000000000,//234 |
| 1760 | -0.309016994,-0.951056516, 0.000000000,//252 |
| 1761 | -0.000000000,-1.000000000, 0.000000000,//270 |
| 1762 | 0.309016994,-0.951056516, 0.000000000,//288 |
| 1763 | 0.587785252,-0.809016994, 0.000000000,//306 |
| 1764 | 0.809016994,-0.587785252, 0.000000000,//324 |
| 1765 | 0.951056516,-0.309016994, 0.000000000//342 |
| 1766 | };*/ |
| 1767 | static const GLfloat n[120] = { |
| 1768 | -1.000000000f,-0.000000000f, 0.000000000f,//0 |
| 1769 | -0.951056516f,-0.309016994f, 0.000000000f,//18 |
| 1770 | -0.809016994f,-0.587785252f, 0.000000000f,//36 |
| 1771 | -0.587785252f,-0.809016994f, 0.000000000f,//54 |
| 1772 | -0.309016994f,-0.951056516f, 0.000000000f,//72 |
| 1773 | 0.000000000f,-1.000000000f, 0.000000000f,//90 |
| 1774 | 0.309016994f,-0.951056516f, 0.000000000f,//108 |
| 1775 | 0.587785252f,-0.809016994f, 0.000000000f,//126 |
| 1776 | 0.809016994f,-0.587785252f, 0.000000000f,//144 |
| 1777 | 0.951056516f,-0.309016994f, 0.000000000f,//162 |
| 1778 | 1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1779 | 0.951056516f, 0.309016994f, 0.000000000f,//198 |
| 1780 | 0.809016994f, 0.587785252f, 0.000000000f,//216 |
| 1781 | 0.587785252f, 0.809016994f, 0.000000000f,//234 |
| 1782 | 0.309016994f, 0.951056516f, 0.000000000f,//252 |
| 1783 | 0.000000000f, 1.000000000f, 0.000000000f,//270 |
| 1784 | -0.309016994f, 0.951056516f, 0.000000000f,//288 |
| 1785 | -0.587785252f, 0.809016994f, 0.000000000f,//306 |
| 1786 | -0.809016994f, 0.587785252f, 0.000000000f,//324 |
| 1787 | -0.951056516f, 0.309016994f, 0.000000000f,//342 |
| 1788 | -1.000000000f, 0.000000000f, 0.000000000f,//0 |
| 1789 | -0.951056516f,-0.309016994f, 0.000000000f,//18 |
| 1790 | -0.809016994f,-0.587785252f, 0.000000000f,//36 |
| 1791 | -0.587785252f,-0.809016994f, 0.000000000f,//54 |
| 1792 | -0.309016994f,-0.951056516f, 0.000000000f,//72 |
| 1793 | 0.000000000f,-1.000000000f, 0.000000000f,//90 |
| 1794 | 0.309016994f,-0.951056516f, 0.000000000f,//108 |
| 1795 | 0.587785252f,-0.809016994f, 0.000000000f,//126 |
| 1796 | 0.809016994f,-0.587785252f, 0.000000000f,//144 |
| 1797 | 0.951056516f,-0.309016994f, 0.000000000f,//162 |
| 1798 | 1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1799 | 0.951056516f, 0.309016994f, 0.000000000f,//198 |
| 1800 | 0.809016994f, 0.587785252f, 0.000000000f,//216 |
| 1801 | 0.587785252f, 0.809016994f, 0.000000000f,//234 |
| 1802 | 0.309016994f, 0.951056516f, 0.000000000f,//252 |
| 1803 | 0.000000000f, 1.000000000f, 0.000000000f,//270 |
| 1804 | -0.309016994f, 0.951056516f, 0.000000000f,//288 |
| 1805 | -0.587785252f, 0.809016994f, 0.000000000f,//306 |
| 1806 | -0.809016994f, 0.587785252f, 0.000000000f,//324 |
| 1807 | -0.951056516f, 0.309016994f, 0.000000000f//342 |
| 1808 | }; |
| 1809 | static const GLshort t[80] = { |
| 1810 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
| 1811 | 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 |
| 1812 | }; |
| 1813 | glEnableClientState(GL_VERTEX_ARRAY); |
| 1814 | glVertexPointer(3, GL_FLOAT, 0, v); |
| 1815 | glEnableClientState(GL_NORMAL_ARRAY); |
| 1816 | glNormalPointer(GL_FLOAT, 0, n); |
| 1817 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
| 1818 | glTexCoordPointer(2, GL_SHORT, 0, t); |
| 1819 | switch (rod){ |
| 1820 | case 1:glDrawElements(GL_TRIANGLES, 30, GL_UNSIGNED_INT,idx1);break; |
| 1821 | case 2:glDrawElements(GL_TRIANGLES, 60, GL_UNSIGNED_INT,idx2);break; |
| 1822 | case 3:glDrawElements(GL_TRIANGLES, 120, GL_UNSIGNED_INT,idx3);break; |
| 1823 | } |
| 1824 | } |
| 1825 | |
| 1826 | void Molecule::myCone(){ |
| 1827 | |
| 1828 | static const GLuint idx1[30] = { |
| 1829 | 0, 20, 4, 4, 20, 24, |
| 1830 | 4, 24, 8, 8, 24, 28, |
| 1831 | 8, 28, 12, 12, 28, 32, |
| 1832 | 12, 32, 16, 16, 32, 36, |
| 1833 | 16, 36, 0, 0, 36, 20, |
| 1834 | }; |
| 1835 | static const GLfloat v[120] = { |
| 1836 | |
| 1837 | 1.000000000f, 0.000000000f, 0.000000000f,//0 |
| 1838 | 0.951056516f, 0.309016994f, 0.000000000f,//18 |
| 1839 | 0.809016994f, 0.587785252f, 0.000000000f,//36 |
| 1840 | 0.587785252f, 0.809016994f, 0.000000000f,//54 |
| 1841 | 0.309016994f, 0.951056516f, 0.000000000f,//72 |
| 1842 | 0.000000000f, 1.000000000f, 0.000000000f,//90 |
| 1843 | -0.309016994f, 0.951056516f, 0.000000000f,//108 |
| 1844 | -0.587785252f, 0.809016994f, 0.000000000f,//126 |
| 1845 | -0.809016994f, 0.587785252f, 0.000000000f,//144 |
| 1846 | -0.951056516f, 0.309016994f, 0.000000000f,//162 |
| 1847 | -1.000000000f, 0.000000000f, 0.000000000f,//180 |
| 1848 | -0.951056516f,-0.309016994f, 0.000000000f,//198 |
| 1849 | -0.809016994f,-0.587785252f, 0.000000000f,//216 |
| 1850 | -0.587785252f,-0.809016994f, 0.000000000f,//234 |
| 1851 | -0.309016994f,-0.951056516f, 0.000000000f,//252 |
| 1852 | -0.000000000f,-1.000000000f, 0.000000000f,//270 |
| 1853 | 0.309016994f,-0.951056516f, 0.000000000f,//288 |
| 1854 | 0.587785252f,-0.809016994f, 0.000000000f,//306 |
| 1855 | 0.809016994f,-0.587785252f, 0.000000000f,//324 |
| 1856 | 0.951056516f,-0.309016994f, 0.000000000f,//342 |
| 1857 | 0.0f,0.0f, 1.000000000f,//0 |
| 1858 | 0.0f,0.0f, 1.000000000f,//18 |
| 1859 | 0.0f,0.0f, 1.000000000f,//36 |
| 1860 | 0.0f,0.0f, 1.000000000f,//54 |
| 1861 | 0.0f,0.0f, 1.000000000f,//72 |
| 1862 | 0.0f,0.0f, 1.000000000f,//90 |
| 1863 | 0.0f,0.0f, 1.000000000f,//108 |
| 1864 | 0.0f,0.0f, 1.000000000f,//126 |
| 1865 | 0.0f,0.0f, 1.000000000f,//144 |
| 1866 | 0.0f,0.0f, 1.000000000f,//162 |
| 1867 | 0.0f,0.0f, 1.000000000f,//180 |
| 1868 | 0.0f,0.0f, 1.000000000f,//198 |
| 1869 | 0.0f,0.0f, 1.000000000f,//216 |
| 1870 | 0.0f,0.0f, 1.000000000f,//234 |
| 1871 | 0.0f,0.0f, 1.000000000f,//252 |
| 1872 | 0.0f,0.0f, 1.000000000f,//270 |
| 1873 | 0.0f,0.0f, 1.000000000f,//288 |
| 1874 | 0.0f,0.0f, 1.000000000f,//306 |
| 1875 | 0.0f,0.0f, 1.000000000f,//324 |
| 1876 | 0.0f,0.0f, 1.000000000f//342 |
| 1877 | }; |
| 1878 | glEnableClientState(GL_VERTEX_ARRAY); |
| 1879 | glVertexPointer(3, GL_FLOAT, 0, v); |
| 1880 | glDrawElements(GL_TRIANGLES, 30, GL_UNSIGNED_INT,idx1); |
| 1881 | glDisableClientState(GL_VERTEX_ARRAY); |
| 1882 | } |
| 1883 | |
| 1884 | |
| 1885 | void Molecule::cylinder(double strength, double length){ |
| 1886 | //glPushMatrix(); |
| 1887 | glScaled(strength,strength,length); |
| 1888 | myCylinder(qMin(LOD-1,3)); |
| 1889 | //glPopMatrix(); |
| 1890 | } |
| 1891 | |
| 1892 | void Molecule::mySphere(int bal){ |
| 1893 | static const GLuint idx1[240] = { |
| 1894 | 1, 12, 14,// 0 0.546533 0.618034 0.546533 |
| 1895 | 12, 0, 13,// 1 0.546533 0.546533 0.618034 |
| 1896 | 13, 5, 14,// 2 0.546533 0.546533 0.618034 |
| 1897 | 12, 13, 14,// 3 0.618034 0.618034 0.618034 |
| 1898 | 0, 12, 16,// 4 0.546533 0.618034 0.546533 |
| 1899 | 12, 1, 15,// 5 0.546533 0.546533 0.618034 |
| 1900 | 15, 7, 16,// 6 0.546533 0.546533 0.618034 |
| 1901 | 12, 15, 16,// 7 0.618034 0.618034 0.618034 |
| 1902 | 10, 17, 18,// 8 0.546533 0.618034 0.546533 |
| 1903 | 17, 0, 16,// 9 0.546533 0.546533 0.618034 |
| 1904 | 16, 7, 18,// 10 0.546533 0.546533 0.618034 |
| 1905 | 17, 16, 18,// 11 0.618034 0.618034 0.618034 |
| 1906 | 0, 17, 20,// 12 0.546533 0.618034 0.546533 |
| 1907 | 17, 10, 19,// 13 0.546533 0.546533 0.618034 |
| 1908 | 19, 11, 20,// 14 0.546533 0.546533 0.618034 |
| 1909 | 17, 19, 20,// 15 0.618034 0.618034 0.618034 |
| 1910 | 11, 21, 20,// 16 0.546533 0.618034 0.546533 |
| 1911 | 21, 5, 13,// 17 0.546533 0.546533 0.618034 |
| 1912 | 13, 0, 20,// 18 0.546533 0.546533 0.618034 |
| 1913 | 21, 13, 20,// 19 0.618034 0.618034 0.618034 |
| 1914 | 5, 21, 23,// 20 0.546533 0.618034 0.546533 |
| 1915 | 21, 11, 22,// 21 0.546533 0.546533 0.618034 |
| 1916 | 22, 4, 23,// 22 0.546533 0.546533 0.618034 |
| 1917 | 21, 22, 23,// 23 0.618034 0.618034 0.618034 |
| 1918 | 2, 24, 25,// 24 0.546533 0.618034 0.546533 |
| 1919 | 24, 11, 19,// 25 0.546533 0.546533 0.618034 |
| 1920 | 19, 10, 25,// 26 0.546533 0.546533 0.618034 |
| 1921 | 24, 19, 25,// 27 0.618034 0.618034 0.618034 |
| 1922 | 11, 24, 22,// 28 0.546533 0.618034 0.546533 |
| 1923 | 24, 2, 26,// 29 0.546533 0.546533 0.618034 |
| 1924 | 26, 4, 22,// 30 0.546533 0.546533 0.618034 |
| 1925 | 24, 26, 22,// 31 0.618034 0.618034 0.618034 |
| 1926 | 10, 27, 25,// 32 0.546533 0.618034 0.546533 |
| 1927 | 27, 6, 28,// 33 0.546533 0.546533 0.618034 |
| 1928 | 28, 2, 25,// 34 0.546533 0.546533 0.618034 |
| 1929 | 27, 28, 25,// 35 0.618034 0.618034 0.618034 |
| 1930 | 6, 27, 29,// 36 0.546533 0.618034 0.546533 |
| 1931 | 27, 10, 18,// 37 0.546533 0.546533 0.618034 |
| 1932 | 18, 7, 29,// 38 0.546533 0.546533 0.618034 |
| 1933 | 27, 18, 29,// 39 0.618034 0.618034 0.618034 |
| 1934 | 7, 30, 29,// 40 0.546533 0.618034 0.546533 |
| 1935 | 30, 8, 31,// 41 0.546533 0.546533 0.618034 |
| 1936 | 31, 6, 29,// 42 0.546533 0.546533 0.618034 |
| 1937 | 30, 31, 29,// 43 0.618034 0.618034 0.618034 |
| 1938 | 8, 30, 32,// 44 0.546533 0.618034 0.546533 |
| 1939 | 30, 7, 15,// 45 0.546533 0.546533 0.618034 |
| 1940 | 15, 1, 32,// 46 0.546533 0.546533 0.618034 |
| 1941 | 30, 15, 32,// 47 0.618034 0.618034 0.618034 |
| 1942 | 9, 33, 34,// 48 0.546533 0.618034 0.546533 |
| 1943 | 33, 1, 14,// 49 0.546533 0.546533 0.618034 |
| 1944 | 14, 5, 34,// 50 0.546533 0.546533 0.618034 |
| 1945 | 33, 14, 34,// 51 0.618034 0.618034 0.618034 |
| 1946 | 1, 33, 32,// 52 0.546533 0.618034 0.546533 |
| 1947 | 33, 9, 35,// 53 0.546533 0.546533 0.618034 |
| 1948 | 35, 8, 32,// 54 0.546533 0.546533 0.618034 |
| 1949 | 33, 35, 32,// 55 0.618034 0.618034 0.618034 |
| 1950 | 4, 36, 23,// 56 0.546533 0.618034 0.546533 |
| 1951 | 36, 9, 34,// 57 0.546533 0.546533 0.618034 |
| 1952 | 34, 5, 23,// 58 0.546533 0.546533 0.618034 |
| 1953 | 36, 34, 23,// 59 0.618034 0.618034 0.618034 |
| 1954 | 9, 36, 38,// 60 0.546533 0.618034 0.546533 |
| 1955 | 36, 4, 37,// 61 0.546533 0.546533 0.618034 |
| 1956 | 37, 3, 38,// 62 0.546533 0.546533 0.618034 |
| 1957 | 36, 37, 38,// 63 0.618034 0.618034 0.618034 |
| 1958 | 3, 39, 38,// 64 0.546533 0.618034 0.546533 |
| 1959 | 39, 8, 35,// 65 0.546533 0.546533 0.618034 |
| 1960 | 35, 9, 38,// 66 0.546533 0.546533 0.618034 |
| 1961 | 39, 35, 38,// 67 0.618034 0.618034 0.618034 |
| 1962 | 8, 39, 31,// 68 0.546533 0.618034 0.546533 |
| 1963 | 39, 3, 40,// 69 0.546533 0.546533 0.618034 |
| 1964 | 40, 6, 31,// 70 0.546533 0.546533 0.618034 |
| 1965 | 39, 40, 31,// 71 0.618034 0.618034 0.618034 |
| 1966 | 3, 41, 40,// 72 0.546533 0.618034 0.546533 |
| 1967 | 41, 2, 28,// 73 0.546533 0.546533 0.618034 |
| 1968 | 28, 6, 40,// 74 0.546533 0.546533 0.618034 |
| 1969 | 41, 28, 40,// 75 0.618034 0.618034 0.618034 |
| 1970 | 2, 41, 26,// 76 0.546533 0.618034 0.546533 |
| 1971 | 41, 3, 37,// 77 0.546533 0.546533 0.618034 |
| 1972 | 37, 4, 26,// 78 0.546533 0.546533 0.618034 |
| 1973 | 41, 37, 26 // 79 0.618034 0.618034 0.618034 |
| 1974 | }; |
| 1975 | static const GLuint idx2[960] = { |
| 1976 | 1, 42, 44,// 0 0.275904 0.321244 0.275904 |
| 1977 | 42, 12, 43,// 1 0.275904 0.312869 0.285473 |
| 1978 | 43, 14, 44,// 2 0.312869 0.275904 0.285473 |
| 1979 | 42, 43, 44,// 3 0.285473 0.285473 0.321244 |
| 1980 | 12, 45, 47,// 4 0.275904 0.285473 0.312869 |
| 1981 | 45, 0, 46,// 5 0.275904 0.275904 0.321244 |
| 1982 | 46, 13, 47,// 6 0.275904 0.312869 0.285473 |
| 1983 | 45, 46, 47,// 7 0.321244 0.285473 0.285473 |
| 1984 | 13, 48, 50,// 8 0.275904 0.285473 0.312869 |
| 1985 | 48, 5, 49,// 9 0.275904 0.275904 0.321244 |
| 1986 | 49, 14, 50,// 10 0.275904 0.312869 0.285473 |
| 1987 | 48, 49, 50,// 11 0.321244 0.285473 0.285473 |
| 1988 | 12, 47, 43,// 12 0.312869 0.324920 0.312869 |
| 1989 | 47, 13, 50,// 13 0.312869 0.312869 0.324920 |
| 1990 | 50, 14, 43,// 14 0.312869 0.312869 0.324920 |
| 1991 | 47, 50, 43,// 15 0.324920 0.324920 0.324920 |
| 1992 | 0, 45, 52,// 16 0.275904 0.321244 0.275904 |
| 1993 | 45, 12, 51,// 17 0.275904 0.312869 0.285473 |
| 1994 | 51, 16, 52,// 18 0.312869 0.275904 0.285473 |
| 1995 | 45, 51, 52,// 19 0.285473 0.285473 0.321244 |
| 1996 | 12, 42, 54,// 20 0.275904 0.285473 0.312869 |
| 1997 | 42, 1, 53,// 21 0.275904 0.275904 0.321244 |
| 1998 | 53, 15, 54,// 22 0.275904 0.312869 0.285473 |
| 1999 | 42, 53, 54,// 23 0.321244 0.285473 0.285473 |
| 2000 | 15, 55, 57,// 24 0.275904 0.285473 0.312869 |
| 2001 | 55, 7, 56,// 25 0.275904 0.275904 0.321244 |
| 2002 | 56, 16, 57,// 26 0.275904 0.312869 0.285473 |
| 2003 | 55, 56, 57,// 27 0.321244 0.285473 0.285473 |
| 2004 | 12, 54, 51,// 28 0.312869 0.324920 0.312869 |
| 2005 | 54, 15, 57,// 29 0.312869 0.312869 0.324920 |
| 2006 | 57, 16, 51,// 30 0.312869 0.312869 0.324920 |
| 2007 | 54, 57, 51,// 31 0.324920 0.324920 0.324920 |
| 2008 | 10, 58, 60,// 32 0.275904 0.321244 0.275904 |
| 2009 | 58, 17, 59,// 33 0.275904 0.312869 0.285473 |
| 2010 | 59, 18, 60,// 34 0.312869 0.275904 0.285473 |
| 2011 | 58, 59, 60,// 35 0.285473 0.285473 0.321244 |
| 2012 | 17, 61, 62,// 36 0.275904 0.285473 0.312869 |
| 2013 | 61, 0, 52,// 37 0.275904 0.275904 0.321244 |
| 2014 | 52, 16, 62,// 38 0.275904 0.312869 0.285473 |
| 2015 | 61, 52, 62,// 39 0.321244 0.285473 0.285473 |
| 2016 | 16, 56, 64,// 40 0.275904 0.285473 0.312869 |
| 2017 | 56, 7, 63,// 41 0.275904 0.275904 0.321244 |
| 2018 | 63, 18, 64,// 42 0.275904 0.312869 0.285473 |
| 2019 | 56, 63, 64,// 43 0.321244 0.285473 0.285473 |
| 2020 | 17, 62, 59,// 44 0.312869 0.324920 0.312869 |
| 2021 | 62, 16, 64,// 45 0.312869 0.312869 0.324920 |
| 2022 | 64, 18, 59,// 46 0.312869 0.312869 0.324920 |
| 2023 | 62, 64, 59,// 47 0.324920 0.324920 0.324920 |
| 2024 | 0, 61, 66,// 48 0.275904 0.321244 0.275904 |
| 2025 | 61, 17, 65,// 49 0.275904 0.312869 0.285473 |
| 2026 | 65, 20, 66,// 50 0.312869 0.275904 0.285473 |
| 2027 | 61, 65, 66,// 51 0.285473 0.285473 0.321244 |
| 2028 | 17, 58, 68,// 52 0.275904 0.285473 0.312869 |
| 2029 | 58, 10, 67,// 53 0.275904 0.275904 0.321244 |
| 2030 | 67, 19, 68,// 54 0.275904 0.312869 0.285473 |
| 2031 | 58, 67, 68,// 55 0.321244 0.285473 0.285473 |
| 2032 | 19, 69, 71,// 56 0.275904 0.285473 0.312869 |
| 2033 | 69, 11, 70,// 57 0.275904 0.275904 0.321244 |
| 2034 | 70, 20, 71,// 58 0.275904 0.312869 0.285473 |
| 2035 | 69, 70, 71,// 59 0.321244 0.285473 0.285473 |
| 2036 | 17, 68, 65,// 60 0.312869 0.324920 0.312869 |
| 2037 | 68, 19, 71,// 61 0.312869 0.312869 0.324920 |
| 2038 | 71, 20, 65,// 62 0.312869 0.312869 0.324920 |
| 2039 | 68, 71, 65,// 63 0.324920 0.324920 0.324920 |
| 2040 | 11, 72, 70,// 64 0.275904 0.321244 0.275904 |
| 2041 | 72, 21, 73,// 65 0.275904 0.312869 0.285473 |
| 2042 | 73, 20, 70,// 66 0.312869 0.275904 0.285473 |
| 2043 | 72, 73, 70,// 67 0.285473 0.285473 0.321244 |
| 2044 | 21, 74, 75,// 68 0.275904 0.285473 0.312869 |
| 2045 | 74, 5, 48,// 69 0.275904 0.275904 0.321244 |
| 2046 | 48, 13, 75,// 70 0.275904 0.312869 0.285473 |
| 2047 | 74, 48, 75,// 71 0.321244 0.285473 0.285473 |
| 2048 | 13, 46, 76,// 72 0.275904 0.285473 0.312869 |
| 2049 | 46, 0, 66,// 73 0.275904 0.275904 0.321244 |
| 2050 | 66, 20, 76,// 74 0.275904 0.312869 0.285473 |
| 2051 | 46, 66, 76,// 75 0.321244 0.285473 0.285473 |
| 2052 | 21, 75, 73,// 76 0.312869 0.324920 0.312869 |
| 2053 | 75, 13, 76,// 77 0.312869 0.312869 0.324920 |
| 2054 | 76, 20, 73,// 78 0.312869 0.312869 0.324920 |
| 2055 | 75, 76, 73,// 79 0.324920 0.324920 0.324920 |
| 2056 | 5, 74, 78,// 80 0.275904 0.321244 0.275904 |
| 2057 | 74, 21, 77,// 81 0.275904 0.312869 0.285473 |
| 2058 | 77, 23, 78,// 82 0.312869 0.275904 0.285473 |
| 2059 | 74, 77, 78,// 83 0.285473 0.285473 0.321244 |
| 2060 | 21, 72, 80,// 84 0.275904 0.285473 0.312869 |
| 2061 | 72, 11, 79,// 85 0.275904 0.275904 0.321244 |
| 2062 | 79, 22, 80,// 86 0.275904 0.312869 0.285473 |
| 2063 | 72, 79, 80,// 87 0.321244 0.285473 0.285473 |
| 2064 | 22, 81, 83,// 88 0.275904 0.285473 0.312869 |
| 2065 | 81, 4, 82,// 89 0.275904 0.275904 0.321244 |
| 2066 | 82, 23, 83,// 90 0.275904 0.312869 0.285473 |
| 2067 | 81, 82, 83,// 91 0.321244 0.285473 0.285473 |
| 2068 | 21, 80, 77,// 92 0.312869 0.324920 0.312869 |
| 2069 | 80, 22, 83,// 93 0.312869 0.312869 0.324920 |
| 2070 | 83, 23, 77,// 94 0.312869 0.312869 0.324920 |
| 2071 | 80, 83, 77,// 95 0.324920 0.324920 0.324920 |
| 2072 | 2, 84, 86,// 96 0.275904 0.321244 0.275904 |
| 2073 | 84, 24, 85,// 97 0.275904 0.312869 0.285473 |
| 2074 | 85, 25, 86,// 98 0.312869 0.275904 0.285473 |
| 2075 | 84, 85, 86,// 99 0.285473 0.285473 0.321244 |
| 2076 | 24, 87, 88,//100 0.275904 0.285473 0.312869 |
| 2077 | 87, 11, 69,//101 0.275904 0.275904 0.321244 |
| 2078 | 69, 19, 88,//102 0.275904 0.312869 0.285473 |
| 2079 | 87, 69, 88,//103 0.321244 0.285473 0.285473 |
| 2080 | 19, 67, 90,//104 0.275904 0.285473 0.312869 |
| 2081 | 67, 10, 89,//105 0.275904 0.275904 0.321244 |
| 2082 | 89, 25, 90,//106 0.275904 0.312869 0.285473 |
| 2083 | 67, 89, 90,//107 0.321244 0.285473 0.285473 |
| 2084 | 24, 88, 85,//108 0.312869 0.324920 0.312869 |
| 2085 | 88, 19, 90,//109 0.312869 0.312869 0.324920 |
| 2086 | 90, 25, 85,//110 0.312869 0.312869 0.324920 |
| 2087 | 88, 90, 85,//111 0.324920 0.324920 0.324920 |
| 2088 | 11, 87, 79,//112 0.275904 0.321244 0.275904 |
| 2089 | 87, 24, 91,//113 0.275904 0.312869 0.285473 |
| 2090 | 91, 22, 79,//114 0.312869 0.275904 0.285473 |
| 2091 | 87, 91, 79,//115 0.285473 0.285473 0.321244 |
| 2092 | 24, 84, 93,//116 0.275904 0.285473 0.312869 |
| 2093 | 84, 2, 92,//117 0.275904 0.275904 0.321244 |
| 2094 | 92, 26, 93,//118 0.275904 0.312869 0.285473 |
| 2095 | 84, 92, 93,//119 0.321244 0.285473 0.285473 |
| 2096 | 26, 94, 95,//120 0.275904 0.285473 0.312869 |
| 2097 | 94, 4, 81,//121 0.275904 0.275904 0.321244 |
| 2098 | 81, 22, 95,//122 0.275904 0.312869 0.285473 |
| 2099 | 94, 81, 95,//123 0.321244 0.285473 0.285473 |
| 2100 | 24, 93, 91,//124 0.312869 0.324920 0.312869 |
| 2101 | 93, 26, 95,//125 0.312869 0.312869 0.324920 |
| 2102 | 95, 22, 91,//126 0.312869 0.312869 0.324920 |
| 2103 | 93, 95, 91,//127 0.324920 0.324920 0.324920 |
| 2104 | 10, 96, 89,//128 0.275904 0.321244 0.275904 |
| 2105 | 96, 27, 97,//129 0.275904 0.312869 0.285473 |
| 2106 | 97, 25, 89,//130 0.312869 0.275904 0.285473 |
| 2107 | 96, 97, 89,//131 0.285473 0.285473 0.321244 |
| 2108 | 27, 98, 100,//132 0.275904 0.285473 0.312869 |
| 2109 | 98, 6, 99,//133 0.275904 0.275904 0.321244 |
| 2110 | 99, 28, 100,//134 0.275904 0.312869 0.285473 |
| 2111 | 98, 99, 100,//135 0.321244 0.285473 0.285473 |
| 2112 | 28, 101, 102,//136 0.275904 0.285473 0.312869 |
| 2113 | 101, 2, 86,//137 0.275904 0.275904 0.321244 |
| 2114 | 86, 25, 102,//138 0.275904 0.312869 0.285473 |
| 2115 | 101, 86, 102,//139 0.321244 0.285473 0.285473 |
| 2116 | 27, 100, 97,//140 0.312869 0.324920 0.312869 |
| 2117 | 100, 28, 102,//141 0.312869 0.312869 0.324920 |
| 2118 | 102, 25, 97,//142 0.312869 0.312869 0.324920 |
| 2119 | 100, 102, 97,//143 0.324920 0.324920 0.324920 |
| 2120 | 6, 98, 104,//144 0.275904 0.321244 0.275904 |
| 2121 | 98, 27, 103,//145 0.275904 0.312869 0.285473 |
| 2122 | 103, 29, 104,//146 0.312869 0.275904 0.285473 |
| 2123 | 98, 103, 104,//147 0.285473 0.285473 0.321244 |
| 2124 | 27, 96, 105,//148 0.275904 0.285473 0.312869 |
| 2125 | 96, 10, 60,//149 0.275904 0.275904 0.321244 |
| 2126 | 60, 18, 105,//150 0.275904 0.312869 0.285473 |
| 2127 | 96, 60, 105,//151 0.321244 0.285473 0.285473 |
| 2128 | 18, 63, 107,//152 0.275904 0.285473 0.312869 |
| 2129 | 63, 7, 106,//153 0.275904 0.275904 0.321244 |
| 2130 | 106, 29, 107,//154 0.275904 0.312869 0.285473 |
| 2131 | 63, 106, 107,//155 0.321244 0.285473 0.285473 |
| 2132 | 27, 105, 103,//156 0.312869 0.324920 0.312869 |
| 2133 | 105, 18, 107,//157 0.312869 0.312869 0.324920 |
| 2134 | 107, 29, 103,//158 0.312869 0.312869 0.324920 |
| 2135 | 105, 107, 103,//159 0.324920 0.324920 0.324920 |
| 2136 | 7, 108, 106,//160 0.275904 0.321244 0.275904 |
| 2137 | 108, 30, 109,//161 0.275904 0.312869 0.285473 |
| 2138 | 109, 29, 106,//162 0.312869 0.275904 0.285473 |
| 2139 | 108, 109, 106,//163 0.285473 0.285473 0.321244 |
| 2140 | 30, 110, 112,//164 0.275904 0.285473 0.312869 |
| 2141 | 110, 8, 111,//165 0.275904 0.275904 0.321244 |
| 2142 | 111, 31, 112,//166 0.275904 0.312869 0.285473 |
| 2143 | 110, 111, 112,//167 0.321244 0.285473 0.285473 |
| 2144 | 31, 113, 114,//168 0.275904 0.285473 0.312869 |
| 2145 | 113, 6, 104,//169 0.275904 0.275904 0.321244 |
| 2146 | 104, 29, 114,//170 0.275904 0.312869 0.285473 |
| 2147 | 113, 104, 114,//171 0.321244 0.285473 0.285473 |
| 2148 | 30, 112, 109,//172 0.312869 0.324920 0.312869 |
| 2149 | 112, 31, 114,//173 0.312869 0.312869 0.324920 |
| 2150 | 114, 29, 109,//174 0.312869 0.312869 0.324920 |
| 2151 | 112, 114, 109,//175 0.324920 0.324920 0.324920 |
| 2152 | 8, 110, 116,//176 0.275904 0.321244 0.275904 |
| 2153 | 110, 30, 115,//177 0.275904 0.312869 0.285473 |
| 2154 | 115, 32, 116,//178 0.312869 0.275904 0.285473 |
| 2155 | 110, 115, 116,//179 0.285473 0.285473 0.321244 |
| 2156 | 30, 108, 117,//180 0.275904 0.285473 0.312869 |
| 2157 | 108, 7, 55,//181 0.275904 0.275904 0.321244 |
| 2158 | 55, 15, 117,//182 0.275904 0.312869 0.285473 |
| 2159 | 108, 55, 117,//183 0.321244 0.285473 0.285473 |
| 2160 | 15, 53, 119,//184 0.275904 0.285473 0.312869 |
| 2161 | 53, 1, 118,//185 0.275904 0.275904 0.321244 |
| 2162 | 118, 32, 119,//186 0.275904 0.312869 0.285473 |
| 2163 | 53, 118, 119,//187 0.321244 0.285473 0.285473 |
| 2164 | 30, 117, 115,//188 0.312869 0.324920 0.312869 |
| 2165 | 117, 15, 119,//189 0.312869 0.312869 0.324920 |
| 2166 | 119, 32, 115,//190 0.312869 0.312869 0.324920 |
| 2167 | 117, 119, 115,//191 0.324920 0.324920 0.324920 |
| 2168 | 9, 120, 122,//192 0.275904 0.321244 0.275904 |
| 2169 | 120, 33, 121,//193 0.275904 0.312869 0.285473 |
| 2170 | 121, 34, 122,//194 0.312869 0.275904 0.285473 |
| 2171 | 120, 121, 122,//195 0.285473 0.285473 0.321244 |
| 2172 | 33, 123, 124,//196 0.275904 0.285473 0.312869 |
| 2173 | 123, 1, 44,//197 0.275904 0.275904 0.321244 |
| 2174 | 44, 14, 124,//198 0.275904 0.312869 0.285473 |
| 2175 | 123, 44, 124,//199 0.321244 0.285473 0.285473 |
| 2176 | 14, 49, 126,//200 0.275904 0.285473 0.312869 |
| 2177 | 49, 5, 125,//201 0.275904 0.275904 0.321244 |
| 2178 | 125, 34, 126,//202 0.275904 0.312869 0.285473 |
| 2179 | 49, 125, 126,//203 0.321244 0.285473 0.285473 |
| 2180 | 33, 124, 121,//204 0.312869 0.324920 0.312869 |
| 2181 | 124, 14, 126,//205 0.312869 0.312869 0.324920 |
| 2182 | 126, 34, 121,//206 0.312869 0.312869 0.324920 |
| 2183 | 124, 126, 121,//207 0.324920 0.324920 0.324920 |
| 2184 | 1, 123, 118,//208 0.275904 0.321244 0.275904 |
| 2185 | 123, 33, 127,//209 0.275904 0.312869 0.285473 |
| 2186 | 127, 32, 118,//210 0.312869 0.275904 0.285473 |
| 2187 | 123, 127, 118,//211 0.285473 0.285473 0.321244 |
| 2188 | 33, 120, 129,//212 0.275904 0.285473 0.312869 |
| 2189 | 120, 9, 128,//213 0.275904 0.275904 0.321244 |
| 2190 | 128, 35, 129,//214 0.275904 0.312869 0.285473 |
| 2191 | 120, 128, 129,//215 0.321244 0.285473 0.285473 |
| 2192 | 35, 130, 131,//216 0.275904 0.285473 0.312869 |
| 2193 | 130, 8, 116,//217 0.275904 0.275904 0.321244 |
| 2194 | 116, 32, 131,//218 0.275904 0.312869 0.285473 |
| 2195 | 130, 116, 131,//219 0.321244 0.285473 0.285473 |
| 2196 | 33, 129, 127,//220 0.312869 0.324920 0.312869 |
| 2197 | 129, 35, 131,//221 0.312869 0.312869 0.324920 |
| 2198 | 131, 32, 127,//222 0.312869 0.312869 0.324920 |
| 2199 | 129, 131, 127,//223 0.324920 0.324920 0.324920 |
| 2200 | 4, 132, 82,//224 0.275904 0.321244 0.275904 |
| 2201 | 132, 36, 133,//225 0.275904 0.312869 0.285473 |
| 2202 | 133, 23, 82,//226 0.312869 0.275904 0.285473 |
| 2203 | 132, 133, 82,//227 0.285473 0.285473 0.321244 |
| 2204 | 36, 134, 135,//228 0.275904 0.285473 0.312869 |
| 2205 | 134, 9, 122,//229 0.275904 0.275904 0.321244 |
| 2206 | 122, 34, 135,//230 0.275904 0.312869 0.285473 |
| 2207 | 134, 122, 135,//231 0.321244 0.285473 0.285473 |
| 2208 | 34, 125, 136,//232 0.275904 0.285473 0.312869 |
| 2209 | 125, 5, 78,//233 0.275904 0.275904 0.321244 |
| 2210 | 78, 23, 136,//234 0.275904 0.312869 0.285473 |
| 2211 | 125, 78, 136,//235 0.321244 0.285473 0.285473 |
| 2212 | 36, 135, 133,//236 0.312869 0.324920 0.312869 |
| 2213 | 135, 34, 136,//237 0.312869 0.312869 0.324920 |
| 2214 | 136, 23, 133,//238 0.312869 0.312869 0.324920 |
| 2215 | 135, 136, 133,//239 0.324920 0.324920 0.324920 |
| 2216 | 9, 134, 138,//240 0.275904 0.321244 0.275904 |
| 2217 | 134, 36, 137,//241 0.275904 0.312869 0.285473 |
| 2218 | 137, 38, 138,//242 0.312869 0.275904 0.285473 |
| 2219 | 134, 137, 138,//243 0.285473 0.285473 0.321244 |
| 2220 | 36, 132, 140,//244 0.275904 0.285473 0.312869 |
| 2221 | 132, 4, 139,//245 0.275904 0.275904 0.321244 |
| 2222 | 139, 37, 140,//246 0.275904 0.312869 0.285473 |
| 2223 | 132, 139, 140,//247 0.321244 0.285473 0.285473 |
| 2224 | 37, 141, 143,//248 0.275904 0.285473 0.312869 |
| 2225 | 141, 3, 142,//249 0.275904 0.275904 0.321244 |
| 2226 | 142, 38, 143,//250 0.275904 0.312869 0.285473 |
| 2227 | 141, 142, 143,//251 0.321244 0.285473 0.285473 |
| 2228 | 36, 140, 137,//252 0.312869 0.324920 0.312869 |
| 2229 | 140, 37, 143,//253 0.312869 0.312869 0.324920 |
| 2230 | 143, 38, 137,//254 0.312869 0.312869 0.324920 |
| 2231 | 140, 143, 137,//255 0.324920 0.324920 0.324920 |
| 2232 | 3, 144, 142,//256 0.275904 0.321244 0.275904 |
| 2233 | 144, 39, 145,//257 0.275904 0.312869 0.285473 |
| 2234 | 145, 38, 142,//258 0.312869 0.275904 0.285473 |
| 2235 | 144, 145, 142,//259 0.285473 0.285473 0.321244 |
| 2236 | 39, 146, 147,//260 0.275904 0.285473 0.312869 |
| 2237 | 146, 8, 130,//261 0.275904 0.275904 0.321244 |
| 2238 | 130, 35, 147,//262 0.275904 0.312869 0.285473 |
| 2239 | 146, 130, 147,//263 0.321244 0.285473 0.285473 |
| 2240 | 35, 128, 148,//264 0.275904 0.285473 0.312869 |
| 2241 | 128, 9, 138,//265 0.275904 0.275904 0.321244 |
| 2242 | 138, 38, 148,//266 0.275904 0.312869 0.285473 |
| 2243 | 128, 138, 148,//267 0.321244 0.285473 0.285473 |
| 2244 | 39, 147, 145,//268 0.312869 0.324920 0.312869 |
| 2245 | 147, 35, 148,//269 0.312869 0.312869 0.324920 |
| 2246 | 148, 38, 145,//270 0.312869 0.312869 0.324920 |
| 2247 | 147, 148, 145,//271 0.324920 0.324920 0.324920 |
| 2248 | 8, 146, 111,//272 0.275904 0.321244 0.275904 |
| 2249 | 146, 39, 149,//273 0.275904 0.312869 0.285473 |
| 2250 | 149, 31, 111,//274 0.312869 0.275904 0.285473 |
| 2251 | 146, 149, 111,//275 0.285473 0.285473 0.321244 |
| 2252 | 39, 144, 151,//276 0.275904 0.285473 0.312869 |
| 2253 | 144, 3, 150,//277 0.275904 0.275904 0.321244 |
| 2254 | 150, 40, 151,//278 0.275904 0.312869 0.285473 |
| 2255 | 144, 150, 151,//279 0.321244 0.285473 0.285473 |
| 2256 | 40, 152, 153,//280 0.275904 0.285473 0.312869 |
| 2257 | 152, 6, 113,//281 0.275904 0.275904 0.321244 |
| 2258 | 113, 31, 153,//282 0.275904 0.312869 0.285473 |
| 2259 | 152, 113, 153,//283 0.321244 0.285473 0.285473 |
| 2260 | 39, 151, 149,//284 0.312869 0.324920 0.312869 |
| 2261 | 151, 40, 153,//285 0.312869 0.312869 0.324920 |
| 2262 | 153, 31, 149,//286 0.312869 0.312869 0.324920 |
| 2263 | 151, 153, 149,//287 0.324920 0.324920 0.324920 |
| 2264 | 3, 154, 150,//288 0.275904 0.321244 0.275904 |
| 2265 | 154, 41, 155,//289 0.275904 0.312869 0.285473 |
| 2266 | 155, 40, 150,//290 0.312869 0.275904 0.285473 |
| 2267 | 154, 155, 150,//291 0.285473 0.285473 0.321244 |
| 2268 | 41, 156, 157,//292 0.275904 0.285473 0.312869 |
| 2269 | 156, 2, 101,//293 0.275904 0.275904 0.321244 |
| 2270 | 101, 28, 157,//294 0.275904 0.312869 0.285473 |
| 2271 | 156, 101, 157,//295 0.321244 0.285473 0.285473 |
| 2272 | 28, 99, 158,//296 0.275904 0.285473 0.312869 |
| 2273 | 99, 6, 152,//297 0.275904 0.275904 0.321244 |
| 2274 | 152, 40, 158,//298 0.275904 0.312869 0.285473 |
| 2275 | 99, 152, 158,//299 0.321244 0.285473 0.285473 |
| 2276 | 41, 157, 155,//300 0.312869 0.324920 0.312869 |
| 2277 | 157, 28, 158,//301 0.312869 0.312869 0.324920 |
| 2278 | 158, 40, 155,//302 0.312869 0.312869 0.324920 |
| 2279 | 157, 158, 155,//303 0.324920 0.324920 0.324920 |
| 2280 | 2, 156, 92,//304 0.275904 0.321244 0.275904 |
| 2281 | 156, 41, 159,//305 0.275904 0.312869 0.285473 |
| 2282 | 159, 26, 92,//306 0.312869 0.275904 0.285473 |
| 2283 | 156, 159, 92,//307 0.285473 0.285473 0.321244 |
| 2284 | 41, 154, 160,//308 0.275904 0.285473 0.312869 |
| 2285 | 154, 3, 141,//309 0.275904 0.275904 0.321244 |
| 2286 | 141, 37, 160,//310 0.275904 0.312869 0.285473 |
| 2287 | 154, 141, 160,//311 0.321244 0.285473 0.285473 |
| 2288 | 37, 139, 161,//312 0.275904 0.285473 0.312869 |
| 2289 | 139, 4, 94,//313 0.275904 0.275904 0.321244 |
| 2290 | 94, 26, 161,//314 0.275904 0.312869 0.285473 |
| 2291 | 139, 94, 161,//315 0.321244 0.285473 0.285473 |
| 2292 | 41, 160, 159,//316 0.312869 0.324920 0.312869 |
| 2293 | 160, 37, 161,//317 0.312869 0.312869 0.324920 |
| 2294 | 161, 26, 159,//318 0.312869 0.312869 0.324920 |
| 2295 | 160, 161, 159 //319 0.324920 0.324920 0.324920 |
| 2296 | }; |
| 2297 | static const GLuint idx3[3840] = { |
| 2298 | 1, 162, 164,// 0 0.138283 0.162173 0.138283 |
| 2299 | 162, 42, 163,// 1 0.138283 0.161146 0.139482 |
| 2300 | 163, 44, 164,// 2 0.161146 0.138283 0.139482 |
| 2301 | 162, 163, 164,// 3 0.139482 0.139482 0.162173 |
| 2302 | 42, 165, 167,// 4 0.138283 0.157997 0.143103 |
| 2303 | 165, 12, 166,// 5 0.138283 0.156918 0.144288 |
| 2304 | 166, 43, 167,// 6 0.156918 0.143103 0.139510 |
| 2305 | 165, 166, 167,// 7 0.144288 0.139510 0.157997 |
| 2306 | 43, 168, 170,// 8 0.156918 0.139510 0.143103 |
| 2307 | 168, 14, 169,// 9 0.156918 0.138283 0.144288 |
| 2308 | 169, 44, 170,// 10 0.138283 0.143103 0.157997 |
| 2309 | 168, 169, 170,// 11 0.144288 0.157997 0.139510 |
| 2310 | 42, 167, 163,// 12 0.143103 0.144387 0.161146 |
| 2311 | 167, 43, 170,// 13 0.143103 0.143103 0.162284 |
| 2312 | 170, 44, 163,// 14 0.143103 0.161146 0.144387 |
| 2313 | 167, 170, 163,// 15 0.162284 0.144387 0.144387 |
| 2314 | 12, 171, 173,// 16 0.138283 0.144288 0.156918 |
| 2315 | 171, 45, 172,// 17 0.138283 0.143103 0.157997 |
| 2316 | 172, 47, 173,// 18 0.143103 0.156918 0.139510 |
| 2317 | 171, 172, 173,// 19 0.157997 0.139510 0.144288 |
| 2318 | 45, 174, 176,// 20 0.138283 0.139482 0.161146 |
| 2319 | 174, 0, 175,// 21 0.138283 0.138283 0.162173 |
| 2320 | 175, 46, 176,// 22 0.138283 0.161146 0.139482 |
| 2321 | 174, 175, 176,// 23 0.162173 0.139482 0.139482 |
| 2322 | 46, 177, 179,// 24 0.138283 0.157997 0.143103 |
| 2323 | 177, 13, 178,// 25 0.138283 0.156918 0.144288 |
| 2324 | 178, 47, 179,// 26 0.156918 0.143103 0.139510 |
| 2325 | 177, 178, 179,// 27 0.144288 0.139510 0.157997 |
| 2326 | 45, 176, 172,// 28 0.161146 0.144387 0.143103 |
| 2327 | 176, 46, 179,// 29 0.161146 0.143103 0.144387 |
| 2328 | 179, 47, 172,// 30 0.143103 0.143103 0.162284 |
| 2329 | 176, 179, 172,// 31 0.144387 0.162284 0.144387 |
| 2330 | 13, 180, 182,// 32 0.138283 0.144288 0.156918 |
| 2331 | 180, 48, 181,// 33 0.138283 0.143103 0.157997 |
| 2332 | 181, 50, 182,// 34 0.143103 0.156918 0.139510 |
| 2333 | 180, 181, 182,// 35 0.157997 0.139510 0.144288 |
| 2334 | 48, 183, 185,// 36 0.138283 0.139482 0.161146 |
| 2335 | 183, 5, 184,// 37 0.138283 0.138283 0.162173 |
| 2336 | 184, 49, 185,// 38 0.138283 0.161146 0.139482 |
| 2337 | 183, 184, 185,// 39 0.162173 0.139482 0.139482 |
| 2338 | 49, 186, 188,// 40 0.138283 0.157997 0.143103 |
| 2339 | 186, 14, 187,// 41 0.138283 0.156918 0.144288 |
| 2340 | 187, 50, 188,// 42 0.156918 0.143103 0.139510 |
| 2341 | 186, 187, 188,// 43 0.144288 0.139510 0.157997 |
| 2342 | 48, 185, 181,// 44 0.161146 0.144387 0.143103 |
| 2343 | 185, 49, 188,// 45 0.161146 0.143103 0.144387 |
| 2344 | 188, 50, 181,// 46 0.143103 0.143103 0.162284 |
| 2345 | 185, 188, 181,// 47 0.144387 0.162284 0.144387 |
| 2346 | 12, 173, 166,// 48 0.156918 0.164485 0.156918 |
| 2347 | 173, 47, 189,// 49 0.156918 0.163002 0.158459 |
| 2348 | 189, 43, 166,// 50 0.163002 0.156918 0.158459 |
| 2349 | 173, 189, 166,// 51 0.158459 0.158459 0.164485 |
| 2350 | 47, 178, 190,// 52 0.156918 0.158459 0.163002 |
| 2351 | 178, 13, 182,// 53 0.156918 0.156918 0.164485 |
| 2352 | 182, 50, 190,// 54 0.156918 0.163002 0.158459 |
| 2353 | 178, 182, 190,// 55 0.164485 0.158459 0.158459 |
| 2354 | 50, 187, 191,// 56 0.156918 0.158459 0.163002 |
| 2355 | 187, 14, 168,// 57 0.156918 0.156918 0.164485 |
| 2356 | 168, 43, 191,// 58 0.156918 0.163002 0.158459 |
| 2357 | 187, 168, 191,// 59 0.164485 0.158459 0.158459 |
| 2358 | 47, 190, 189,// 60 0.163002 0.164647 0.163002 |
| 2359 | 190, 50, 191,// 61 0.163002 0.163002 0.164647 |
| 2360 | 191, 43, 189,// 62 0.163002 0.163002 0.164647 |
| 2361 | 190, 191, 189,// 63 0.164647 0.164647 0.164647 |
| 2362 | 0, 174, 193,// 64 0.138283 0.162173 0.138283 |
| 2363 | 174, 45, 192,// 65 0.138283 0.161146 0.139482 |
| 2364 | 192, 52, 193,// 66 0.161146 0.138283 0.139482 |
| 2365 | 174, 192, 193,// 67 0.139482 0.139482 0.162173 |
| 2366 | 45, 171, 195,// 68 0.138283 0.157997 0.143103 |
| 2367 | 171, 12, 194,// 69 0.138283 0.156918 0.144288 |
| 2368 | 194, 51, 195,// 70 0.156918 0.143103 0.139510 |
| 2369 | 171, 194, 195,// 71 0.144288 0.139510 0.157997 |
| 2370 | 51, 196, 198,// 72 0.156918 0.139510 0.143103 |
| 2371 | 196, 16, 197,// 73 0.156918 0.138283 0.144288 |
| 2372 | 197, 52, 198,// 74 0.138283 0.143103 0.157997 |
| 2373 | 196, 197, 198,// 75 0.144288 0.157997 0.139510 |
| 2374 | 45, 195, 192,// 76 0.143103 0.144387 0.161146 |
| 2375 | 195, 51, 198,// 77 0.143103 0.143103 0.162284 |
| 2376 | 198, 52, 192,// 78 0.143103 0.161146 0.144387 |
| 2377 | 195, 198, 192,// 79 0.162284 0.144387 0.144387 |
| 2378 | 12, 165, 200,// 80 0.138283 0.144288 0.156918 |
| 2379 | 165, 42, 199,// 81 0.138283 0.143103 0.157997 |
| 2380 | 199, 54, 200,// 82 0.143103 0.156918 0.139510 |
| 2381 | 165, 199, 200,// 83 0.157997 0.139510 0.144288 |
| 2382 | 42, 162, 202,// 84 0.138283 0.139482 0.161146 |
| 2383 | 162, 1, 201,// 85 0.138283 0.138283 0.162173 |
| 2384 | 201, 53, 202,// 86 0.138283 0.161146 0.139482 |
| 2385 | 162, 201, 202,// 87 0.162173 0.139482 0.139482 |
| 2386 | 53, 203, 205,// 88 0.138283 0.157997 0.143103 |
| 2387 | 203, 15, 204,// 89 0.138283 0.156918 0.144288 |
| 2388 | 204, 54, 205,// 90 0.156918 0.143103 0.139510 |
| 2389 | 203, 204, 205,// 91 0.144288 0.139510 0.157997 |
| 2390 | 42, 202, 199,// 92 0.161146 0.144387 0.143103 |
| 2391 | 202, 53, 205,// 93 0.161146 0.143103 0.144387 |
| 2392 | 205, 54, 199,// 94 0.143103 0.143103 0.162284 |
| 2393 | 202, 205, 199,// 95 0.144387 0.162284 0.144387 |
| 2394 | 15, 206, 208,// 96 0.138283 0.144288 0.156918 |
| 2395 | 206, 55, 207,// 97 0.138283 0.143103 0.157997 |
| 2396 | 207, 57, 208,// 98 0.143103 0.156918 0.139510 |
| 2397 | 206, 207, 208,// 99 0.157997 0.139510 0.144288 |
| 2398 | 55, 209, 211,//100 0.138283 0.139482 0.161146 |
| 2399 | 209, 7, 210,//101 0.138283 0.138283 0.162173 |
| 2400 | 210, 56, 211,//102 0.138283 0.161146 0.139482 |
| 2401 | 209, 210, 211,//103 0.162173 0.139482 0.139482 |
| 2402 | 56, 212, 214,//104 0.138283 0.157997 0.143103 |
| 2403 | 212, 16, 213,//105 0.138283 0.156918 0.144288 |
| 2404 | 213, 57, 214,//106 0.156918 0.143103 0.139510 |
| 2405 | 212, 213, 214,//107 0.144288 0.139510 0.157997 |
| 2406 | 55, 211, 207,//108 0.161146 0.144387 0.143103 |
| 2407 | 211, 56, 214,//109 0.161146 0.143103 0.144387 |
| 2408 | 214, 57, 207,//110 0.143103 0.143103 0.162284 |
| 2409 | 211, 214, 207,//111 0.144387 0.162284 0.144387 |
| 2410 | 12, 200, 194,//112 0.156918 0.164485 0.156918 |
| 2411 | 200, 54, 215,//113 0.156918 0.163002 0.158459 |
| 2412 | 215, 51, 194,//114 0.163002 0.156918 0.158459 |
| 2413 | 200, 215, 194,//115 0.158459 0.158459 0.164485 |
| 2414 | 54, 204, 216,//116 0.156918 0.158459 0.163002 |
| 2415 | 204, 15, 208,//117 0.156918 0.156918 0.164485 |
| 2416 | 208, 57, 216,//118 0.156918 0.163002 0.158459 |
| 2417 | 204, 208, 216,//119 0.164485 0.158459 0.158459 |
| 2418 | 57, 213, 217,//120 0.156918 0.158459 0.163002 |
| 2419 | 213, 16, 196,//121 0.156918 0.156918 0.164485 |
| 2420 | 196, 51, 217,//122 0.156918 0.163002 0.158459 |
| 2421 | 213, 196, 217,//123 0.164485 0.158459 0.158459 |
| 2422 | 54, 216, 215,//124 0.163002 0.164647 0.163002 |
| 2423 | 216, 57, 217,//125 0.163002 0.163002 0.164647 |
| 2424 | 217, 51, 215,//126 0.163002 0.163002 0.164647 |
| 2425 | 216, 217, 215,//127 0.164647 0.164647 0.164647 |
| 2426 | 10, 218, 220,//128 0.138283 0.162173 0.138283 |
| 2427 | 218, 58, 219,//129 0.138283 0.161146 0.139482 |
| 2428 | 219, 60, 220,//130 0.161146 0.138283 0.139482 |
| 2429 | 218, 219, 220,//131 0.139482 0.139482 0.162173 |
| 2430 | 58, 221, 223,//132 0.138283 0.157997 0.143103 |
| 2431 | 221, 17, 222,//133 0.138283 0.156918 0.144288 |
| 2432 | 222, 59, 223,//134 0.156918 0.143103 0.139510 |
| 2433 | 221, 222, 223,//135 0.144288 0.139510 0.157997 |
| 2434 | 59, 224, 226,//136 0.156918 0.139510 0.143103 |
| 2435 | 224, 18, 225,//137 0.156918 0.138283 0.144288 |
| 2436 | 225, 60, 226,//138 0.138283 0.143103 0.157997 |
| 2437 | 224, 225, 226,//139 0.144288 0.157997 0.139510 |
| 2438 | 58, 223, 219,//140 0.143103 0.144387 0.161146 |
| 2439 | 223, 59, 226,//141 0.143103 0.143103 0.162284 |
| 2440 | 226, 60, 219,//142 0.143103 0.161146 0.144387 |
| 2441 | 223, 226, 219,//143 0.162284 0.144387 0.144387 |
| 2442 | 17, 227, 229,//144 0.138283 0.144288 0.156918 |
| 2443 | 227, 61, 228,//145 0.138283 0.143103 0.157997 |
| 2444 | 228, 62, 229,//146 0.143103 0.156918 0.139510 |
| 2445 | 227, 228, 229,//147 0.157997 0.139510 0.144288 |
| 2446 | 61, 230, 231,//148 0.138283 0.139482 0.161146 |
| 2447 | 230, 0, 193,//149 0.138283 0.138283 0.162173 |
| 2448 | 193, 52, 231,//150 0.138283 0.161146 0.139482 |
| 2449 | 230, 193, 231,//151 0.162173 0.139482 0.139482 |
| 2450 | 52, 197, 233,//152 0.138283 0.157997 0.143103 |
| 2451 | 197, 16, 232,//153 0.138283 0.156918 0.144288 |
| 2452 | 232, 62, 233,//154 0.156918 0.143103 0.139510 |
| 2453 | 197, 232, 233,//155 0.144288 0.139510 0.157997 |
| 2454 | 61, 231, 228,//156 0.161146 0.144387 0.143103 |
| 2455 | 231, 52, 233,//157 0.161146 0.143103 0.144387 |
| 2456 | 233, 62, 228,//158 0.143103 0.143103 0.162284 |
| 2457 | 231, 233, 228,//159 0.144387 0.162284 0.144387 |
| 2458 | 16, 212, 235,//160 0.138283 0.144288 0.156918 |
| 2459 | 212, 56, 234,//161 0.138283 0.143103 0.157997 |
| 2460 | 234, 64, 235,//162 0.143103 0.156918 0.139510 |
| 2461 | 212, 234, 235,//163 0.157997 0.139510 0.144288 |
| 2462 | 56, 210, 237,//164 0.138283 0.139482 0.161146 |
| 2463 | 210, 7, 236,//165 0.138283 0.138283 0.162173 |
| 2464 | 236, 63, 237,//166 0.138283 0.161146 0.139482 |
| 2465 | 210, 236, 237,//167 0.162173 0.139482 0.139482 |
| 2466 | 63, 238, 240,//168 0.138283 0.157997 0.143103 |
| 2467 | 238, 18, 239,//169 0.138283 0.156918 0.144288 |
| 2468 | 239, 64, 240,//170 0.156918 0.143103 0.139510 |
| 2469 | 238, 239, 240,//171 0.144288 0.139510 0.157997 |
| 2470 | 56, 237, 234,//172 0.161146 0.144387 0.143103 |
| 2471 | 237, 63, 240,//173 0.161146 0.143103 0.144387 |
| 2472 | 240, 64, 234,//174 0.143103 0.143103 0.162284 |
| 2473 | 237, 240, 234,//175 0.144387 0.162284 0.144387 |
| 2474 | 17, 229, 222,//176 0.156918 0.164485 0.156918 |
| 2475 | 229, 62, 241,//177 0.156918 0.163002 0.158459 |
| 2476 | 241, 59, 222,//178 0.163002 0.156918 0.158459 |
| 2477 | 229, 241, 222,//179 0.158459 0.158459 0.164485 |
| 2478 | 62, 232, 242,//180 0.156918 0.158459 0.163002 |
| 2479 | 232, 16, 235,//181 0.156918 0.156918 0.164485 |
| 2480 | 235, 64, 242,//182 0.156918 0.163002 0.158459 |
| 2481 | 232, 235, 242,//183 0.164485 0.158459 0.158459 |
| 2482 | 64, 239, 243,//184 0.156918 0.158459 0.163002 |
| 2483 | 239, 18, 224,//185 0.156918 0.156918 0.164485 |
| 2484 | 224, 59, 243,//186 0.156918 0.163002 0.158459 |
| 2485 | 239, 224, 243,//187 0.164485 0.158459 0.158459 |
| 2486 | 62, 242, 241,//188 0.163002 0.164647 0.163002 |
| 2487 | 242, 64, 243,//189 0.163002 0.163002 0.164647 |
| 2488 | 243, 59, 241,//190 0.163002 0.163002 0.164647 |
| 2489 | 242, 243, 241,//191 0.164647 0.164647 0.164647 |
| 2490 | 0, 230, 245,//192 0.138283 0.162173 0.138283 |
| 2491 | 230, 61, 244,//193 0.138283 0.161146 0.139482 |
| 2492 | 244, 66, 245,//194 0.161146 0.138283 0.139482 |
| 2493 | 230, 244, 245,//195 0.139482 0.139482 0.162173 |
| 2494 | 61, 227, 247,//196 0.138283 0.157997 0.143103 |
| 2495 | 227, 17, 246,//197 0.138283 0.156918 0.144288 |
| 2496 | 246, 65, 247,//198 0.156918 0.143103 0.139510 |
| 2497 | 227, 246, 247,//199 0.144288 0.139510 0.157997 |
| 2498 | 65, 248, 250,//200 0.156918 0.139510 0.143103 |
| 2499 | 248, 20, 249,//201 0.156918 0.138283 0.144288 |
| 2500 | 249, 66, 250,//202 0.138283 0.143103 0.157997 |
| 2501 | 248, 249, 250,//203 0.144288 0.157997 0.139510 |
| 2502 | 61, 247, 244,//204 0.143103 0.144387 0.161146 |
| 2503 | 247, 65, 250,//205 0.143103 0.143103 0.162284 |
| 2504 | 250, 66, 244,//206 0.143103 0.161146 0.144387 |
| 2505 | 247, 250, 244,//207 0.162284 0.144387 0.144387 |
| 2506 | 17, 221, 252,//208 0.138283 0.144288 0.156918 |
| 2507 | 221, 58, 251,//209 0.138283 0.143103 0.157997 |
| 2508 | 251, 68, 252,//210 0.143103 0.156918 0.139510 |
| 2509 | 221, 251, 252,//211 0.157997 0.139510 0.144288 |
| 2510 | 58, 218, 254,//212 0.138283 0.139482 0.161146 |
| 2511 | 218, 10, 253,//213 0.138283 0.138283 0.162173 |
| 2512 | 253, 67, 254,//214 0.138283 0.161146 0.139482 |
| 2513 | 218, 253, 254,//215 0.162173 0.139482 0.139482 |
| 2514 | 67, 255, 257,//216 0.138283 0.157997 0.143103 |
| 2515 | 255, 19, 256,//217 0.138283 0.156918 0.144288 |
| 2516 | 256, 68, 257,//218 0.156918 0.143103 0.139510 |
| 2517 | 255, 256, 257,//219 0.144288 0.139510 0.157997 |
| 2518 | 58, 254, 251,//220 0.161146 0.144387 0.143103 |
| 2519 | 254, 67, 257,//221 0.161146 0.143103 0.144387 |
| 2520 | 257, 68, 251,//222 0.143103 0.143103 0.162284 |
| 2521 | 254, 257, 251,//223 0.144387 0.162284 0.144387 |
| 2522 | 19, 258, 260,//224 0.138283 0.144288 0.156918 |
| 2523 | 258, 69, 259,//225 0.138283 0.143103 0.157997 |
| 2524 | 259, 71, 260,//226 0.143103 0.156918 0.139510 |
| 2525 | 258, 259, 260,//227 0.157997 0.139510 0.144288 |
| 2526 | 69, 261, 263,//228 0.138283 0.139482 0.161146 |
| 2527 | 261, 11, 262,//229 0.138283 0.138283 0.162173 |
| 2528 | 262, 70, 263,//230 0.138283 0.161146 0.139482 |
| 2529 | 261, 262, 263,//231 0.162173 0.139482 0.139482 |
| 2530 | 70, 264, 266,//232 0.138283 0.157997 0.143103 |
| 2531 | 264, 20, 265,//233 0.138283 0.156918 0.144288 |
| 2532 | 265, 71, 266,//234 0.156918 0.143103 0.139510 |
| 2533 | 264, 265, 266,//235 0.144288 0.139510 0.157997 |
| 2534 | 69, 263, 259,//236 0.161146 0.144387 0.143103 |
| 2535 | 263, 70, 266,//237 0.161146 0.143103 0.144387 |
| 2536 | 266, 71, 259,//238 0.143103 0.143103 0.162284 |
| 2537 | 263, 266, 259,//239 0.144387 0.162284 0.144387 |
| 2538 | 17, 252, 246,//240 0.156918 0.164485 0.156918 |
| 2539 | 252, 68, 267,//241 0.156918 0.163002 0.158459 |
| 2540 | 267, 65, 246,//242 0.163002 0.156918 0.158459 |
| 2541 | 252, 267, 246,//243 0.158459 0.158459 0.164485 |
| 2542 | 68, 256, 268,//244 0.156918 0.158459 0.163002 |
| 2543 | 256, 19, 260,//245 0.156918 0.156918 0.164485 |
| 2544 | 260, 71, 268,//246 0.156918 0.163002 0.158459 |
| 2545 | 256, 260, 268,//247 0.164485 0.158459 0.158459 |
| 2546 | 71, 265, 269,//248 0.156918 0.158459 0.163002 |
| 2547 | 265, 20, 248,//249 0.156918 0.156918 0.164485 |
| 2548 | 248, 65, 269,//250 0.156918 0.163002 0.158459 |
| 2549 | 265, 248, 269,//251 0.164485 0.158459 0.158459 |
| 2550 | 68, 268, 267,//252 0.163002 0.164647 0.163002 |
| 2551 | 268, 71, 269,//253 0.163002 0.163002 0.164647 |
| 2552 | 269, 65, 267,//254 0.163002 0.163002 0.164647 |
| 2553 | 268, 269, 267,//255 0.164647 0.164647 0.164647 |
| 2554 | 11, 270, 262,//256 0.138283 0.162173 0.138283 |
| 2555 | 270, 72, 271,//257 0.138283 0.161146 0.139482 |
| 2556 | 271, 70, 262,//258 0.161146 0.138283 0.139482 |
| 2557 | 270, 271, 262,//259 0.139482 0.139482 0.162173 |
| 2558 | 72, 272, 274,//260 0.138283 0.157997 0.143103 |
| 2559 | 272, 21, 273,//261 0.138283 0.156918 0.144288 |
| 2560 | 273, 73, 274,//262 0.156918 0.143103 0.139510 |
| 2561 | 272, 273, 274,//263 0.144288 0.139510 0.157997 |
| 2562 | 73, 275, 276,//264 0.156918 0.139510 0.143103 |
| 2563 | 275, 20, 264,//265 0.156918 0.138283 0.144288 |
| 2564 | 264, 70, 276,//266 0.138283 0.143103 0.157997 |
| 2565 | 275, 264, 276,//267 0.144288 0.157997 0.139510 |
| 2566 | 72, 274, 271,//268 0.143103 0.144387 0.161146 |
| 2567 | 274, 73, 276,//269 0.143103 0.143103 0.162284 |
| 2568 | 276, 70, 271,//270 0.143103 0.161146 0.144387 |
| 2569 | 274, 276, 271,//271 0.162284 0.144387 0.144387 |
| 2570 | 21, 277, 279,//272 0.138283 0.144288 0.156918 |
| 2571 | 277, 74, 278,//273 0.138283 0.143103 0.157997 |
| 2572 | 278, 75, 279,//274 0.143103 0.156918 0.139510 |
| 2573 | 277, 278, 279,//275 0.157997 0.139510 0.144288 |
| 2574 | 74, 280, 281,//276 0.138283 0.139482 0.161146 |
| 2575 | 280, 5, 183,//277 0.138283 0.138283 0.162173 |
| 2576 | 183, 48, 281,//278 0.138283 0.161146 0.139482 |
| 2577 | 280, 183, 281,//279 0.162173 0.139482 0.139482 |
| 2578 | 48, 180, 283,//280 0.138283 0.157997 0.143103 |
| 2579 | 180, 13, 282,//281 0.138283 0.156918 0.144288 |
| 2580 | 282, 75, 283,//282 0.156918 0.143103 0.139510 |
| 2581 | 180, 282, 283,//283 0.144288 0.139510 0.157997 |
| 2582 | 74, 281, 278,//284 0.161146 0.144387 0.143103 |
| 2583 | 281, 48, 283,//285 0.161146 0.143103 0.144387 |
| 2584 | 283, 75, 278,//286 0.143103 0.143103 0.162284 |
| 2585 | 281, 283, 278,//287 0.144387 0.162284 0.144387 |
| 2586 | 13, 177, 285,//288 0.138283 0.144288 0.156918 |
| 2587 | 177, 46, 284,//289 0.138283 0.143103 0.157997 |
| 2588 | 284, 76, 285,//290 0.143103 0.156918 0.139510 |
| 2589 | 177, 284, 285,//291 0.157997 0.139510 0.144288 |
| 2590 | 46, 175, 286,//292 0.138283 0.139482 0.161146 |
| 2591 | 175, 0, 245,//293 0.138283 0.138283 0.162173 |
| 2592 | 245, 66, 286,//294 0.138283 0.161146 0.139482 |
| 2593 | 175, 245, 286,//295 0.162173 0.139482 0.139482 |
| 2594 | 66, 249, 288,//296 0.138283 0.157997 0.143103 |
| 2595 | 249, 20, 287,//297 0.138283 0.156918 0.144288 |
| 2596 | 287, 76, 288,//298 0.156918 0.143103 0.139510 |
| 2597 | 249, 287, 288,//299 0.144288 0.139510 0.157997 |
| 2598 | 46, 286, 284,//300 0.161146 0.144387 0.143103 |
| 2599 | 286, 66, 288,//301 0.161146 0.143103 0.144387 |
| 2600 | 288, 76, 284,//302 0.143103 0.143103 0.162284 |
| 2601 | 286, 288, 284,//303 0.144387 0.162284 0.144387 |
| 2602 | 21, 279, 273,//304 0.156918 0.164485 0.156918 |
| 2603 | 279, 75, 289,//305 0.156918 0.163002 0.158459 |
| 2604 | 289, 73, 273,//306 0.163002 0.156918 0.158459 |
| 2605 | 279, 289, 273,//307 0.158459 0.158459 0.164485 |
| 2606 | 75, 282, 290,//308 0.156918 0.158459 0.163002 |
| 2607 | 282, 13, 285,//309 0.156918 0.156918 0.164485 |
| 2608 | 285, 76, 290,//310 0.156918 0.163002 0.158459 |
| 2609 | 282, 285, 290,//311 0.164485 0.158459 0.158459 |
| 2610 | 76, 287, 291,//312 0.156918 0.158459 0.163002 |
| 2611 | 287, 20, 275,//313 0.156918 0.156918 0.164485 |
| 2612 | 275, 73, 291,//314 0.156918 0.163002 0.158459 |
| 2613 | 287, 275, 291,//315 0.164485 0.158459 0.158459 |
| 2614 | 75, 290, 289,//316 0.163002 0.164647 0.163002 |
| 2615 | 290, 76, 291,//317 0.163002 0.163002 0.164647 |
| 2616 | 291, 73, 289,//318 0.163002 0.163002 0.164647 |
| 2617 | 290, 291, 289,//319 0.164647 0.164647 0.164647 |
| 2618 | 5, 280, 293,//320 0.138283 0.162173 0.138283 |
| 2619 | 280, 74, 292,//321 0.138283 0.161146 0.139482 |
| 2620 | 292, 78, 293,//322 0.161146 0.138283 0.139482 |
| 2621 | 280, 292, 293,//323 0.139482 0.139482 0.162173 |
| 2622 | 74, 277, 295,//324 0.138283 0.157997 0.143103 |
| 2623 | 277, 21, 294,//325 0.138283 0.156918 0.144288 |
| 2624 | 294, 77, 295,//326 0.156918 0.143103 0.139510 |
| 2625 | 277, 294, 295,//327 0.144288 0.139510 0.157997 |
| 2626 | 77, 296, 298,//328 0.156918 0.139510 0.143103 |
| 2627 | 296, 23, 297,//329 0.156918 0.138283 0.144288 |
| 2628 | 297, 78, 298,//330 0.138283 0.143103 0.157997 |
| 2629 | 296, 297, 298,//331 0.144288 0.157997 0.139510 |
| 2630 | 74, 295, 292,//332 0.143103 0.144387 0.161146 |
| 2631 | 295, 77, 298,//333 0.143103 0.143103 0.162284 |
| 2632 | 298, 78, 292,//334 0.143103 0.161146 0.144387 |
| 2633 | 295, 298, 292,//335 0.162284 0.144387 0.144387 |
| 2634 | 21, 272, 300,//336 0.138283 0.144288 0.156918 |
| 2635 | 272, 72, 299,//337 0.138283 0.143103 0.157997 |
| 2636 | 299, 80, 300,//338 0.143103 0.156918 0.139510 |
| 2637 | 272, 299, 300,//339 0.157997 0.139510 0.144288 |
| 2638 | 72, 270, 302,//340 0.138283 0.139482 0.161146 |
| 2639 | 270, 11, 301,//341 0.138283 0.138283 0.162173 |
| 2640 | 301, 79, 302,//342 0.138283 0.161146 0.139482 |
| 2641 | 270, 301, 302,//343 0.162173 0.139482 0.139482 |
| 2642 | 79, 303, 305,//344 0.138283 0.157997 0.143103 |
| 2643 | 303, 22, 304,//345 0.138283 0.156918 0.144288 |
| 2644 | 304, 80, 305,//346 0.156918 0.143103 0.139510 |
| 2645 | 303, 304, 305,//347 0.144288 0.139510 0.157997 |
| 2646 | 72, 302, 299,//348 0.161146 0.144387 0.143103 |
| 2647 | 302, 79, 305,//349 0.161146 0.143103 0.144387 |
| 2648 | 305, 80, 299,//350 0.143103 0.143103 0.162284 |
| 2649 | 302, 305, 299,//351 0.144387 0.162284 0.144387 |
| 2650 | 22, 306, 308,//352 0.138283 0.144288 0.156918 |
| 2651 | 306, 81, 307,//353 0.138283 0.143103 0.157997 |
| 2652 | 307, 83, 308,//354 0.143103 0.156918 0.139510 |
| 2653 | 306, 307, 308,//355 0.157997 0.139510 0.144288 |
| 2654 | 81, 309, 311,//356 0.138283 0.139482 0.161146 |
| 2655 | 309, 4, 310,//357 0.138283 0.138283 0.162173 |
| 2656 | 310, 82, 311,//358 0.138283 0.161146 0.139482 |
| 2657 | 309, 310, 311,//359 0.162173 0.139482 0.139482 |
| 2658 | 82, 312, 314,//360 0.138283 0.157997 0.143103 |
| 2659 | 312, 23, 313,//361 0.138283 0.156918 0.144288 |
| 2660 | 313, 83, 314,//362 0.156918 0.143103 0.139510 |
| 2661 | 312, 313, 314,//363 0.144288 0.139510 0.157997 |
| 2662 | 81, 311, 307,//364 0.161146 0.144387 0.143103 |
| 2663 | 311, 82, 314,//365 0.161146 0.143103 0.144387 |
| 2664 | 314, 83, 307,//366 0.143103 0.143103 0.162284 |
| 2665 | 311, 314, 307,//367 0.144387 0.162284 0.144387 |
| 2666 | 21, 300, 294,//368 0.156918 0.164485 0.156918 |
| 2667 | 300, 80, 315,//369 0.156918 0.163002 0.158459 |
| 2668 | 315, 77, 294,//370 0.163002 0.156918 0.158459 |
| 2669 | 300, 315, 294,//371 0.158459 0.158459 0.164485 |
| 2670 | 80, 304, 316,//372 0.156918 0.158459 0.163002 |
| 2671 | 304, 22, 308,//373 0.156918 0.156918 0.164485 |
| 2672 | 308, 83, 316,//374 0.156918 0.163002 0.158459 |
| 2673 | 304, 308, 316,//375 0.164485 0.158459 0.158459 |
| 2674 | 83, 313, 317,//376 0.156918 0.158459 0.163002 |
| 2675 | 313, 23, 296,//377 0.156918 0.156918 0.164485 |
| 2676 | 296, 77, 317,//378 0.156918 0.163002 0.158459 |
| 2677 | 313, 296, 317,//379 0.164485 0.158459 0.158459 |
| 2678 | 80, 316, 315,//380 0.163002 0.164647 0.163002 |
| 2679 | 316, 83, 317,//381 0.163002 0.163002 0.164647 |
| 2680 | 317, 77, 315,//382 0.163002 0.163002 0.164647 |
| 2681 | 316, 317, 315,//383 0.164647 0.164647 0.164647 |
| 2682 | 2, 318, 320,//384 0.138283 0.162173 0.138283 |
| 2683 | 318, 84, 319,//385 0.138283 0.161146 0.139482 |
| 2684 | 319, 86, 320,//386 0.161146 0.138283 0.139482 |
| 2685 | 318, 319, 320,//387 0.139482 0.139482 0.162173 |
| 2686 | 84, 321, 323,//388 0.138283 0.157997 0.143103 |
| 2687 | 321, 24, 322,//389 0.138283 0.156918 0.144288 |
| 2688 | 322, 85, 323,//390 0.156918 0.143103 0.139510 |
| 2689 | 321, 322, 323,//391 0.144288 0.139510 0.157997 |
| 2690 | 85, 324, 326,//392 0.156918 0.139510 0.143103 |
| 2691 | 324, 25, 325,//393 0.156918 0.138283 0.144288 |
| 2692 | 325, 86, 326,//394 0.138283 0.143103 0.157997 |
| 2693 | 324, 325, 326,//395 0.144288 0.157997 0.139510 |
| 2694 | 84, 323, 319,//396 0.143103 0.144387 0.161146 |
| 2695 | 323, 85, 326,//397 0.143103 0.143103 0.162284 |
| 2696 | 326, 86, 319,//398 0.143103 0.161146 0.144387 |
| 2697 | 323, 326, 319,//399 0.162284 0.144387 0.144387 |
| 2698 | 24, 327, 329,//400 0.138283 0.144288 0.156918 |
| 2699 | 327, 87, 328,//401 0.138283 0.143103 0.157997 |
| 2700 | 328, 88, 329,//402 0.143103 0.156918 0.139510 |
| 2701 | 327, 328, 329,//403 0.157997 0.139510 0.144288 |
| 2702 | 87, 330, 331,//404 0.138283 0.139482 0.161146 |
| 2703 | 330, 11, 261,//405 0.138283 0.138283 0.162173 |
| 2704 | 261, 69, 331,//406 0.138283 0.161146 0.139482 |
| 2705 | 330, 261, 331,//407 0.162173 0.139482 0.139482 |
| 2706 | 69, 258, 333,//408 0.138283 0.157997 0.143103 |
| 2707 | 258, 19, 332,//409 0.138283 0.156918 0.144288 |
| 2708 | 332, 88, 333,//410 0.156918 0.143103 0.139510 |
| 2709 | 258, 332, 333,//411 0.144288 0.139510 0.157997 |
| 2710 | 87, 331, 328,//412 0.161146 0.144387 0.143103 |
| 2711 | 331, 69, 333,//413 0.161146 0.143103 0.144387 |
| 2712 | 333, 88, 328,//414 0.143103 0.143103 0.162284 |
| 2713 | 331, 333, 328,//415 0.144387 0.162284 0.144387 |
| 2714 | 19, 255, 335,//416 0.138283 0.144288 0.156918 |
| 2715 | 255, 67, 334,//417 0.138283 0.143103 0.157997 |
| 2716 | 334, 90, 335,//418 0.143103 0.156918 0.139510 |
| 2717 | 255, 334, 335,//419 0.157997 0.139510 0.144288 |
| 2718 | 67, 253, 337,//420 0.138283 0.139482 0.161146 |
| 2719 | 253, 10, 336,//421 0.138283 0.138283 0.162173 |
| 2720 | 336, 89, 337,//422 0.138283 0.161146 0.139482 |
| 2721 | 253, 336, 337,//423 0.162173 0.139482 0.139482 |
| 2722 | 89, 338, 340,//424 0.138283 0.157997 0.143103 |
| 2723 | 338, 25, 339,//425 0.138283 0.156918 0.144288 |
| 2724 | 339, 90, 340,//426 0.156918 0.143103 0.139510 |
| 2725 | 338, 339, 340,//427 0.144288 0.139510 0.157997 |
| 2726 | 67, 337, 334,//428 0.161146 0.144387 0.143103 |
| 2727 | 337, 89, 340,//429 0.161146 0.143103 0.144387 |
| 2728 | 340, 90, 334,//430 0.143103 0.143103 0.162284 |
| 2729 | 337, 340, 334,//431 0.144387 0.162284 0.144387 |
| 2730 | 24, 329, 322,//432 0.156918 0.164485 0.156918 |
| 2731 | 329, 88, 341,//433 0.156918 0.163002 0.158459 |
| 2732 | 341, 85, 322,//434 0.163002 0.156918 0.158459 |
| 2733 | 329, 341, 322,//435 0.158459 0.158459 0.164485 |
| 2734 | 88, 332, 342,//436 0.156918 0.158459 0.163002 |
| 2735 | 332, 19, 335,//437 0.156918 0.156918 0.164485 |
| 2736 | 335, 90, 342,//438 0.156918 0.163002 0.158459 |
| 2737 | 332, 335, 342,//439 0.164485 0.158459 0.158459 |
| 2738 | 90, 339, 343,//440 0.156918 0.158459 0.163002 |
| 2739 | 339, 25, 324,//441 0.156918 0.156918 0.164485 |
| 2740 | 324, 85, 343,//442 0.156918 0.163002 0.158459 |
| 2741 | 339, 324, 343,//443 0.164485 0.158459 0.158459 |
| 2742 | 88, 342, 341,//444 0.163002 0.164647 0.163002 |
| 2743 | 342, 90, 343,//445 0.163002 0.163002 0.164647 |
| 2744 | 343, 85, 341,//446 0.163002 0.163002 0.164647 |
| 2745 | 342, 343, 341,//447 0.164647 0.164647 0.164647 |
| 2746 | 11, 330, 301,//448 0.138283 0.162173 0.138283 |
| 2747 | 330, 87, 344,//449 0.138283 0.161146 0.139482 |
| 2748 | 344, 79, 301,//450 0.161146 0.138283 0.139482 |
| 2749 | 330, 344, 301,//451 0.139482 0.139482 0.162173 |
| 2750 | 87, 327, 346,//452 0.138283 0.157997 0.143103 |
| 2751 | 327, 24, 345,//453 0.138283 0.156918 0.144288 |
| 2752 | 345, 91, 346,//454 0.156918 0.143103 0.139510 |
| 2753 | 327, 345, 346,//455 0.144288 0.139510 0.157997 |
| 2754 | 91, 347, 348,//456 0.156918 0.139510 0.143103 |
| 2755 | 347, 22, 303,//457 0.156918 0.138283 0.144288 |
| 2756 | 303, 79, 348,//458 0.138283 0.143103 0.157997 |
| 2757 | 347, 303, 348,//459 0.144288 0.157997 0.139510 |
| 2758 | 87, 346, 344,//460 0.143103 0.144387 0.161146 |
| 2759 | 346, 91, 348,//461 0.143103 0.143103 0.162284 |
| 2760 | 348, 79, 344,//462 0.143103 0.161146 0.144387 |
| 2761 | 346, 348, 344,//463 0.162284 0.144387 0.144387 |
| 2762 | 24, 321, 350,//464 0.138283 0.144288 0.156918 |
| 2763 | 321, 84, 349,//465 0.138283 0.143103 0.157997 |
| 2764 | 349, 93, 350,//466 0.143103 0.156918 0.139510 |
| 2765 | 321, 349, 350,//467 0.157997 0.139510 0.144288 |
| 2766 | 84, 318, 352,//468 0.138283 0.139482 0.161146 |
| 2767 | 318, 2, 351,//469 0.138283 0.138283 0.162173 |
| 2768 | 351, 92, 352,//470 0.138283 0.161146 0.139482 |
| 2769 | 318, 351, 352,//471 0.162173 0.139482 0.139482 |
| 2770 | 92, 353, 355,//472 0.138283 0.157997 0.143103 |
| 2771 | 353, 26, 354,//473 0.138283 0.156918 0.144288 |
| 2772 | 354, 93, 355,//474 0.156918 0.143103 0.139510 |
| 2773 | 353, 354, 355,//475 0.144288 0.139510 0.157997 |
| 2774 | 84, 352, 349,//476 0.161146 0.144387 0.143103 |
| 2775 | 352, 92, 355,//477 0.161146 0.143103 0.144387 |
| 2776 | 355, 93, 349,//478 0.143103 0.143103 0.162284 |
| 2777 | 352, 355, 349,//479 0.144387 0.162284 0.144387 |
| 2778 | 26, 356, 358,//480 0.138283 0.144288 0.156918 |
| 2779 | 356, 94, 357,//481 0.138283 0.143103 0.157997 |
| 2780 | 357, 95, 358,//482 0.143103 0.156918 0.139510 |
| 2781 | 356, 357, 358,//483 0.157997 0.139510 0.144288 |
| 2782 | 94, 359, 360,//484 0.138283 0.139482 0.161146 |
| 2783 | 359, 4, 309,//485 0.138283 0.138283 0.162173 |
| 2784 | 309, 81, 360,//486 0.138283 0.161146 0.139482 |
| 2785 | 359, 309, 360,//487 0.162173 0.139482 0.139482 |
| 2786 | 81, 306, 362,//488 0.138283 0.157997 0.143103 |
| 2787 | 306, 22, 361,//489 0.138283 0.156918 0.144288 |
| 2788 | 361, 95, 362,//490 0.156918 0.143103 0.139510 |
| 2789 | 306, 361, 362,//491 0.144288 0.139510 0.157997 |
| 2790 | 94, 360, 357,//492 0.161146 0.144387 0.143103 |
| 2791 | 360, 81, 362,//493 0.161146 0.143103 0.144387 |
| 2792 | 362, 95, 357,//494 0.143103 0.143103 0.162284 |
| 2793 | 360, 362, 357,//495 0.144387 0.162284 0.144387 |
| 2794 | 24, 350, 345,//496 0.156918 0.164485 0.156918 |
| 2795 | 350, 93, 363,//497 0.156918 0.163002 0.158459 |
| 2796 | 363, 91, 345,//498 0.163002 0.156918 0.158459 |
| 2797 | 350, 363, 345,//499 0.158459 0.158459 0.164485 |
| 2798 | 93, 354, 364,//500 0.156918 0.158459 0.163002 |
| 2799 | 354, 26, 358,//501 0.156918 0.156918 0.164485 |
| 2800 | 358, 95, 364,//502 0.156918 0.163002 0.158459 |
| 2801 | 354, 358, 364,//503 0.164485 0.158459 0.158459 |
| 2802 | 95, 361, 365,//504 0.156918 0.158459 0.163002 |
| 2803 | 361, 22, 347,//505 0.156918 0.156918 0.164485 |
| 2804 | 347, 91, 365,//506 0.156918 0.163002 0.158459 |
| 2805 | 361, 347, 365,//507 0.164485 0.158459 0.158459 |
| 2806 | 93, 364, 363,//508 0.163002 0.164647 0.163002 |
| 2807 | 364, 95, 365,//509 0.163002 0.163002 0.164647 |
| 2808 | 365, 91, 363,//510 0.163002 0.163002 0.164647 |
| 2809 | 364, 365, 363,//511 0.164647 0.164647 0.164647 |
| 2810 | 10, 366, 336,//512 0.138283 0.162173 0.138283 |
| 2811 | 366, 96, 367,//513 0.138283 0.161146 0.139482 |
| 2812 | 367, 89, 336,//514 0.161146 0.138283 0.139482 |
| 2813 | 366, 367, 336,//515 0.139482 0.139482 0.162173 |
| 2814 | 96, 368, 370,//516 0.138283 0.157997 0.143103 |
| 2815 | 368, 27, 369,//517 0.138283 0.156918 0.144288 |
| 2816 | 369, 97, 370,//518 0.156918 0.143103 0.139510 |
| 2817 | 368, 369, 370,//519 0.144288 0.139510 0.157997 |
| 2818 | 97, 371, 372,//520 0.156918 0.139510 0.143103 |
| 2819 | 371, 25, 338,//521 0.156918 0.138283 0.144288 |
| 2820 | 338, 89, 372,//522 0.138283 0.143103 0.157997 |
| 2821 | 371, 338, 372,//523 0.144288 0.157997 0.139510 |
| 2822 | 96, 370, 367,//524 0.143103 0.144387 0.161146 |
| 2823 | 370, 97, 372,//525 0.143103 0.143103 0.162284 |
| 2824 | 372, 89, 367,//526 0.143103 0.161146 0.144387 |
| 2825 | 370, 372, 367,//527 0.162284 0.144387 0.144387 |
| 2826 | 27, 373, 375,//528 0.138283 0.144288 0.156918 |
| 2827 | 373, 98, 374,//529 0.138283 0.143103 0.157997 |
| 2828 | 374, 100, 375,//530 0.143103 0.156918 0.139510 |
| 2829 | 373, 374, 375,//531 0.157997 0.139510 0.144288 |
| 2830 | 98, 376, 378,//532 0.138283 0.139482 0.161146 |
| 2831 | 376, 6, 377,//533 0.138283 0.138283 0.162173 |
| 2832 | 377, 99, 378,//534 0.138283 0.161146 0.139482 |
| 2833 | 376, 377, 378,//535 0.162173 0.139482 0.139482 |
| 2834 | 99, 379, 381,//536 0.138283 0.157997 0.143103 |
| 2835 | 379, 28, 380,//537 0.138283 0.156918 0.144288 |
| 2836 | 380, 100, 381,//538 0.156918 0.143103 0.139510 |
| 2837 | 379, 380, 381,//539 0.144288 0.139510 0.157997 |
| 2838 | 98, 378, 374,//540 0.161146 0.144387 0.143103 |
| 2839 | 378, 99, 381,//541 0.161146 0.143103 0.144387 |
| 2840 | 381, 100, 374,//542 0.143103 0.143103 0.162284 |
| 2841 | 378, 381, 374,//543 0.144387 0.162284 0.144387 |
| 2842 | 28, 382, 384,//544 0.138283 0.144288 0.156918 |
| 2843 | 382, 101, 383,//545 0.138283 0.143103 0.157997 |
| 2844 | 383, 102, 384,//546 0.143103 0.156918 0.139510 |
| 2845 | 382, 383, 384,//547 0.157997 0.139510 0.144288 |
| 2846 | 101, 385, 386,//548 0.138283 0.139482 0.161146 |
| 2847 | 385, 2, 320,//549 0.138283 0.138283 0.162173 |
| 2848 | 320, 86, 386,//550 0.138283 0.161146 0.139482 |
| 2849 | 385, 320, 386,//551 0.162173 0.139482 0.139482 |
| 2850 | 86, 325, 388,//552 0.138283 0.157997 0.143103 |
| 2851 | 325, 25, 387,//553 0.138283 0.156918 0.144288 |
| 2852 | 387, 102, 388,//554 0.156918 0.143103 0.139510 |
| 2853 | 325, 387, 388,//555 0.144288 0.139510 0.157997 |
| 2854 | 101, 386, 383,//556 0.161146 0.144387 0.143103 |
| 2855 | 386, 86, 388,//557 0.161146 0.143103 0.144387 |
| 2856 | 388, 102, 383,//558 0.143103 0.143103 0.162284 |
| 2857 | 386, 388, 383,//559 0.144387 0.162284 0.144387 |
| 2858 | 27, 375, 369,//560 0.156918 0.164485 0.156918 |
| 2859 | 375, 100, 389,//561 0.156918 0.163002 0.158459 |
| 2860 | 389, 97, 369,//562 0.163002 0.156918 0.158459 |
| 2861 | 375, 389, 369,//563 0.158459 0.158459 0.164485 |
| 2862 | 100, 380, 390,//564 0.156918 0.158459 0.163002 |
| 2863 | 380, 28, 384,//565 0.156918 0.156918 0.164485 |
| 2864 | 384, 102, 390,//566 0.156918 0.163002 0.158459 |
| 2865 | 380, 384, 390,//567 0.164485 0.158459 0.158459 |
| 2866 | 102, 387, 391,//568 0.156918 0.158459 0.163002 |
| 2867 | 387, 25, 371,//569 0.156918 0.156918 0.164485 |
| 2868 | 371, 97, 391,//570 0.156918 0.163002 0.158459 |
| 2869 | 387, 371, 391,//571 0.164485 0.158459 0.158459 |
| 2870 | 100, 390, 389,//572 0.163002 0.164647 0.163002 |
| 2871 | 390, 102, 391,//573 0.163002 0.163002 0.164647 |
| 2872 | 391, 97, 389,//574 0.163002 0.163002 0.164647 |
| 2873 | 390, 391, 389,//575 0.164647 0.164647 0.164647 |
| 2874 | 6, 376, 393,//576 0.138283 0.162173 0.138283 |
| 2875 | 376, 98, 392,//577 0.138283 0.161146 0.139482 |
| 2876 | 392, 104, 393,//578 0.161146 0.138283 0.139482 |
| 2877 | 376, 392, 393,//579 0.139482 0.139482 0.162173 |
| 2878 | 98, 373, 395,//580 0.138283 0.157997 0.143103 |
| 2879 | 373, 27, 394,//581 0.138283 0.156918 0.144288 |
| 2880 | 394, 103, 395,//582 0.156918 0.143103 0.139510 |
| 2881 | 373, 394, 395,//583 0.144288 0.139510 0.157997 |
| 2882 | 103, 396, 398,//584 0.156918 0.139510 0.143103 |
| 2883 | 396, 29, 397,//585 0.156918 0.138283 0.144288 |
| 2884 | 397, 104, 398,//586 0.138283 0.143103 0.157997 |
| 2885 | 396, 397, 398,//587 0.144288 0.157997 0.139510 |
| 2886 | 98, 395, 392,//588 0.143103 0.144387 0.161146 |
| 2887 | 395, 103, 398,//589 0.143103 0.143103 0.162284 |
| 2888 | 398, 104, 392,//590 0.143103 0.161146 0.144387 |
| 2889 | 395, 398, 392,//591 0.162284 0.144387 0.144387 |
| 2890 | 27, 368, 400,//592 0.138283 0.144288 0.156918 |
| 2891 | 368, 96, 399,//593 0.138283 0.143103 0.157997 |
| 2892 | 399, 105, 400,//594 0.143103 0.156918 0.139510 |
| 2893 | 368, 399, 400,//595 0.157997 0.139510 0.144288 |
| 2894 | 96, 366, 401,//596 0.138283 0.139482 0.161146 |
| 2895 | 366, 10, 220,//597 0.138283 0.138283 0.162173 |
| 2896 | 220, 60, 401,//598 0.138283 0.161146 0.139482 |
| 2897 | 366, 220, 401,//599 0.162173 0.139482 0.139482 |
| 2898 | 60, 225, 403,//600 0.138283 0.157997 0.143103 |
| 2899 | 225, 18, 402,//601 0.138283 0.156918 0.144288 |
| 2900 | 402, 105, 403,//602 0.156918 0.143103 0.139510 |
| 2901 | 225, 402, 403,//603 0.144288 0.139510 0.157997 |
| 2902 | 96, 401, 399,//604 0.161146 0.144387 0.143103 |
| 2903 | 401, 60, 403,//605 0.161146 0.143103 0.144387 |
| 2904 | 403, 105, 399,//606 0.143103 0.143103 0.162284 |
| 2905 | 401, 403, 399,//607 0.144387 0.162284 0.144387 |
| 2906 | 18, 238, 405,//608 0.138283 0.144288 0.156918 |
| 2907 | 238, 63, 404,//609 0.138283 0.143103 0.157997 |
| 2908 | 404, 107, 405,//610 0.143103 0.156918 0.139510 |
| 2909 | 238, 404, 405,//611 0.157997 0.139510 0.144288 |
| 2910 | 63, 236, 407,//612 0.138283 0.139482 0.161146 |
| 2911 | 236, 7, 406,//613 0.138283 0.138283 0.162173 |
| 2912 | 406, 106, 407,//614 0.138283 0.161146 0.139482 |
| 2913 | 236, 406, 407,//615 0.162173 0.139482 0.139482 |
| 2914 | 106, 408, 410,//616 0.138283 0.157997 0.143103 |
| 2915 | 408, 29, 409,//617 0.138283 0.156918 0.144288 |
| 2916 | 409, 107, 410,//618 0.156918 0.143103 0.139510 |
| 2917 | 408, 409, 410,//619 0.144288 0.139510 0.157997 |
| 2918 | 63, 407, 404,//620 0.161146 0.144387 0.143103 |
| 2919 | 407, 106, 410,//621 0.161146 0.143103 0.144387 |
| 2920 | 410, 107, 404,//622 0.143103 0.143103 0.162284 |
| 2921 | 407, 410, 404,//623 0.144387 0.162284 0.144387 |
| 2922 | 27, 400, 394,//624 0.156918 0.164485 0.156918 |
| 2923 | 400, 105, 411,//625 0.156918 0.163002 0.158459 |
| 2924 | 411, 103, 394,//626 0.163002 0.156918 0.158459 |
| 2925 | 400, 411, 394,//627 0.158459 0.158459 0.164485 |
| 2926 | 105, 402, 412,//628 0.156918 0.158459 0.163002 |
| 2927 | 402, 18, 405,//629 0.156918 0.156918 0.164485 |
| 2928 | 405, 107, 412,//630 0.156918 0.163002 0.158459 |
| 2929 | 402, 405, 412,//631 0.164485 0.158459 0.158459 |
| 2930 | 107, 409, 413,//632 0.156918 0.158459 0.163002 |
| 2931 | 409, 29, 396,//633 0.156918 0.156918 0.164485 |
| 2932 | 396, 103, 413,//634 0.156918 0.163002 0.158459 |
| 2933 | 409, 396, 413,//635 0.164485 0.158459 0.158459 |
| 2934 | 105, 412, 411,//636 0.163002 0.164647 0.163002 |
| 2935 | 412, 107, 413,//637 0.163002 0.163002 0.164647 |
| 2936 | 413, 103, 411,//638 0.163002 0.163002 0.164647 |
| 2937 | 412, 413, 411,//639 0.164647 0.164647 0.164647 |
| 2938 | 7, 414, 406,//640 0.138283 0.162173 0.138283 |
| 2939 | 414, 108, 415,//641 0.138283 0.161146 0.139482 |
| 2940 | 415, 106, 406,//642 0.161146 0.138283 0.139482 |
| 2941 | 414, 415, 406,//643 0.139482 0.139482 0.162173 |
| 2942 | 108, 416, 418,//644 0.138283 0.157997 0.143103 |
| 2943 | 416, 30, 417,//645 0.138283 0.156918 0.144288 |
| 2944 | 417, 109, 418,//646 0.156918 0.143103 0.139510 |
| 2945 | 416, 417, 418,//647 0.144288 0.139510 0.157997 |
| 2946 | 109, 419, 420,//648 0.156918 0.139510 0.143103 |
| 2947 | 419, 29, 408,//649 0.156918 0.138283 0.144288 |
| 2948 | 408, 106, 420,//650 0.138283 0.143103 0.157997 |
| 2949 | 419, 408, 420,//651 0.144288 0.157997 0.139510 |
| 2950 | 108, 418, 415,//652 0.143103 0.144387 0.161146 |
| 2951 | 418, 109, 420,//653 0.143103 0.143103 0.162284 |
| 2952 | 420, 106, 415,//654 0.143103 0.161146 0.144387 |
| 2953 | 418, 420, 415,//655 0.162284 0.144387 0.144387 |
| 2954 | 30, 421, 423,//656 0.138283 0.144288 0.156918 |
| 2955 | 421, 110, 422,//657 0.138283 0.143103 0.157997 |
| 2956 | 422, 112, 423,//658 0.143103 0.156918 0.139510 |
| 2957 | 421, 422, 423,//659 0.157997 0.139510 0.144288 |
| 2958 | 110, 424, 426,//660 0.138283 0.139482 0.161146 |
| 2959 | 424, 8, 425,//661 0.138283 0.138283 0.162173 |
| 2960 | 425, 111, 426,//662 0.138283 0.161146 0.139482 |
| 2961 | 424, 425, 426,//663 0.162173 0.139482 0.139482 |
| 2962 | 111, 427, 429,//664 0.138283 0.157997 0.143103 |
| 2963 | 427, 31, 428,//665 0.138283 0.156918 0.144288 |
| 2964 | 428, 112, 429,//666 0.156918 0.143103 0.139510 |
| 2965 | 427, 428, 429,//667 0.144288 0.139510 0.157997 |
| 2966 | 110, 426, 422,//668 0.161146 0.144387 0.143103 |
| 2967 | 426, 111, 429,//669 0.161146 0.143103 0.144387 |
| 2968 | 429, 112, 422,//670 0.143103 0.143103 0.162284 |
| 2969 | 426, 429, 422,//671 0.144387 0.162284 0.144387 |
| 2970 | 31, 430, 432,//672 0.138283 0.144288 0.156918 |
| 2971 | 430, 113, 431,//673 0.138283 0.143103 0.157997 |
| 2972 | 431, 114, 432,//674 0.143103 0.156918 0.139510 |
| 2973 | 430, 431, 432,//675 0.157997 0.139510 0.144288 |
| 2974 | 113, 433, 434,//676 0.138283 0.139482 0.161146 |
| 2975 | 433, 6, 393,//677 0.138283 0.138283 0.162173 |
| 2976 | 393, 104, 434,//678 0.138283 0.161146 0.139482 |
| 2977 | 433, 393, 434,//679 0.162173 0.139482 0.139482 |
| 2978 | 104, 397, 436,//680 0.138283 0.157997 0.143103 |
| 2979 | 397, 29, 435,//681 0.138283 0.156918 0.144288 |
| 2980 | 435, 114, 436,//682 0.156918 0.143103 0.139510 |
| 2981 | 397, 435, 436,//683 0.144288 0.139510 0.157997 |
| 2982 | 113, 434, 431,//684 0.161146 0.144387 0.143103 |
| 2983 | 434, 104, 436,//685 0.161146 0.143103 0.144387 |
| 2984 | 436, 114, 431,//686 0.143103 0.143103 0.162284 |
| 2985 | 434, 436, 431,//687 0.144387 0.162284 0.144387 |
| 2986 | 30, 423, 417,//688 0.156918 0.164485 0.156918 |
| 2987 | 423, 112, 437,//689 0.156918 0.163002 0.158459 |
| 2988 | 437, 109, 417,//690 0.163002 0.156918 0.158459 |
| 2989 | 423, 437, 417,//691 0.158459 0.158459 0.164485 |
| 2990 | 112, 428, 438,//692 0.156918 0.158459 0.163002 |
| 2991 | 428, 31, 432,//693 0.156918 0.156918 0.164485 |
| 2992 | 432, 114, 438,//694 0.156918 0.163002 0.158459 |
| 2993 | 428, 432, 438,//695 0.164485 0.158459 0.158459 |
| 2994 | 114, 435, 439,//696 0.156918 0.158459 0.163002 |
| 2995 | 435, 29, 419,//697 0.156918 0.156918 0.164485 |
| 2996 | 419, 109, 439,//698 0.156918 0.163002 0.158459 |
| 2997 | 435, 419, 439,//699 0.164485 0.158459 0.158459 |
| 2998 | 112, 438, 437,//700 0.163002 0.164647 0.163002 |
| 2999 | 438, 114, 439,//701 0.163002 0.163002 0.164647 |
| 3000 | 439, 109, 437,//702 0.163002 0.163002 0.164647 |
| 3001 | 438, 439, 437,//703 0.164647 0.164647 0.164647 |
| 3002 | 8, 424, 441,//704 0.138283 0.162173 0.138283 |
| 3003 | 424, 110, 440,//705 0.138283 0.161146 0.139482 |
| 3004 | 440, 116, 441,//706 0.161146 0.138283 0.139482 |
| 3005 | 424, 440, 441,//707 0.139482 0.139482 0.162173 |
| 3006 | 110, 421, 443,//708 0.138283 0.157997 0.143103 |
| 3007 | 421, 30, 442,//709 0.138283 0.156918 0.144288 |
| 3008 | 442, 115, 443,//710 0.156918 0.143103 0.139510 |
| 3009 | 421, 442, 443,//711 0.144288 0.139510 0.157997 |
| 3010 | 115, 444, 446,//712 0.156918 0.139510 0.143103 |
| 3011 | 444, 32, 445,//713 0.156918 0.138283 0.144288 |
| 3012 | 445, 116, 446,//714 0.138283 0.143103 0.157997 |
| 3013 | 444, 445, 446,//715 0.144288 0.157997 0.139510 |
| 3014 | 110, 443, 440,//716 0.143103 0.144387 0.161146 |
| 3015 | 443, 115, 446,//717 0.143103 0.143103 0.162284 |
| 3016 | 446, 116, 440,//718 0.143103 0.161146 0.144387 |
| 3017 | 443, 446, 440,//719 0.162284 0.144387 0.144387 |
| 3018 | 30, 416, 448,//720 0.138283 0.144288 0.156918 |
| 3019 | 416, 108, 447,//721 0.138283 0.143103 0.157997 |
| 3020 | 447, 117, 448,//722 0.143103 0.156918 0.139510 |
| 3021 | 416, 447, 448,//723 0.157997 0.139510 0.144288 |
| 3022 | 108, 414, 449,//724 0.138283 0.139482 0.161146 |
| 3023 | 414, 7, 209,//725 0.138283 0.138283 0.162173 |
| 3024 | 209, 55, 449,//726 0.138283 0.161146 0.139482 |
| 3025 | 414, 209, 449,//727 0.162173 0.139482 0.139482 |
| 3026 | 55, 206, 451,//728 0.138283 0.157997 0.143103 |
| 3027 | 206, 15, 450,//729 0.138283 0.156918 0.144288 |
| 3028 | 450, 117, 451,//730 0.156918 0.143103 0.139510 |
| 3029 | 206, 450, 451,//731 0.144288 0.139510 0.157997 |
| 3030 | 108, 449, 447,//732 0.161146 0.144387 0.143103 |
| 3031 | 449, 55, 451,//733 0.161146 0.143103 0.144387 |
| 3032 | 451, 117, 447,//734 0.143103 0.143103 0.162284 |
| 3033 | 449, 451, 447,//735 0.144387 0.162284 0.144387 |
| 3034 | 15, 203, 453,//736 0.138283 0.144288 0.156918 |
| 3035 | 203, 53, 452,//737 0.138283 0.143103 0.157997 |
| 3036 | 452, 119, 453,//738 0.143103 0.156918 0.139510 |
| 3037 | 203, 452, 453,//739 0.157997 0.139510 0.144288 |
| 3038 | 53, 201, 455,//740 0.138283 0.139482 0.161146 |
| 3039 | 201, 1, 454,//741 0.138283 0.138283 0.162173 |
| 3040 | 454, 118, 455,//742 0.138283 0.161146 0.139482 |
| 3041 | 201, 454, 455,//743 0.162173 0.139482 0.139482 |
| 3042 | 118, 456, 458,//744 0.138283 0.157997 0.143103 |
| 3043 | 456, 32, 457,//745 0.138283 0.156918 0.144288 |
| 3044 | 457, 119, 458,//746 0.156918 0.143103 0.139510 |
| 3045 | 456, 457, 458,//747 0.144288 0.139510 0.157997 |
| 3046 | 53, 455, 452,//748 0.161146 0.144387 0.143103 |
| 3047 | 455, 118, 458,//749 0.161146 0.143103 0.144387 |
| 3048 | 458, 119, 452,//750 0.143103 0.143103 0.162284 |
| 3049 | 455, 458, 452,//751 0.144387 0.162284 0.144387 |
| 3050 | 30, 448, 442,//752 0.156918 0.164485 0.156918 |
| 3051 | 448, 117, 459,//753 0.156918 0.163002 0.158459 |
| 3052 | 459, 115, 442,//754 0.163002 0.156918 0.158459 |
| 3053 | 448, 459, 442,//755 0.158459 0.158459 0.164485 |
| 3054 | 117, 450, 460,//756 0.156918 0.158459 0.163002 |
| 3055 | 450, 15, 453,//757 0.156918 0.156918 0.164485 |
| 3056 | 453, 119, 460,//758 0.156918 0.163002 0.158459 |
| 3057 | 450, 453, 460,//759 0.164485 0.158459 0.158459 |
| 3058 | 119, 457, 461,//760 0.156918 0.158459 0.163002 |
| 3059 | 457, 32, 444,//761 0.156918 0.156918 0.164485 |
| 3060 | 444, 115, 461,//762 0.156918 0.163002 0.158459 |
| 3061 | 457, 444, 461,//763 0.164485 0.158459 0.158459 |
| 3062 | 117, 460, 459,//764 0.163002 0.164647 0.163002 |
| 3063 | 460, 119, 461,//765 0.163002 0.163002 0.164647 |
| 3064 | 461, 115, 459,//766 0.163002 0.163002 0.164647 |
| 3065 | 460, 461, 459,//767 0.164647 0.164647 0.164647 |
| 3066 | 9, 462, 464,//768 0.138283 0.162173 0.138283 |
| 3067 | 462, 120, 463,//769 0.138283 0.161146 0.139482 |
| 3068 | 463, 122, 464,//770 0.161146 0.138283 0.139482 |
| 3069 | 462, 463, 464,//771 0.139482 0.139482 0.162173 |
| 3070 | 120, 465, 467,//772 0.138283 0.157997 0.143103 |
| 3071 | 465, 33, 466,//773 0.138283 0.156918 0.144288 |
| 3072 | 466, 121, 467,//774 0.156918 0.143103 0.139510 |
| 3073 | 465, 466, 467,//775 0.144288 0.139510 0.157997 |
| 3074 | 121, 468, 470,//776 0.156918 0.139510 0.143103 |
| 3075 | 468, 34, 469,//777 0.156918 0.138283 0.144288 |
| 3076 | 469, 122, 470,//778 0.138283 0.143103 0.157997 |
| 3077 | 468, 469, 470,//779 0.144288 0.157997 0.139510 |
| 3078 | 120, 467, 463,//780 0.143103 0.144387 0.161146 |
| 3079 | 467, 121, 470,//781 0.143103 0.143103 0.162284 |
| 3080 | 470, 122, 463,//782 0.143103 0.161146 0.144387 |
| 3081 | 467, 470, 463,//783 0.162284 0.144387 0.144387 |
| 3082 | 33, 471, 473,//784 0.138283 0.144288 0.156918 |
| 3083 | 471, 123, 472,//785 0.138283 0.143103 0.157997 |
| 3084 | 472, 124, 473,//786 0.143103 0.156918 0.139510 |
| 3085 | 471, 472, 473,//787 0.157997 0.139510 0.144288 |
| 3086 | 123, 474, 475,//788 0.138283 0.139482 0.161146 |
| 3087 | 474, 1, 164,//789 0.138283 0.138283 0.162173 |
| 3088 | 164, 44, 475,//790 0.138283 0.161146 0.139482 |
| 3089 | 474, 164, 475,//791 0.162173 0.139482 0.139482 |
| 3090 | 44, 169, 477,//792 0.138283 0.157997 0.143103 |
| 3091 | 169, 14, 476,//793 0.138283 0.156918 0.144288 |
| 3092 | 476, 124, 477,//794 0.156918 0.143103 0.139510 |
| 3093 | 169, 476, 477,//795 0.144288 0.139510 0.157997 |
| 3094 | 123, 475, 472,//796 0.161146 0.144387 0.143103 |
| 3095 | 475, 44, 477,//797 0.161146 0.143103 0.144387 |
| 3096 | 477, 124, 472,//798 0.143103 0.143103 0.162284 |
| 3097 | 475, 477, 472,//799 0.144387 0.162284 0.144387 |
| 3098 | 14, 186, 479,//800 0.138283 0.144288 0.156918 |
| 3099 | 186, 49, 478,//801 0.138283 0.143103 0.157997 |
| 3100 | 478, 126, 479,//802 0.143103 0.156918 0.139510 |
| 3101 | 186, 478, 479,//803 0.157997 0.139510 0.144288 |
| 3102 | 49, 184, 481,//804 0.138283 0.139482 0.161146 |
| 3103 | 184, 5, 480,//805 0.138283 0.138283 0.162173 |
| 3104 | 480, 125, 481,//806 0.138283 0.161146 0.139482 |
| 3105 | 184, 480, 481,//807 0.162173 0.139482 0.139482 |
| 3106 | 125, 482, 484,//808 0.138283 0.157997 0.143103 |
| 3107 | 482, 34, 483,//809 0.138283 0.156918 0.144288 |
| 3108 | 483, 126, 484,//810 0.156918 0.143103 0.139510 |
| 3109 | 482, 483, 484,//811 0.144288 0.139510 0.157997 |
| 3110 | 49, 481, 478,//812 0.161146 0.144387 0.143103 |
| 3111 | 481, 125, 484,//813 0.161146 0.143103 0.144387 |
| 3112 | 484, 126, 478,//814 0.143103 0.143103 0.162284 |
| 3113 | 481, 484, 478,//815 0.144387 0.162284 0.144387 |
| 3114 | 33, 473, 466,//816 0.156918 0.164485 0.156918 |
| 3115 | 473, 124, 485,//817 0.156918 0.163002 0.158459 |
| 3116 | 485, 121, 466,//818 0.163002 0.156918 0.158459 |
| 3117 | 473, 485, 466,//819 0.158459 0.158459 0.164485 |
| 3118 | 124, 476, 486,//820 0.156918 0.158459 0.163002 |
| 3119 | 476, 14, 479,//821 0.156918 0.156918 0.164485 |
| 3120 | 479, 126, 486,//822 0.156918 0.163002 0.158459 |
| 3121 | 476, 479, 486,//823 0.164485 0.158459 0.158459 |
| 3122 | 126, 483, 487,//824 0.156918 0.158459 0.163002 |
| 3123 | 483, 34, 468,//825 0.156918 0.156918 0.164485 |
| 3124 | 468, 121, 487,//826 0.156918 0.163002 0.158459 |
| 3125 | 483, 468, 487,//827 0.164485 0.158459 0.158459 |
| 3126 | 124, 486, 485,//828 0.163002 0.164647 0.163002 |
| 3127 | 486, 126, 487,//829 0.163002 0.163002 0.164647 |
| 3128 | 487, 121, 485,//830 0.163002 0.163002 0.164647 |
| 3129 | 486, 487, 485,//831 0.164647 0.164647 0.164647 |
| 3130 | 1, 474, 454,//832 0.138283 0.162173 0.138283 |
| 3131 | 474, 123, 488,//833 0.138283 0.161146 0.139482 |
| 3132 | 488, 118, 454,//834 0.161146 0.138283 0.139482 |
| 3133 | 474, 488, 454,//835 0.139482 0.139482 0.162173 |
| 3134 | 123, 471, 490,//836 0.138283 0.157997 0.143103 |
| 3135 | 471, 33, 489,//837 0.138283 0.156918 0.144288 |
| 3136 | 489, 127, 490,//838 0.156918 0.143103 0.139510 |
| 3137 | 471, 489, 490,//839 0.144288 0.139510 0.157997 |
| 3138 | 127, 491, 492,//840 0.156918 0.139510 0.143103 |
| 3139 | 491, 32, 456,//841 0.156918 0.138283 0.144288 |
| 3140 | 456, 118, 492,//842 0.138283 0.143103 0.157997 |
| 3141 | 491, 456, 492,//843 0.144288 0.157997 0.139510 |
| 3142 | 123, 490, 488,//844 0.143103 0.144387 0.161146 |
| 3143 | 490, 127, 492,//845 0.143103 0.143103 0.162284 |
| 3144 | 492, 118, 488,//846 0.143103 0.161146 0.144387 |
| 3145 | 490, 492, 488,//847 0.162284 0.144387 0.144387 |
| 3146 | 33, 465, 494,//848 0.138283 0.144288 0.156918 |
| 3147 | 465, 120, 493,//849 0.138283 0.143103 0.157997 |
| 3148 | 493, 129, 494,//850 0.143103 0.156918 0.139510 |
| 3149 | 465, 493, 494,//851 0.157997 0.139510 0.144288 |
| 3150 | 120, 462, 496,//852 0.138283 0.139482 0.161146 |
| 3151 | 462, 9, 495,//853 0.138283 0.138283 0.162173 |
| 3152 | 495, 128, 496,//854 0.138283 0.161146 0.139482 |
| 3153 | 462, 495, 496,//855 0.162173 0.139482 0.139482 |
| 3154 | 128, 497, 499,//856 0.138283 0.157997 0.143103 |
| 3155 | 497, 35, 498,//857 0.138283 0.156918 0.144288 |
| 3156 | 498, 129, 499,//858 0.156918 0.143103 0.139510 |
| 3157 | 497, 498, 499,//859 0.144288 0.139510 0.157997 |
| 3158 | 120, 496, 493,//860 0.161146 0.144387 0.143103 |
| 3159 | 496, 128, 499,//861 0.161146 0.143103 0.144387 |
| 3160 | 499, 129, 493,//862 0.143103 0.143103 0.162284 |
| 3161 | 496, 499, 493,//863 0.144387 0.162284 0.144387 |
| 3162 | 35, 500, 502,//864 0.138283 0.144288 0.156918 |
| 3163 | 500, 130, 501,//865 0.138283 0.143103 0.157997 |
| 3164 | 501, 131, 502,//866 0.143103 0.156918 0.139510 |
| 3165 | 500, 501, 502,//867 0.157997 0.139510 0.144288 |
| 3166 | 130, 503, 504,//868 0.138283 0.139482 0.161146 |
| 3167 | 503, 8, 441,//869 0.138283 0.138283 0.162173 |
| 3168 | 441, 116, 504,//870 0.138283 0.161146 0.139482 |
| 3169 | 503, 441, 504,//871 0.162173 0.139482 0.139482 |
| 3170 | 116, 445, 506,//872 0.138283 0.157997 0.143103 |
| 3171 | 445, 32, 505,//873 0.138283 0.156918 0.144288 |
| 3172 | 505, 131, 506,//874 0.156918 0.143103 0.139510 |
| 3173 | 445, 505, 506,//875 0.144288 0.139510 0.157997 |
| 3174 | 130, 504, 501,//876 0.161146 0.144387 0.143103 |
| 3175 | 504, 116, 506,//877 0.161146 0.143103 0.144387 |
| 3176 | 506, 131, 501,//878 0.143103 0.143103 0.162284 |
| 3177 | 504, 506, 501,//879 0.144387 0.162284 0.144387 |
| 3178 | 33, 494, 489,//880 0.156918 0.164485 0.156918 |
| 3179 | 494, 129, 507,//881 0.156918 0.163002 0.158459 |
| 3180 | 507, 127, 489,//882 0.163002 0.156918 0.158459 |
| 3181 | 494, 507, 489,//883 0.158459 0.158459 0.164485 |
| 3182 | 129, 498, 508,//884 0.156918 0.158459 0.163002 |
| 3183 | 498, 35, 502,//885 0.156918 0.156918 0.164485 |
| 3184 | 502, 131, 508,//886 0.156918 0.163002 0.158459 |
| 3185 | 498, 502, 508,//887 0.164485 0.158459 0.158459 |
| 3186 | 131, 505, 509,//888 0.156918 0.158459 0.163002 |
| 3187 | 505, 32, 491,//889 0.156918 0.156918 0.164485 |
| 3188 | 491, 127, 509,//890 0.156918 0.163002 0.158459 |
| 3189 | 505, 491, 509,//891 0.164485 0.158459 0.158459 |
| 3190 | 129, 508, 507,//892 0.163002 0.164647 0.163002 |
| 3191 | 508, 131, 509,//893 0.163002 0.163002 0.164647 |
| 3192 | 509, 127, 507,//894 0.163002 0.163002 0.164647 |
| 3193 | 508, 509, 507,//895 0.164647 0.164647 0.164647 |
| 3194 | 4, 510, 310,//896 0.138283 0.162173 0.138283 |
| 3195 | 510, 132, 511,//897 0.138283 0.161146 0.139482 |
| 3196 | 511, 82, 310,//898 0.161146 0.138283 0.139482 |
| 3197 | 510, 511, 310,//899 0.139482 0.139482 0.162173 |
| 3198 | 132, 512, 514,//900 0.138283 0.157997 0.143103 |
| 3199 | 512, 36, 513,//901 0.138283 0.156918 0.144288 |
| 3200 | 513, 133, 514,//902 0.156918 0.143103 0.139510 |
| 3201 | 512, 513, 514,//903 0.144288 0.139510 0.157997 |
| 3202 | 133, 515, 516,//904 0.156918 0.139510 0.143103 |
| 3203 | 515, 23, 312,//905 0.156918 0.138283 0.144288 |
| 3204 | 312, 82, 516,//906 0.138283 0.143103 0.157997 |
| 3205 | 515, 312, 516,//907 0.144288 0.157997 0.139510 |
| 3206 | 132, 514, 511,//908 0.143103 0.144387 0.161146 |
| 3207 | 514, 133, 516,//909 0.143103 0.143103 0.162284 |
| 3208 | 516, 82, 511,//910 0.143103 0.161146 0.144387 |
| 3209 | 514, 516, 511,//911 0.162284 0.144387 0.144387 |
| 3210 | 36, 517, 519,//912 0.138283 0.144288 0.156918 |
| 3211 | 517, 134, 518,//913 0.138283 0.143103 0.157997 |
| 3212 | 518, 135, 519,//914 0.143103 0.156918 0.139510 |
| 3213 | 517, 518, 519,//915 0.157997 0.139510 0.144288 |
| 3214 | 134, 520, 521,//916 0.138283 0.139482 0.161146 |
| 3215 | 520, 9, 464,//917 0.138283 0.138283 0.162173 |
| 3216 | 464, 122, 521,//918 0.138283 0.161146 0.139482 |
| 3217 | 520, 464, 521,//919 0.162173 0.139482 0.139482 |
| 3218 | 122, 469, 523,//920 0.138283 0.157997 0.143103 |
| 3219 | 469, 34, 522,//921 0.138283 0.156918 0.144288 |
| 3220 | 522, 135, 523,//922 0.156918 0.143103 0.139510 |
| 3221 | 469, 522, 523,//923 0.144288 0.139510 0.157997 |
| 3222 | 134, 521, 518,//924 0.161146 0.144387 0.143103 |
| 3223 | 521, 122, 523,//925 0.161146 0.143103 0.144387 |
| 3224 | 523, 135, 518,//926 0.143103 0.143103 0.162284 |
| 3225 | 521, 523, 518,//927 0.144387 0.162284 0.144387 |
| 3226 | 34, 482, 525,//928 0.138283 0.144288 0.156918 |
| 3227 | 482, 125, 524,//929 0.138283 0.143103 0.157997 |
| 3228 | 524, 136, 525,//930 0.143103 0.156918 0.139510 |
| 3229 | 482, 524, 525,//931 0.157997 0.139510 0.144288 |
| 3230 | 125, 480, 526,//932 0.138283 0.139482 0.161146 |
| 3231 | 480, 5, 293,//933 0.138283 0.138283 0.162173 |
| 3232 | 293, 78, 526,//934 0.138283 0.161146 0.139482 |
| 3233 | 480, 293, 526,//935 0.162173 0.139482 0.139482 |
| 3234 | 78, 297, 528,//936 0.138283 0.157997 0.143103 |
| 3235 | 297, 23, 527,//937 0.138283 0.156918 0.144288 |
| 3236 | 527, 136, 528,//938 0.156918 0.143103 0.139510 |
| 3237 | 297, 527, 528,//939 0.144288 0.139510 0.157997 |
| 3238 | 125, 526, 524,//940 0.161146 0.144387 0.143103 |
| 3239 | 526, 78, 528,//941 0.161146 0.143103 0.144387 |
| 3240 | 528, 136, 524,//942 0.143103 0.143103 0.162284 |
| 3241 | 526, 528, 524,//943 0.144387 0.162284 0.144387 |
| 3242 | 36, 519, 513,//944 0.156918 0.164485 0.156918 |
| 3243 | 519, 135, 529,//945 0.156918 0.163002 0.158459 |
| 3244 | 529, 133, 513,//946 0.163002 0.156918 0.158459 |
| 3245 | 519, 529, 513,//947 0.158459 0.158459 0.164485 |
| 3246 | 135, 522, 530,//948 0.156918 0.158459 0.163002 |
| 3247 | 522, 34, 525,//949 0.156918 0.156918 0.164485 |
| 3248 | 525, 136, 530,//950 0.156918 0.163002 0.158459 |
| 3249 | 522, 525, 530,//951 0.164485 0.158459 0.158459 |
| 3250 | 136, 527, 531,//952 0.156918 0.158459 0.163002 |
| 3251 | 527, 23, 515,//953 0.156918 0.156918 0.164485 |
| 3252 | 515, 133, 531,//954 0.156918 0.163002 0.158459 |
| 3253 | 527, 515, 531,//955 0.164485 0.158459 0.158459 |
| 3254 | 135, 530, 529,//956 0.163002 0.164647 0.163002 |
| 3255 | 530, 136, 531,//957 0.163002 0.163002 0.164647 |
| 3256 | 531, 133, 529,//958 0.163002 0.163002 0.164647 |
| 3257 | 530, 531, 529,//959 0.164647 0.164647 0.164647 |
| 3258 | 9, 520, 533,//960 0.138283 0.162173 0.138283 |
| 3259 | 520, 134, 532,//961 0.138283 0.161146 0.139482 |
| 3260 | 532, 138, 533,//962 0.161146 0.138283 0.139482 |
| 3261 | 520, 532, 533,//963 0.139482 0.139482 0.162173 |
| 3262 | 134, 517, 535,//964 0.138283 0.157997 0.143103 |
| 3263 | 517, 36, 534,//965 0.138283 0.156918 0.144288 |
| 3264 | 534, 137, 535,//966 0.156918 0.143103 0.139510 |
| 3265 | 517, 534, 535,//967 0.144288 0.139510 0.157997 |
| 3266 | 137, 536, 538,//968 0.156918 0.139510 0.143103 |
| 3267 | 536, 38, 537,//969 0.156918 0.138283 0.144288 |
| 3268 | 537, 138, 538,//970 0.138283 0.143103 0.157997 |
| 3269 | 536, 537, 538,//971 0.144288 0.157997 0.139510 |
| 3270 | 134, 535, 532,//972 0.143103 0.144387 0.161146 |
| 3271 | 535, 137, 538,//973 0.143103 0.143103 0.162284 |
| 3272 | 538, 138, 532,//974 0.143103 0.161146 0.144387 |
| 3273 | 535, 538, 532,//975 0.162284 0.144387 0.144387 |
| 3274 | 36, 512, 540,//976 0.138283 0.144288 0.156918 |
| 3275 | 512, 132, 539,//977 0.138283 0.143103 0.157997 |
| 3276 | 539, 140, 540,//978 0.143103 0.156918 0.139510 |
| 3277 | 512, 539, 540,//979 0.157997 0.139510 0.144288 |
| 3278 | 132, 510, 542,//980 0.138283 0.139482 0.161146 |
| 3279 | 510, 4, 541,//981 0.138283 0.138283 0.162173 |
| 3280 | 541, 139, 542,//982 0.138283 0.161146 0.139482 |
| 3281 | 510, 541, 542,//983 0.162173 0.139482 0.139482 |
| 3282 | 139, 543, 545,//984 0.138283 0.157997 0.143103 |
| 3283 | 543, 37, 544,//985 0.138283 0.156918 0.144288 |
| 3284 | 544, 140, 545,//986 0.156918 0.143103 0.139510 |
| 3285 | 543, 544, 545,//987 0.144288 0.139510 0.157997 |
| 3286 | 132, 542, 539,//988 0.161146 0.144387 0.143103 |
| 3287 | 542, 139, 545,//989 0.161146 0.143103 0.144387 |
| 3288 | 545, 140, 539,//990 0.143103 0.143103 0.162284 |
| 3289 | 542, 545, 539,//991 0.144387 0.162284 0.144387 |
| 3290 | 37, 546, 548,//992 0.138283 0.144288 0.156918 |
| 3291 | 546, 141, 547,//993 0.138283 0.143103 0.157997 |
| 3292 | 547, 143, 548,//994 0.143103 0.156918 0.139510 |
| 3293 | 546, 547, 548,//995 0.157997 0.139510 0.144288 |
| 3294 | 141, 549, 551,//996 0.138283 0.139482 0.161146 |
| 3295 | 549, 3, 550,//997 0.138283 0.138283 0.162173 |
| 3296 | 550, 142, 551,//998 0.138283 0.161146 0.139482 |
| 3297 | 549, 550, 551,//999 0.162173 0.139482 0.139482 |
| 3298 | 142, 552, 554,//1000 0.138283 0.157997 0.143103 |
| 3299 | 552, 38, 553,//1001 0.138283 0.156918 0.144288 |
| 3300 | 553, 143, 554,//1002 0.156918 0.143103 0.139510 |
| 3301 | 552, 553, 554,//1003 0.144288 0.139510 0.157997 |
| 3302 | 141, 551, 547,//1004 0.161146 0.144387 0.143103 |
| 3303 | 551, 142, 554,//1005 0.161146 0.143103 0.144387 |
| 3304 | 554, 143, 547,//1006 0.143103 0.143103 0.162284 |
| 3305 | 551, 554, 547,//1007 0.144387 0.162284 0.144387 |
| 3306 | 36, 540, 534,//1008 0.156918 0.164485 0.156918 |
| 3307 | 540, 140, 555,//1009 0.156918 0.163002 0.158459 |
| 3308 | 555, 137, 534,//1010 0.163002 0.156918 0.158459 |
| 3309 | 540, 555, 534,//1011 0.158459 0.158459 0.164485 |
| 3310 | 140, 544, 556,//1012 0.156918 0.158459 0.163002 |
| 3311 | 544, 37, 548,//1013 0.156918 0.156918 0.164485 |
| 3312 | 548, 143, 556,//1014 0.156918 0.163002 0.158459 |
| 3313 | 544, 548, 556,//1015 0.164485 0.158459 0.158459 |
| 3314 | 143, 553, 557,//1016 0.156918 0.158459 0.163002 |
| 3315 | 553, 38, 536,//1017 0.156918 0.156918 0.164485 |
| 3316 | 536, 137, 557,//1018 0.156918 0.163002 0.158459 |
| 3317 | 553, 536, 557,//1019 0.164485 0.158459 0.158459 |
| 3318 | 140, 556, 555,//1020 0.163002 0.164647 0.163002 |
| 3319 | 556, 143, 557,//1021 0.163002 0.163002 0.164647 |
| 3320 | 557, 137, 555,//1022 0.163002 0.163002 0.164647 |
| 3321 | 556, 557, 555,//1023 0.164647 0.164647 0.164647 |
| 3322 | 3, 558, 550,//1024 0.138283 0.162173 0.138283 |
| 3323 | 558, 144, 559,//1025 0.138283 0.161146 0.139482 |
| 3324 | 559, 142, 550,//1026 0.161146 0.138283 0.139482 |
| 3325 | 558, 559, 550,//1027 0.139482 0.139482 0.162173 |
| 3326 | 144, 560, 562,//1028 0.138283 0.157997 0.143103 |
| 3327 | 560, 39, 561,//1029 0.138283 0.156918 0.144288 |
| 3328 | 561, 145, 562,//1030 0.156918 0.143103 0.139510 |
| 3329 | 560, 561, 562,//1031 0.144288 0.139510 0.157997 |
| 3330 | 145, 563, 564,//1032 0.156918 0.139510 0.143103 |
| 3331 | 563, 38, 552,//1033 0.156918 0.138283 0.144288 |
| 3332 | 552, 142, 564,//1034 0.138283 0.143103 0.157997 |
| 3333 | 563, 552, 564,//1035 0.144288 0.157997 0.139510 |
| 3334 | 144, 562, 559,//1036 0.143103 0.144387 0.161146 |
| 3335 | 562, 145, 564,//1037 0.143103 0.143103 0.162284 |
| 3336 | 564, 142, 559,//1038 0.143103 0.161146 0.144387 |
| 3337 | 562, 564, 559,//1039 0.162284 0.144387 0.144387 |
| 3338 | 39, 565, 567,//1040 0.138283 0.144288 0.156918 |
| 3339 | 565, 146, 566,//1041 0.138283 0.143103 0.157997 |
| 3340 | 566, 147, 567,//1042 0.143103 0.156918 0.139510 |
| 3341 | 565, 566, 567,//1043 0.157997 0.139510 0.144288 |
| 3342 | 146, 568, 569,//1044 0.138283 0.139482 0.161146 |
| 3343 | 568, 8, 503,//1045 0.138283 0.138283 0.162173 |
| 3344 | 503, 130, 569,//1046 0.138283 0.161146 0.139482 |
| 3345 | 568, 503, 569,//1047 0.162173 0.139482 0.139482 |
| 3346 | 130, 500, 571,//1048 0.138283 0.157997 0.143103 |
| 3347 | 500, 35, 570,//1049 0.138283 0.156918 0.144288 |
| 3348 | 570, 147, 571,//1050 0.156918 0.143103 0.139510 |
| 3349 | 500, 570, 571,//1051 0.144288 0.139510 0.157997 |
| 3350 | 146, 569, 566,//1052 0.161146 0.144387 0.143103 |
| 3351 | 569, 130, 571,//1053 0.161146 0.143103 0.144387 |
| 3352 | 571, 147, 566,//1054 0.143103 0.143103 0.162284 |
| 3353 | 569, 571, 566,//1055 0.144387 0.162284 0.144387 |
| 3354 | 35, 497, 573,//1056 0.138283 0.144288 0.156918 |
| 3355 | 497, 128, 572,//1057 0.138283 0.143103 0.157997 |
| 3356 | 572, 148, 573,//1058 0.143103 0.156918 0.139510 |
| 3357 | 497, 572, 573,//1059 0.157997 0.139510 0.144288 |
| 3358 | 128, 495, 574,//1060 0.138283 0.139482 0.161146 |
| 3359 | 495, 9, 533,//1061 0.138283 0.138283 0.162173 |
| 3360 | 533, 138, 574,//1062 0.138283 0.161146 0.139482 |
| 3361 | 495, 533, 574,//1063 0.162173 0.139482 0.139482 |
| 3362 | 138, 537, 576,//1064 0.138283 0.157997 0.143103 |
| 3363 | 537, 38, 575,//1065 0.138283 0.156918 0.144288 |
| 3364 | 575, 148, 576,//1066 0.156918 0.143103 0.139510 |
| 3365 | 537, 575, 576,//1067 0.144288 0.139510 0.157997 |
| 3366 | 128, 574, 572,//1068 0.161146 0.144387 0.143103 |
| 3367 | 574, 138, 576,//1069 0.161146 0.143103 0.144387 |
| 3368 | 576, 148, 572,//1070 0.143103 0.143103 0.162284 |
| 3369 | 574, 576, 572,//1071 0.144387 0.162284 0.144387 |
| 3370 | 39, 567, 561,//1072 0.156918 0.164485 0.156918 |
| 3371 | 567, 147, 577,//1073 0.156918 0.163002 0.158459 |
| 3372 | 577, 145, 561,//1074 0.163002 0.156918 0.158459 |
| 3373 | 567, 577, 561,//1075 0.158459 0.158459 0.164485 |
| 3374 | 147, 570, 578,//1076 0.156918 0.158459 0.163002 |
| 3375 | 570, 35, 573,//1077 0.156918 0.156918 0.164485 |
| 3376 | 573, 148, 578,//1078 0.156918 0.163002 0.158459 |
| 3377 | 570, 573, 578,//1079 0.164485 0.158459 0.158459 |
| 3378 | 148, 575, 579,//1080 0.156918 0.158459 0.163002 |
| 3379 | 575, 38, 563,//1081 0.156918 0.156918 0.164485 |
| 3380 | 563, 145, 579,//1082 0.156918 0.163002 0.158459 |
| 3381 | 575, 563, 579,//1083 0.164485 0.158459 0.158459 |
| 3382 | 147, 578, 577,//1084 0.163002 0.164647 0.163002 |
| 3383 | 578, 148, 579,//1085 0.163002 0.163002 0.164647 |
| 3384 | 579, 145, 577,//1086 0.163002 0.163002 0.164647 |
| 3385 | 578, 579, 577,//1087 0.164647 0.164647 0.164647 |
| 3386 | 8, 568, 425,//1088 0.138283 0.162173 0.138283 |
| 3387 | 568, 146, 580,//1089 0.138283 0.161146 0.139482 |
| 3388 | 580, 111, 425,//1090 0.161146 0.138283 0.139482 |
| 3389 | 568, 580, 425,//1091 0.139482 0.139482 0.162173 |
| 3390 | 146, 565, 582,//1092 0.138283 0.157997 0.143103 |
| 3391 | 565, 39, 581,//1093 0.138283 0.156918 0.144288 |
| 3392 | 581, 149, 582,//1094 0.156918 0.143103 0.139510 |
| 3393 | 565, 581, 582,//1095 0.144288 0.139510 0.157997 |
| 3394 | 149, 583, 584,//1096 0.156918 0.139510 0.143103 |
| 3395 | 583, 31, 427,//1097 0.156918 0.138283 0.144288 |
| 3396 | 427, 111, 584,//1098 0.138283 0.143103 0.157997 |
| 3397 | 583, 427, 584,//1099 0.144288 0.157997 0.139510 |
| 3398 | 146, 582, 580,//1100 0.143103 0.144387 0.161146 |
| 3399 | 582, 149, 584,//1101 0.143103 0.143103 0.162284 |
| 3400 | 584, 111, 580,//1102 0.143103 0.161146 0.144387 |
| 3401 | 582, 584, 580,//1103 0.162284 0.144387 0.144387 |
| 3402 | 39, 560, 586,//1104 0.138283 0.144288 0.156918 |
| 3403 | 560, 144, 585,//1105 0.138283 0.143103 0.157997 |
| 3404 | 585, 151, 586,//1106 0.143103 0.156918 0.139510 |
| 3405 | 560, 585, 586,//1107 0.157997 0.139510 0.144288 |
| 3406 | 144, 558, 588,//1108 0.138283 0.139482 0.161146 |
| 3407 | 558, 3, 587,//1109 0.138283 0.138283 0.162173 |
| 3408 | 587, 150, 588,//1110 0.138283 0.161146 0.139482 |
| 3409 | 558, 587, 588,//1111 0.162173 0.139482 0.139482 |
| 3410 | 150, 589, 591,//1112 0.138283 0.157997 0.143103 |
| 3411 | 589, 40, 590,//1113 0.138283 0.156918 0.144288 |
| 3412 | 590, 151, 591,//1114 0.156918 0.143103 0.139510 |
| 3413 | 589, 590, 591,//1115 0.144288 0.139510 0.157997 |
| 3414 | 144, 588, 585,//1116 0.161146 0.144387 0.143103 |
| 3415 | 588, 150, 591,//1117 0.161146 0.143103 0.144387 |
| 3416 | 591, 151, 585,//1118 0.143103 0.143103 0.162284 |
| 3417 | 588, 591, 585,//1119 0.144387 0.162284 0.144387 |
| 3418 | 40, 592, 594,//1120 0.138283 0.144288 0.156918 |
| 3419 | 592, 152, 593,//1121 0.138283 0.143103 0.157997 |
| 3420 | 593, 153, 594,//1122 0.143103 0.156918 0.139510 |
| 3421 | 592, 593, 594,//1123 0.157997 0.139510 0.144288 |
| 3422 | 152, 595, 596,//1124 0.138283 0.139482 0.161146 |
| 3423 | 595, 6, 433,//1125 0.138283 0.138283 0.162173 |
| 3424 | 433, 113, 596,//1126 0.138283 0.161146 0.139482 |
| 3425 | 595, 433, 596,//1127 0.162173 0.139482 0.139482 |
| 3426 | 113, 430, 598,//1128 0.138283 0.157997 0.143103 |
| 3427 | 430, 31, 597,//1129 0.138283 0.156918 0.144288 |
| 3428 | 597, 153, 598,//1130 0.156918 0.143103 0.139510 |
| 3429 | 430, 597, 598,//1131 0.144288 0.139510 0.157997 |
| 3430 | 152, 596, 593,//1132 0.161146 0.144387 0.143103 |
| 3431 | 596, 113, 598,//1133 0.161146 0.143103 0.144387 |
| 3432 | 598, 153, 593,//1134 0.143103 0.143103 0.162284 |
| 3433 | 596, 598, 593,//1135 0.144387 0.162284 0.144387 |
| 3434 | 39, 586, 581,//1136 0.156918 0.164485 0.156918 |
| 3435 | 586, 151, 599,//1137 0.156918 0.163002 0.158459 |
| 3436 | 599, 149, 581,//1138 0.163002 0.156918 0.158459 |
| 3437 | 586, 599, 581,//1139 0.158459 0.158459 0.164485 |
| 3438 | 151, 590, 600,//1140 0.156918 0.158459 0.163002 |
| 3439 | 590, 40, 594,//1141 0.156918 0.156918 0.164485 |
| 3440 | 594, 153, 600,//1142 0.156918 0.163002 0.158459 |
| 3441 | 590, 594, 600,//1143 0.164485 0.158459 0.158459 |
| 3442 | 153, 597, 601,//1144 0.156918 0.158459 0.163002 |
| 3443 | 597, 31, 583,//1145 0.156918 0.156918 0.164485 |
| 3444 | 583, 149, 601,//1146 0.156918 0.163002 0.158459 |
| 3445 | 597, 583, 601,//1147 0.164485 0.158459 0.158459 |
| 3446 | 151, 600, 599,//1148 0.163002 0.164647 0.163002 |
| 3447 | 600, 153, 601,//1149 0.163002 0.163002 0.164647 |
| 3448 | 601, 149, 599,//1150 0.163002 0.163002 0.164647 |
| 3449 | 600, 601, 599,//1151 0.164647 0.164647 0.164647 |
| 3450 | 3, 602, 587,//1152 0.138283 0.162173 0.138283 |
| 3451 | 602, 154, 603,//1153 0.138283 0.161146 0.139482 |
| 3452 | 603, 150, 587,//1154 0.161146 0.138283 0.139482 |
| 3453 | 602, 603, 587,//1155 0.139482 0.139482 0.162173 |
| 3454 | 154, 604, 606,//1156 0.138283 0.157997 0.143103 |
| 3455 | 604, 41, 605,//1157 0.138283 0.156918 0.144288 |
| 3456 | 605, 155, 606,//1158 0.156918 0.143103 0.139510 |
| 3457 | 604, 605, 606,//1159 0.144288 0.139510 0.157997 |
| 3458 | 155, 607, 608,//1160 0.156918 0.139510 0.143103 |
| 3459 | 607, 40, 589,//1161 0.156918 0.138283 0.144288 |
| 3460 | 589, 150, 608,//1162 0.138283 0.143103 0.157997 |
| 3461 | 607, 589, 608,//1163 0.144288 0.157997 0.139510 |
| 3462 | 154, 606, 603,//1164 0.143103 0.144387 0.161146 |
| 3463 | 606, 155, 608,//1165 0.143103 0.143103 0.162284 |
| 3464 | 608, 150, 603,//1166 0.143103 0.161146 0.144387 |
| 3465 | 606, 608, 603,//1167 0.162284 0.144387 0.144387 |
| 3466 | 41, 609, 611,//1168 0.138283 0.144288 0.156918 |
| 3467 | 609, 156, 610,//1169 0.138283 0.143103 0.157997 |
| 3468 | 610, 157, 611,//1170 0.143103 0.156918 0.139510 |
| 3469 | 609, 610, 611,//1171 0.157997 0.139510 0.144288 |
| 3470 | 156, 612, 613,//1172 0.138283 0.139482 0.161146 |
| 3471 | 612, 2, 385,//1173 0.138283 0.138283 0.162173 |
| 3472 | 385, 101, 613,//1174 0.138283 0.161146 0.139482 |
| 3473 | 612, 385, 613,//1175 0.162173 0.139482 0.139482 |
| 3474 | 101, 382, 615,//1176 0.138283 0.157997 0.143103 |
| 3475 | 382, 28, 614,//1177 0.138283 0.156918 0.144288 |
| 3476 | 614, 157, 615,//1178 0.156918 0.143103 0.139510 |
| 3477 | 382, 614, 615,//1179 0.144288 0.139510 0.157997 |
| 3478 | 156, 613, 610,//1180 0.161146 0.144387 0.143103 |
| 3479 | 613, 101, 615,//1181 0.161146 0.143103 0.144387 |
| 3480 | 615, 157, 610,//1182 0.143103 0.143103 0.162284 |
| 3481 | 613, 615, 610,//1183 0.144387 0.162284 0.144387 |
| 3482 | 28, 379, 617,//1184 0.138283 0.144288 0.156918 |
| 3483 | 379, 99, 616,//1185 0.138283 0.143103 0.157997 |
| 3484 | 616, 158, 617,//1186 0.143103 0.156918 0.139510 |
| 3485 | 379, 616, 617,//1187 0.157997 0.139510 0.144288 |
| 3486 | 99, 377, 618,//1188 0.138283 0.139482 0.161146 |
| 3487 | 377, 6, 595,//1189 0.138283 0.138283 0.162173 |
| 3488 | 595, 152, 618,//1190 0.138283 0.161146 0.139482 |
| 3489 | 377, 595, 618,//1191 0.162173 0.139482 0.139482 |
| 3490 | 152, 592, 620,//1192 0.138283 0.157997 0.143103 |
| 3491 | 592, 40, 619,//1193 0.138283 0.156918 0.144288 |
| 3492 | 619, 158, 620,//1194 0.156918 0.143103 0.139510 |
| 3493 | 592, 619, 620,//1195 0.144288 0.139510 0.157997 |
| 3494 | 99, 618, 616,//1196 0.161146 0.144387 0.143103 |
| 3495 | 618, 152, 620,//1197 0.161146 0.143103 0.144387 |
| 3496 | 620, 158, 616,//1198 0.143103 0.143103 0.162284 |
| 3497 | 618, 620, 616,//1199 0.144387 0.162284 0.144387 |
| 3498 | 41, 611, 605,//1200 0.156918 0.164485 0.156918 |
| 3499 | 611, 157, 621,//1201 0.156918 0.163002 0.158459 |
| 3500 | 621, 155, 605,//1202 0.163002 0.156918 0.158459 |
| 3501 | 611, 621, 605,//1203 0.158459 0.158459 0.164485 |
| 3502 | 157, 614, 622,//1204 0.156918 0.158459 0.163002 |
| 3503 | 614, 28, 617,//1205 0.156918 0.156918 0.164485 |
| 3504 | 617, 158, 622,//1206 0.156918 0.163002 0.158459 |
| 3505 | 614, 617, 622,//1207 0.164485 0.158459 0.158459 |
| 3506 | 158, 619, 623,//1208 0.156918 0.158459 0.163002 |
| 3507 | 619, 40, 607,//1209 0.156918 0.156918 0.164485 |
| 3508 | 607, 155, 623,//1210 0.156918 0.163002 0.158459 |
| 3509 | 619, 607, 623,//1211 0.164485 0.158459 0.158459 |
| 3510 | 157, 622, 621,//1212 0.163002 0.164647 0.163002 |
| 3511 | 622, 158, 623,//1213 0.163002 0.163002 0.164647 |
| 3512 | 623, 155, 621,//1214 0.163002 0.163002 0.164647 |
| 3513 | 622, 623, 621,//1215 0.164647 0.164647 0.164647 |
| 3514 | 2, 612, 351,//1216 0.138283 0.162173 0.138283 |
| 3515 | 612, 156, 624,//1217 0.138283 0.161146 0.139482 |
| 3516 | 624, 92, 351,//1218 0.161146 0.138283 0.139482 |
| 3517 | 612, 624, 351,//1219 0.139482 0.139482 0.162173 |
| 3518 | 156, 609, 626,//1220 0.138283 0.157997 0.143103 |
| 3519 | 609, 41, 625,//1221 0.138283 0.156918 0.144288 |
| 3520 | 625, 159, 626,//1222 0.156918 0.143103 0.139510 |
| 3521 | 609, 625, 626,//1223 0.144288 0.139510 0.157997 |
| 3522 | 159, 627, 628,//1224 0.156918 0.139510 0.143103 |
| 3523 | 627, 26, 353,//1225 0.156918 0.138283 0.144288 |
| 3524 | 353, 92, 628,//1226 0.138283 0.143103 0.157997 |
| 3525 | 627, 353, 628,//1227 0.144288 0.157997 0.139510 |
| 3526 | 156, 626, 624,//1228 0.143103 0.144387 0.161146 |
| 3527 | 626, 159, 628,//1229 0.143103 0.143103 0.162284 |
| 3528 | 628, 92, 624,//1230 0.143103 0.161146 0.144387 |
| 3529 | 626, 628, 624,//1231 0.162284 0.144387 0.144387 |
| 3530 | 41, 604, 630,//1232 0.138283 0.144288 0.156918 |
| 3531 | 604, 154, 629,//1233 0.138283 0.143103 0.157997 |
| 3532 | 629, 160, 630,//1234 0.143103 0.156918 0.139510 |
| 3533 | 604, 629, 630,//1235 0.157997 0.139510 0.144288 |
| 3534 | 154, 602, 631,//1236 0.138283 0.139482 0.161146 |
| 3535 | 602, 3, 549,//1237 0.138283 0.138283 0.162173 |
| 3536 | 549, 141, 631,//1238 0.138283 0.161146 0.139482 |
| 3537 | 602, 549, 631,//1239 0.162173 0.139482 0.139482 |
| 3538 | 141, 546, 633,//1240 0.138283 0.157997 0.143103 |
| 3539 | 546, 37, 632,//1241 0.138283 0.156918 0.144288 |
| 3540 | 632, 160, 633,//1242 0.156918 0.143103 0.139510 |
| 3541 | 546, 632, 633,//1243 0.144288 0.139510 0.157997 |
| 3542 | 154, 631, 629,//1244 0.161146 0.144387 0.143103 |
| 3543 | 631, 141, 633,//1245 0.161146 0.143103 0.144387 |
| 3544 | 633, 160, 629,//1246 0.143103 0.143103 0.162284 |
| 3545 | 631, 633, 629,//1247 0.144387 0.162284 0.144387 |
| 3546 | 37, 543, 635,//1248 0.138283 0.144288 0.156918 |
| 3547 | 543, 139, 634,//1249 0.138283 0.143103 0.157997 |
| 3548 | 634, 161, 635,//1250 0.143103 0.156918 0.139510 |
| 3549 | 543, 634, 635,//1251 0.157997 0.139510 0.144288 |
| 3550 | 139, 541, 636,//1252 0.138283 0.139482 0.161146 |
| 3551 | 541, 4, 359,//1253 0.138283 0.138283 0.162173 |
| 3552 | 359, 94, 636,//1254 0.138283 0.161146 0.139482 |
| 3553 | 541, 359, 636,//1255 0.162173 0.139482 0.139482 |
| 3554 | 94, 356, 638,//1256 0.138283 0.157997 0.143103 |
| 3555 | 356, 26, 637,//1257 0.138283 0.156918 0.144288 |
| 3556 | 637, 161, 638,//1258 0.156918 0.143103 0.139510 |
| 3557 | 356, 637, 638,//1259 0.144288 0.139510 0.157997 |
| 3558 | 139, 636, 634,//1260 0.161146 0.144387 0.143103 |
| 3559 | 636, 94, 638,//1261 0.161146 0.143103 0.144387 |
| 3560 | 638, 161, 634,//1262 0.143103 0.143103 0.162284 |
| 3561 | 636, 638, 634,//1263 0.144387 0.162284 0.144387 |
| 3562 | 41, 630, 625,//1264 0.156918 0.164485 0.156918 |
| 3563 | 630, 160, 639,//1265 0.156918 0.163002 0.158459 |
| 3564 | 639, 159, 625,//1266 0.163002 0.156918 0.158459 |
| 3565 | 630, 639, 625,//1267 0.158459 0.158459 0.164485 |
| 3566 | 160, 632, 640,//1268 0.156918 0.158459 0.163002 |
| 3567 | 632, 37, 635,//1269 0.156918 0.156918 0.164485 |
| 3568 | 635, 161, 640,//1270 0.156918 0.163002 0.158459 |
| 3569 | 632, 635, 640,//1271 0.164485 0.158459 0.158459 |
| 3570 | 161, 637, 641,//1272 0.156918 0.158459 0.163002 |
| 3571 | 637, 26, 627,//1273 0.156918 0.156918 0.164485 |
| 3572 | 627, 159, 641,//1274 0.156918 0.163002 0.158459 |
| 3573 | 637, 627, 641,//1275 0.164485 0.158459 0.158459 |
| 3574 | 160, 640, 639,//1276 0.163002 0.164647 0.163002 |
| 3575 | 640, 161, 641,//1277 0.163002 0.163002 0.164647 |
| 3576 | 641, 159, 639,//1278 0.163002 0.163002 0.164647 |
| 3577 | 640, 641, 639 //1279 0.164647 0.164647 0.164647 |
| 3578 | }; |
| 3579 | static const GLfloat v[1926] = { |
| 3580 | -0.525731f, 0.850651f, 0.000000f,//0 |
| 3581 | 0.525731f, 0.850651f, 0.000000f,//1 |
| 3582 | -0.525731f, -0.850651f, 0.000000f,//2 |
| 3583 | 0.525731f, -0.850651f, 0.000000f,//3 |
| 3584 | 0.000000f, -0.525731f, 0.850651f,//4 |
| 3585 | 0.000000f, 0.525731f, 0.850651f,//5 |
| 3586 | 0.000000f, -0.525731f, -0.850651f,//6 |
| 3587 | 0.000000f, 0.525731f, -0.850651f,//7 |
| 3588 | 0.850651f, 0.000000f, -0.525731f,//8 |
| 3589 | 0.850651f, 0.000000f, 0.525731f,//9 |
| 3590 | -0.850651f, 0.000000f, -0.525731f,//10 |
| 3591 | -0.850651f, 0.000000f, 0.525731f,//11 |
| 3592 | 0.000000f, 1.000000f, 0.000000f,//12 |
| 3593 | -0.309017f, 0.809017f, 0.500000f,//13 |
| 3594 | 0.309017f, 0.809017f, 0.500000f,//14 |
| 3595 | 0.309017f, 0.809017f, -0.500000f,//15 |
| 3596 | -0.309017f, 0.809017f, -0.500000f,//16 |
| 3597 | -0.809017f, 0.500000f, -0.309017f,//17 |
| 3598 | -0.500000f, 0.309017f, -0.809017f,//18 |
| 3599 | -1.000000f, 0.000000f, 0.000000f,//19 |
| 3600 | -0.809017f, 0.500000f, 0.309017f,//20 |
| 3601 | -0.500000f, 0.309017f, 0.809017f,//21 |
| 3602 | -0.500000f, -0.309017f, 0.809017f,//22 |
| 3603 | 0.000000f, 0.000000f, 1.000000f,//23 |
| 3604 | -0.809017f, -0.500000f, 0.309017f,//24 |
| 3605 | -0.809017f, -0.500000f, -0.309017f,//25 |
| 3606 | -0.309017f, -0.809017f, 0.500000f,//26 |
| 3607 | -0.500000f, -0.309017f, -0.809017f,//27 |
| 3608 | -0.309017f, -0.809017f, -0.500000f,//28 |
| 3609 | 0.000000f, 0.000000f, -1.000000f,//29 |
| 3610 | 0.500000f, 0.309017f, -0.809017f,//30 |
| 3611 | 0.500000f, -0.309017f, -0.809017f,//31 |
| 3612 | 0.809017f, 0.500000f, -0.309017f,//32 |
| 3613 | 0.809017f, 0.500000f, 0.309017f,//33 |
| 3614 | 0.500000f, 0.309017f, 0.809017f,//34 |
| 3615 | 1.000000f, 0.000000f, 0.000000f,//35 |
| 3616 | 0.500000f, -0.309017f, 0.809017f,//36 |
| 3617 | 0.309017f, -0.809017f, 0.500000f,//37 |
| 3618 | 0.809017f, -0.500000f, 0.309017f,//38 |
| 3619 | 0.809017f, -0.500000f, -0.309017f,//39 |
| 3620 | 0.309017f, -0.809017f, -0.500000f,//40 |
| 3621 | 0.000000f, -1.000000f, 0.000000f,//41 |
| 3622 | 0.273267f, 0.961938f, 0.000000f,//42 |
| 3623 | 0.162460f, 0.951057f, 0.262866f,//43 |
| 3624 | 0.433889f, 0.862668f, 0.259892f,//44 |
| 3625 | -0.273267f, 0.961938f, 0.000000f,//45 |
| 3626 | -0.433889f, 0.862668f, 0.259892f,//46 |
| 3627 | -0.162460f, 0.951057f, 0.262866f,//47 |
| 3628 | -0.160622f, 0.693780f, 0.702046f,//48 |
| 3629 | 0.160622f, 0.693780f, 0.702046f,//49 |
| 3630 | 0.000000f, 0.850651f, 0.525731f,//50 |
| 3631 | -0.162460f, 0.951057f, -0.262866f,//51 |
| 3632 | -0.433889f, 0.862668f, -0.259892f,//52 |
| 3633 | 0.433889f, 0.862668f, -0.259892f,//53 |
| 3634 | 0.162460f, 0.951057f, -0.262866f,//54 |
| 3635 | 0.160622f, 0.693780f, -0.702046f,//55 |
| 3636 | -0.160622f, 0.693780f, -0.702046f,//56 |
| 3637 | 0.000000f, 0.850651f, -0.525731f,//57 |
| 3638 | -0.862668f, 0.259892f, -0.433889f,//58 |
| 3639 | -0.688191f, 0.425325f, -0.587785f,//59 |
| 3640 | -0.702046f, 0.160622f, -0.693780f,//60 |
| 3641 | -0.693780f, 0.702046f, -0.160622f,//61 |
| 3642 | -0.587785f, 0.688191f, -0.425325f,//62 |
| 3643 | -0.259892f, 0.433889f, -0.862668f,//63 |
| 3644 | -0.425325f, 0.587785f, -0.688191f,//64 |
| 3645 | -0.850651f, 0.525731f, 0.000000f,//65 |
| 3646 | -0.693780f, 0.702046f, 0.160622f,//66 |
| 3647 | -0.961938f, 0.000000f, -0.273267f,//67 |
| 3648 | -0.951057f, 0.262866f, -0.162460f,//68 |
| 3649 | -0.961938f, 0.000000f, 0.273267f,//69 |
| 3650 | -0.862668f, 0.259892f, 0.433889f,//70 |
| 3651 | -0.951057f, 0.262866f, 0.162460f,//71 |
| 3652 | -0.702046f, 0.160622f, 0.693780f,//72 |
| 3653 | -0.688191f, 0.425325f, 0.587785f,//73 |
| 3654 | -0.259892f, 0.433889f, 0.862668f,//74 |
| 3655 | -0.425325f, 0.587785f, 0.688191f,//75 |
| 3656 | -0.587785f, 0.688191f, 0.425325f,//76 |
| 3657 | -0.262866f, 0.162460f, 0.951057f,//77 |
| 3658 | 0.000000f, 0.273267f, 0.961938f,//78 |
| 3659 | -0.702046f, -0.160622f, 0.693780f,//79 |
| 3660 | -0.525731f, 0.000000f, 0.850651f,//80 |
| 3661 | -0.259892f, -0.433889f, 0.862668f,//81 |
| 3662 | 0.000000f, -0.273267f, 0.961938f,//82 |
| 3663 | -0.262866f, -0.162460f, 0.951057f,//83 |
| 3664 | -0.693780f, -0.702046f, 0.160622f,//84 |
| 3665 | -0.850651f, -0.525731f, 0.000000f,//85 |
| 3666 | -0.693780f, -0.702046f, -0.160622f,//86 |
| 3667 | -0.862668f, -0.259892f, 0.433889f,//87 |
| 3668 | -0.951057f, -0.262866f, 0.162460f,//88 |
| 3669 | -0.862668f, -0.259892f, -0.433889f,//89 |
| 3670 | -0.951057f, -0.262866f, -0.162460f,//90 |
| 3671 | -0.688191f, -0.425325f, 0.587785f,//91 |
| 3672 | -0.433889f, -0.862668f, 0.259892f,//92 |
| 3673 | -0.587785f, -0.688191f, 0.425325f,//93 |
| 3674 | -0.160622f, -0.693780f, 0.702046f,//94 |
| 3675 | -0.425325f, -0.587785f, 0.688191f,//95 |
| 3676 | -0.702046f, -0.160622f, -0.693780f,//96 |
| 3677 | -0.688191f, -0.425325f, -0.587785f,//97 |
| 3678 | -0.259892f, -0.433889f, -0.862668f,//98 |
| 3679 | -0.160622f, -0.693780f, -0.702046f,//99 |
| 3680 | -0.425325f, -0.587785f, -0.688191f,//100 |
| 3681 | -0.433889f, -0.862668f, -0.259892f,//101 |
| 3682 | -0.587785f, -0.688191f, -0.425325f,//102 |
| 3683 | -0.262866f, -0.162460f, -0.951057f,//103 |
| 3684 | 0.000000f, -0.273267f, -0.961938f,//104 |
| 3685 | -0.525731f, 0.000000f, -0.850651f,//105 |
| 3686 | 0.000000f, 0.273267f, -0.961938f,//106 |
| 3687 | -0.262866f, 0.162460f, -0.951057f,//107 |
| 3688 | 0.259892f, 0.433889f, -0.862668f,//108 |
| 3689 | 0.262866f, 0.162460f, -0.951057f,//109 |
| 3690 | 0.702046f, 0.160622f, -0.693780f,//110 |
| 3691 | 0.702046f, -0.160622f, -0.693780f,//111 |
| 3692 | 0.525731f, 0.000000f, -0.850651f,//112 |
| 3693 | 0.259892f, -0.433889f, -0.862668f,//113 |
| 3694 | 0.262866f, -0.162460f, -0.951057f,//114 |
| 3695 | 0.688191f, 0.425325f, -0.587785f,//115 |
| 3696 | 0.862668f, 0.259892f, -0.433889f,//116 |
| 3697 | 0.425325f, 0.587785f, -0.688191f,//117 |
| 3698 | 0.693780f, 0.702046f, -0.160622f,//118 |
| 3699 | 0.587785f, 0.688191f, -0.425325f,//119 |
| 3700 | 0.862668f, 0.259892f, 0.433889f,//120 |
| 3701 | 0.688191f, 0.425325f, 0.587785f,//121 |
| 3702 | 0.702046f, 0.160622f, 0.693780f,//122 |
| 3703 | 0.693780f, 0.702046f, 0.160622f,//123 |
| 3704 | 0.587785f, 0.688191f, 0.425325f,//124 |
| 3705 | 0.259892f, 0.433889f, 0.862668f,//125 |
| 3706 | 0.425325f, 0.587785f, 0.688191f,//126 |
| 3707 | 0.850651f, 0.525731f, 0.000000f,//127 |
| 3708 | 0.961938f, 0.000000f, 0.273267f,//128 |
| 3709 | 0.951057f, 0.262866f, 0.162460f,//129 |
| 3710 | 0.961938f, 0.000000f, -0.273267f,//130 |
| 3711 | 0.951057f, 0.262866f, -0.162460f,//131 |
| 3712 | 0.259892f, -0.433889f, 0.862668f,//132 |
| 3713 | 0.262866f, -0.162460f, 0.951057f,//133 |
| 3714 | 0.702046f, -0.160622f, 0.693780f,//134 |
| 3715 | 0.525731f, 0.000000f, 0.850651f,//135 |
| 3716 | 0.262866f, 0.162460f, 0.951057f,//136 |
| 3717 | 0.688191f, -0.425325f, 0.587785f,//137 |
| 3718 | 0.862668f, -0.259892f, 0.433889f,//138 |
| 3719 | 0.160622f, -0.693780f, 0.702046f,//139 |
| 3720 | 0.425325f, -0.587785f, 0.688191f,//140 |
| 3721 | 0.433889f, -0.862668f, 0.259892f,//141 |
| 3722 | 0.693780f, -0.702046f, 0.160622f,//142 |
| 3723 | 0.587785f, -0.688191f, 0.425325f,//143 |
| 3724 | 0.693780f, -0.702046f, -0.160622f,//144 |
| 3725 | 0.850651f, -0.525731f, 0.000000f,//145 |
| 3726 | 0.862668f, -0.259892f, -0.433889f,//146 |
| 3727 | 0.951057f, -0.262866f, -0.162460f,//147 |
| 3728 | 0.951057f, -0.262866f, 0.162460f,//148 |
| 3729 | 0.688191f, -0.425325f, -0.587785f,//149 |
| 3730 | 0.433889f, -0.862668f, -0.259892f,//150 |
| 3731 | 0.587785f, -0.688191f, -0.425325f,//151 |
| 3732 | 0.160622f, -0.693780f, -0.702046f,//152 |
| 3733 | 0.425325f, -0.587785f, -0.688191f,//153 |
| 3734 | 0.273267f, -0.961938f, 0.000000f,//154 |
| 3735 | 0.162460f, -0.951057f, -0.262866f,//155 |
| 3736 | -0.273267f, -0.961938f, 0.000000f,//156 |
| 3737 | -0.162460f, -0.951057f, -0.262866f,//157 |
| 3738 | 0.000000f, -0.850651f, -0.525731f,//158 |
| 3739 | -0.162460f, -0.951057f, 0.262866f,//159 |
| 3740 | 0.162460f, -0.951057f, 0.262866f,//160 |
| 3741 | 0.000000f, -0.850651f, 0.525731f,//161 |
| 3742 | 0.403355f, 0.915043f, 0.000000f,//162 |
| 3743 | 0.358229f, 0.924305f, 0.131655f,//163 |
| 3744 | 0.484442f, 0.864929f, 0.131200f,//164 |
| 3745 | 0.137952f, 0.990439f, 0.000000f,//165 |
| 3746 | 0.082242f, 0.987688f, 0.133071f,//166 |
| 3747 | 0.220117f, 0.966393f, 0.132792f,//167 |
| 3748 | 0.238677f, 0.891007f, 0.386187f,//168 |
| 3749 | 0.375039f, 0.843911f, 0.383614f,//169 |
| 3750 | 0.301259f, 0.916244f, 0.264083f,//170 |
| 3751 | -0.137952f, 0.990439f, 0.000000f,//171 |
| 3752 | -0.220117f, 0.966393f, 0.132792f,//172 |
| 3753 | -0.082242f, 0.987688f, 0.133071f,//173 |
| 3754 | -0.403355f, 0.915043f, 0.000000f,//174 |
| 3755 | -0.484442f, 0.864929f, 0.131200f,//175 |
| 3756 | -0.358229f, 0.924305f, 0.131655f,//176 |
| 3757 | -0.375039f, 0.843911f, 0.383614f,//177 |
| 3758 | -0.238677f, 0.891007f, 0.386187f,//178 |
| 3759 | -0.301259f, 0.916244f, 0.264083f,//179 |
| 3760 | -0.237086f, 0.758652f, 0.606825f,//180 |
| 3761 | -0.081142f, 0.780204f, 0.620240f,//181 |
| 3762 | -0.156434f, 0.840178f, 0.519258f,//182 |
| 3763 | -0.081086f, 0.615642f, 0.783843f,//183 |
| 3764 | 0.081086f, 0.615642f, 0.783843f,//184 |
| 3765 | 0.000000f, 0.702907f, 0.711282f,//185 |
| 3766 | 0.237086f, 0.758652f, 0.606825f,//186 |
| 3767 | 0.156434f, 0.840178f, 0.519258f,//187 |
| 3768 | 0.081142f, 0.780204f, 0.620240f,//188 |
| 3769 | 0.000000f, 0.963861f, 0.266405f,//189 |
| 3770 | -0.082324f, 0.912983f, 0.399607f,//190 |
| 3771 | 0.082324f, 0.912983f, 0.399607f,//191 |
| 3772 | -0.358229f, 0.924305f, -0.131655f,//192 |
| 3773 | -0.484442f, 0.864929f, -0.131200f,//193 |
| 3774 | -0.082242f, 0.987688f, -0.133071f,//194 |
| 3775 | -0.220117f, 0.966393f, -0.132792f,//195 |
| 3776 | -0.238677f, 0.891007f, -0.386187f,//196 |
| 3777 | -0.375039f, 0.843911f, -0.383614f,//197 |
| 3778 | -0.301259f, 0.916244f, -0.264083f,//198 |
| 3779 | 0.220117f, 0.966393f, -0.132792f,//199 |
| 3780 | 0.082242f, 0.987688f, -0.133071f,//200 |
| 3781 | 0.484442f, 0.864929f, -0.131200f,//201 |
| 3782 | 0.358229f, 0.924305f, -0.131655f,//202 |
| 3783 | 0.375039f, 0.843911f, -0.383614f,//203 |
| 3784 | 0.238677f, 0.891007f, -0.386187f,//204 |
| 3785 | 0.301259f, 0.916244f, -0.264083f,//205 |
| 3786 | 0.237086f, 0.758652f, -0.606825f,//206 |
| 3787 | 0.081142f, 0.780204f, -0.620240f,//207 |
| 3788 | 0.156434f, 0.840178f, -0.519258f,//208 |
| 3789 | 0.081086f, 0.615642f, -0.783843f,//209 |
| 3790 | -0.081086f, 0.615642f, -0.783843f,//210 |
| 3791 | 0.000000f, 0.702907f, -0.711282f,//211 |
| 3792 | -0.237086f, 0.758652f, -0.606825f,//212 |
| 3793 | -0.156434f, 0.840178f, -0.519258f,//213 |
| 3794 | -0.081142f, 0.780204f, -0.620240f,//214 |
| 3795 | 0.000000f, 0.963861f, -0.266405f,//215 |
| 3796 | 0.082324f, 0.912983f, -0.399607f,//216 |
| 3797 | -0.082324f, 0.912983f, -0.399607f,//217 |
| 3798 | -0.864929f, 0.131200f, -0.484442f,//218 |
| 3799 | -0.792649f, 0.213023f, -0.571252f,//219 |
| 3800 | -0.783843f, 0.081086f, -0.615642f,//220 |
| 3801 | -0.843911f, 0.383614f, -0.375039f,//221 |
| 3802 | -0.757935f, 0.468430f, -0.453991f,//222 |
| 3803 | -0.783452f, 0.346153f, -0.516122f,//223 |
| 3804 | -0.601501f, 0.371748f, -0.707107f,//224 |
| 3805 | -0.606825f, 0.237086f, -0.758652f,//225 |
| 3806 | -0.702310f, 0.296005f, -0.647412f,//226 |
| 3807 | -0.758652f, 0.606825f, -0.237086f,//227 |
| 3808 | -0.647412f, 0.702310f, -0.296005f,//228 |
| 3809 | -0.707107f, 0.601501f, -0.371748f,//229 |
| 3810 | -0.615642f, 0.783843f, -0.081086f,//230 |
| 3811 | -0.571252f, 0.792649f, -0.213023f,//231 |
| 3812 | -0.453991f, 0.757935f, -0.468430f,//232 |
| 3813 | -0.516122f, 0.783452f, -0.346153f,//233 |
| 3814 | -0.296005f, 0.647412f, -0.702310f,//234 |
| 3815 | -0.371748f, 0.707107f, -0.601501f,//235 |
| 3816 | -0.131200f, 0.484442f, -0.864929f,//236 |
| 3817 | -0.213023f, 0.571252f, -0.792649f,//237 |
| 3818 | -0.383614f, 0.375039f, -0.843911f,//238 |
| 3819 | -0.468430f, 0.453991f, -0.757935f,//239 |
| 3820 | -0.346153f, 0.516122f, -0.783452f,//240 |
| 3821 | -0.646578f, 0.564254f, -0.513375f,//241 |
| 3822 | -0.513375f, 0.646578f, -0.564254f,//242 |
| 3823 | -0.564254f, 0.513375f, -0.646578f,//243 |
| 3824 | -0.702907f, 0.711282f, 0.000000f,//244 |
| 3825 | -0.615642f, 0.783843f, 0.081086f,//245 |
| 3826 | -0.840178f, 0.519258f, -0.156434f,//246 |
| 3827 | -0.780204f, 0.620240f, -0.081142f,//247 |
| 3828 | -0.840178f, 0.519258f, 0.156434f,//248 |
| 3829 | -0.758652f, 0.606825f, 0.237086f,//249 |
| 3830 | -0.780204f, 0.620240f, 0.081142f,//250 |
| 3831 | -0.916244f, 0.264083f, -0.301259f,//251 |
| 3832 | -0.891007f, 0.386187f, -0.238677f,//252 |
| 3833 | -0.915043f, 0.000000f, -0.403355f,//253 |
| 3834 | -0.924305f, 0.131655f, -0.358229f,//254 |
| 3835 | -0.990439f, 0.000000f, -0.137952f,//255 |
| 3836 | -0.987688f, 0.133071f, -0.082242f,//256 |
| 3837 | -0.966393f, 0.132792f, -0.220117f,//257 |
| 3838 | -0.990439f, 0.000000f, 0.137952f,//258 |
| 3839 | -0.966393f, 0.132792f, 0.220117f,//259 |
| 3840 | -0.987688f, 0.133071f, 0.082242f,//260 |
| 3841 | -0.915043f, 0.000000f, 0.403355f,//261 |
| 3842 | -0.864929f, 0.131200f, 0.484442f,//262 |
| 3843 | -0.924305f, 0.131655f, 0.358229f,//263 |
| 3844 | -0.843911f, 0.383614f, 0.375039f,//264 |
| 3845 | -0.891007f, 0.386187f, 0.238677f,//265 |
| 3846 | -0.916244f, 0.264083f, 0.301259f,//266 |
| 3847 | -0.912983f, 0.399607f, -0.082324f,//267 |
| 3848 | -0.963861f, 0.266405f, 0.000000f,//268 |
| 3849 | -0.912983f, 0.399607f, 0.082324f,//269 |
| 3850 | -0.783843f, 0.081086f, 0.615642f,//270 |
| 3851 | -0.792649f, 0.213023f, 0.571252f,//271 |
| 3852 | -0.606825f, 0.237086f, 0.758652f,//272 |
| 3853 | -0.601501f, 0.371748f, 0.707107f,//273 |
| 3854 | -0.702310f, 0.296005f, 0.647412f,//274 |
| 3855 | -0.757935f, 0.468430f, 0.453991f,//275 |
| 3856 | -0.783452f, 0.346153f, 0.516122f,//276 |
| 3857 | -0.383614f, 0.375039f, 0.843911f,//277 |
| 3858 | -0.346153f, 0.516122f, 0.783452f,//278 |
| 3859 | -0.468430f, 0.453991f, 0.757935f,//279 |
| 3860 | -0.131200f, 0.484442f, 0.864929f,//280 |
| 3861 | -0.213023f, 0.571252f, 0.792649f,//281 |
| 3862 | -0.371748f, 0.707107f, 0.601501f,//282 |
| 3863 | -0.296005f, 0.647412f, 0.702310f,//283 |
| 3864 | -0.516122f, 0.783452f, 0.346153f,//284 |
| 3865 | -0.453991f, 0.757935f, 0.468430f,//285 |
| 3866 | -0.571252f, 0.792649f, 0.213023f,//286 |
| 3867 | -0.707107f, 0.601501f, 0.371748f,//287 |
| 3868 | -0.647412f, 0.702310f, 0.296005f,//288 |
| 3869 | -0.564254f, 0.513375f, 0.646578f,//289 |
| 3870 | -0.513375f, 0.646578f, 0.564254f,//290 |
| 3871 | -0.646578f, 0.564254f, 0.513375f,//291 |
| 3872 | -0.131655f, 0.358229f, 0.924305f,//292 |
| 3873 | 0.000000f, 0.403355f, 0.915043f,//293 |
| 3874 | -0.386187f, 0.238677f, 0.891007f,//294 |
| 3875 | -0.264083f, 0.301259f, 0.916244f,//295 |
| 3876 | -0.133071f, 0.082242f, 0.987688f,//296 |
| 3877 | 0.000000f, 0.137952f, 0.990439f,//297 |
| 3878 | -0.132792f, 0.220117f, 0.966393f,//298 |
| 3879 | -0.620240f, 0.081142f, 0.780204f,//299 |
| 3880 | -0.519258f, 0.156434f, 0.840178f,//300 |
| 3881 | -0.783843f, -0.081086f, 0.615642f,//301 |
| 3882 | -0.711282f, 0.000000f, 0.702907f,//302 |
| 3883 | -0.606825f, -0.237086f, 0.758652f,//303 |
| 3884 | -0.519258f, -0.156434f, 0.840178f,//304 |
| 3885 | -0.620240f, -0.081142f, 0.780204f,//305 |
| 3886 | -0.383614f, -0.375039f, 0.843911f,//306 |
| 3887 | -0.264083f, -0.301259f, 0.916244f,//307 |
| 3888 | -0.386187f, -0.238677f, 0.891007f,//308 |
| 3889 | -0.131200f, -0.484442f, 0.864929f,//309 |
| 3890 | 0.000000f, -0.403355f, 0.915043f,//310 |
| 3891 | -0.131655f, -0.358229f, 0.924305f,//311 |
| 3892 | 0.000000f, -0.137952f, 0.990439f,//312 |
| 3893 | -0.133071f, -0.082242f, 0.987688f,//313 |
| 3894 | -0.132792f, -0.220117f, 0.966393f,//314 |
| 3895 | -0.399607f, 0.082324f, 0.912983f,//315 |
| 3896 | -0.399607f, -0.082324f, 0.912983f,//316 |
| 3897 | -0.266405f, 0.000000f, 0.963861f,//317 |
| 3898 | -0.615642f, -0.783843f, 0.081086f,//318 |
| 3899 | -0.702907f, -0.711282f, 0.000000f,//319 |
| 3900 | -0.615642f, -0.783843f, -0.081086f,//320 |
| 3901 | -0.758652f, -0.606825f, 0.237086f,//321 |
| 3902 | -0.840178f, -0.519258f, 0.156434f,//322 |
| 3903 | -0.780204f, -0.620240f, 0.081142f,//323 |
| 3904 | -0.840178f, -0.519258f, -0.156434f,//324 |
| 3905 | -0.758652f, -0.606825f, -0.237086f,//325 |
| 3906 | -0.780204f, -0.620240f, -0.081142f,//326 |
| 3907 | -0.843911f, -0.383614f, 0.375039f,//327 |
| 3908 | -0.916244f, -0.264083f, 0.301259f,//328 |
| 3909 | -0.891007f, -0.386187f, 0.238677f,//329 |
| 3910 | -0.864929f, -0.131200f, 0.484442f,//330 |
| 3911 | -0.924305f, -0.131655f, 0.358229f,//331 |
| 3912 | -0.987688f, -0.133071f, 0.082242f,//332 |
| 3913 | -0.966393f, -0.132792f, 0.220117f,//333 |
| 3914 | -0.966393f, -0.132792f, -0.220117f,//334 |
| 3915 | -0.987688f, -0.133071f, -0.082242f,//335 |
| 3916 | -0.864929f, -0.131200f, -0.484442f,//336 |
| 3917 | -0.924305f, -0.131655f, -0.358229f,//337 |
| 3918 | -0.843911f, -0.383614f, -0.375039f,//338 |
| 3919 | -0.891007f, -0.386187f, -0.238677f,//339 |
| 3920 | -0.916244f, -0.264083f, -0.301259f,//340 |
| 3921 | -0.912983f, -0.399607f, 0.082324f,//341 |
| 3922 | -0.963861f, -0.266405f, 0.000000f,//342 |
| 3923 | -0.912983f, -0.399607f, -0.082324f,//343 |
| 3924 | -0.792649f, -0.213023f, 0.571252f,//344 |
| 3925 | -0.757935f, -0.468430f, 0.453991f,//345 |
| 3926 | -0.783452f, -0.346153f, 0.516122f,//346 |
| 3927 | -0.601501f, -0.371748f, 0.707107f,//347 |
| 3928 | -0.702310f, -0.296005f, 0.647412f,//348 |
| 3929 | -0.647412f, -0.702310f, 0.296005f,//349 |
| 3930 | -0.707107f, -0.601501f, 0.371748f,//350 |
| 3931 | -0.484442f, -0.864929f, 0.131200f,//351 |
| 3932 | -0.571252f, -0.792649f, 0.213023f,//352 |
| 3933 | -0.375039f, -0.843911f, 0.383614f,//353 |
| 3934 | -0.453991f, -0.757935f, 0.468430f,//354 |
| 3935 | -0.516122f, -0.783452f, 0.346153f,//355 |
| 3936 | -0.237086f, -0.758652f, 0.606825f,//356 |
| 3937 | -0.296005f, -0.647412f, 0.702310f,//357 |
| 3938 | -0.371748f, -0.707107f, 0.601501f,//358 |
| 3939 | -0.081086f, -0.615642f, 0.783843f,//359 |
| 3940 | -0.213023f, -0.571252f, 0.792649f,//360 |
| 3941 | -0.468430f, -0.453991f, 0.757935f,//361 |
| 3942 | -0.346153f, -0.516122f, 0.783452f,//362 |
| 3943 | -0.646578f, -0.564254f, 0.513375f,//363 |
| 3944 | -0.513375f, -0.646578f, 0.564254f,//364 |
| 3945 | -0.564254f, -0.513375f, 0.646578f,//365 |
| 3946 | -0.783843f, -0.081086f, -0.615642f,//366 |
| 3947 | -0.792649f, -0.213023f, -0.571252f,//367 |
| 3948 | -0.606825f, -0.237086f, -0.758652f,//368 |
| 3949 | -0.601501f, -0.371748f, -0.707107f,//369 |
| 3950 | -0.702310f, -0.296005f, -0.647412f,//370 |
| 3951 | -0.757935f, -0.468430f, -0.453991f,//371 |
| 3952 | -0.783452f, -0.346153f, -0.516122f,//372 |
| 3953 | -0.383614f, -0.375039f, -0.843911f,//373 |
| 3954 | -0.346153f, -0.516122f, -0.783452f,//374 |
| 3955 | -0.468430f, -0.453991f, -0.757935f,//375 |
| 3956 | -0.131200f, -0.484442f, -0.864929f,//376 |
| 3957 | -0.081086f, -0.615642f, -0.783843f,//377 |
| 3958 | -0.213023f, -0.571252f, -0.792649f,//378 |
| 3959 | -0.237086f, -0.758652f, -0.606825f,//379 |
| 3960 | -0.371748f, -0.707107f, -0.601501f,//380 |
| 3961 | -0.296005f, -0.647412f, -0.702310f,//381 |
| 3962 | -0.375039f, -0.843911f, -0.383614f,//382 |
| 3963 | -0.516122f, -0.783452f, -0.346153f,//383 |
| 3964 | -0.453991f, -0.757935f, -0.468430f,//384 |
| 3965 | -0.484442f, -0.864929f, -0.131200f,//385 |
| 3966 | -0.571252f, -0.792649f, -0.213023f,//386 |
| 3967 | -0.707107f, -0.601501f, -0.371748f,//387 |
| 3968 | -0.647412f, -0.702310f, -0.296005f,//388 |
| 3969 | -0.564254f, -0.513375f, -0.646578f,//389 |
| 3970 | -0.513375f, -0.646578f, -0.564254f,//390 |
| 3971 | -0.646578f, -0.564254f, -0.513375f,//391 |
| 3972 | -0.131655f, -0.358229f, -0.924305f,//392 |
| 3973 | 0.000000f, -0.403355f, -0.915043f,//393 |
| 3974 | -0.386187f, -0.238677f, -0.891007f,//394 |
| 3975 | -0.264083f, -0.301259f, -0.916244f,//395 |
| 3976 | -0.133071f, -0.082242f, -0.987688f,//396 |
| 3977 | 0.000000f, -0.137952f, -0.990439f,//397 |
| 3978 | -0.132792f, -0.220117f, -0.966393f,//398 |
| 3979 | -0.620240f, -0.081142f, -0.780204f,//399 |
| 3980 | -0.519258f, -0.156434f, -0.840178f,//400 |
| 3981 | -0.711282f, 0.000000f, -0.702907f,//401 |
| 3982 | -0.519258f, 0.156434f, -0.840178f,//402 |
| 3983 | -0.620240f, 0.081142f, -0.780204f,//403 |
| 3984 | -0.264083f, 0.301259f, -0.916244f,//404 |
| 3985 | -0.386187f, 0.238677f, -0.891007f,//405 |
| 3986 | 0.000000f, 0.403355f, -0.915043f,//406 |
| 3987 | -0.131655f, 0.358229f, -0.924305f,//407 |
| 3988 | 0.000000f, 0.137952f, -0.990439f,//408 |
| 3989 | -0.133071f, 0.082242f, -0.987688f,//409 |
| 3990 | -0.132792f, 0.220117f, -0.966393f,//410 |
| 3991 | -0.399607f, -0.082324f, -0.912983f,//411 |
| 3992 | -0.399607f, 0.082324f, -0.912983f,//412 |
| 3993 | -0.266405f, 0.000000f, -0.963861f,//413 |
| 3994 | 0.131200f, 0.484442f, -0.864929f,//414 |
| 3995 | 0.131655f, 0.358229f, -0.924305f,//415 |
| 3996 | 0.383614f, 0.375039f, -0.843911f,//416 |
| 3997 | 0.386187f, 0.238677f, -0.891007f,//417 |
| 3998 | 0.264083f, 0.301259f, -0.916244f,//418 |
| 3999 | 0.133071f, 0.082242f, -0.987688f,//419 |
| 4000 | 0.132792f, 0.220117f, -0.966393f,//420 |
| 4001 | 0.606825f, 0.237086f, -0.758652f,//421 |
| 4002 | 0.620240f, 0.081142f, -0.780204f,//422 |
| 4003 | 0.519258f, 0.156434f, -0.840178f,//423 |
| 4004 | 0.783843f, 0.081086f, -0.615642f,//424 |
| 4005 | 0.783843f, -0.081086f, -0.615642f,//425 |
| 4006 | 0.711282f, 0.000000f, -0.702907f,//426 |
| 4007 | 0.606825f, -0.237086f, -0.758652f,//427 |
| 4008 | 0.519258f, -0.156434f, -0.840178f,//428 |
| 4009 | 0.620240f, -0.081142f, -0.780204f,//429 |
| 4010 | 0.383614f, -0.375039f, -0.843911f,//430 |
| 4011 | 0.264083f, -0.301259f, -0.916244f,//431 |
| 4012 | 0.386187f, -0.238677f, -0.891007f,//432 |
| 4013 | 0.131200f, -0.484442f, -0.864929f,//433 |
| 4014 | 0.131655f, -0.358229f, -0.924305f,//434 |
| 4015 | 0.133071f, -0.082242f, -0.987688f,//435 |
| 4016 | 0.132792f, -0.220117f, -0.966393f,//436 |
| 4017 | 0.399607f, 0.082324f, -0.912983f,//437 |
| 4018 | 0.399607f, -0.082324f, -0.912983f,//438 |
| 4019 | 0.266405f, 0.000000f, -0.963861f,//439 |
| 4020 | 0.792649f, 0.213023f, -0.571252f,//440 |
| 4021 | 0.864929f, 0.131200f, -0.484442f,//441 |
| 4022 | 0.601501f, 0.371748f, -0.707107f,//442 |
| 4023 | 0.702310f, 0.296005f, -0.647412f,//443 |
| 4024 | 0.757935f, 0.468430f, -0.453991f,//444 |
| 4025 | 0.843911f, 0.383614f, -0.375039f,//445 |
| 4026 | 0.783452f, 0.346153f, -0.516122f,//446 |
| 4027 | 0.346153f, 0.516122f, -0.783452f,//447 |
| 4028 | 0.468430f, 0.453991f, -0.757935f,//448 |
| 4029 | 0.213023f, 0.571252f, -0.792649f,//449 |
| 4030 | 0.371748f, 0.707107f, -0.601501f,//450 |
| 4031 | 0.296005f, 0.647412f, -0.702310f,//451 |
| 4032 | 0.516122f, 0.783452f, -0.346153f,//452 |
| 4033 | 0.453991f, 0.757935f, -0.468430f,//453 |
| 4034 | 0.615642f, 0.783843f, -0.081086f,//454 |
| 4035 | 0.571252f, 0.792649f, -0.213023f,//455 |
| 4036 | 0.758652f, 0.606825f, -0.237086f,//456 |
| 4037 | 0.707107f, 0.601501f, -0.371748f,//457 |
| 4038 | 0.647412f, 0.702310f, -0.296005f,//458 |
| 4039 | 0.564254f, 0.513375f, -0.646578f,//459 |
| 4040 | 0.513375f, 0.646578f, -0.564254f,//460 |
| 4041 | 0.646578f, 0.564254f, -0.513375f,//461 |
| 4042 | 0.864929f, 0.131200f, 0.484442f,//462 |
| 4043 | 0.792649f, 0.213023f, 0.571252f,//463 |
| 4044 | 0.783843f, 0.081086f, 0.615642f,//464 |
| 4045 | 0.843911f, 0.383614f, 0.375039f,//465 |
| 4046 | 0.757935f, 0.468430f, 0.453991f,//466 |
| 4047 | 0.783452f, 0.346153f, 0.516122f,//467 |
| 4048 | 0.601501f, 0.371748f, 0.707107f,//468 |
| 4049 | 0.606825f, 0.237086f, 0.758652f,//469 |
| 4050 | 0.702310f, 0.296005f, 0.647412f,//470 |
| 4051 | 0.758652f, 0.606825f, 0.237086f,//471 |
| 4052 | 0.647412f, 0.702310f, 0.296005f,//472 |
| 4053 | 0.707107f, 0.601501f, 0.371748f,//473 |
| 4054 | 0.615642f, 0.783843f, 0.081086f,//474 |
| 4055 | 0.571252f, 0.792649f, 0.213023f,//475 |
| 4056 | 0.453991f, 0.757935f, 0.468430f,//476 |
| 4057 | 0.516122f, 0.783452f, 0.346153f,//477 |
| 4058 | 0.296005f, 0.647412f, 0.702310f,//478 |
| 4059 | 0.371748f, 0.707107f, 0.601501f,//479 |
| 4060 | 0.131200f, 0.484442f, 0.864929f,//480 |
| 4061 | 0.213023f, 0.571252f, 0.792649f,//481 |
| 4062 | 0.383614f, 0.375039f, 0.843911f,//482 |
| 4063 | 0.468430f, 0.453991f, 0.757935f,//483 |
| 4064 | 0.346153f, 0.516122f, 0.783452f,//484 |
| 4065 | 0.646578f, 0.564254f, 0.513375f,//485 |
| 4066 | 0.513375f, 0.646578f, 0.564254f,//486 |
| 4067 | 0.564254f, 0.513375f, 0.646578f,//487 |
| 4068 | 0.702907f, 0.711282f, 0.000000f,//488 |
| 4069 | 0.840178f, 0.519258f, 0.156434f,//489 |
| 4070 | 0.780204f, 0.620240f, 0.081142f,//490 |
| 4071 | 0.840178f, 0.519258f, -0.156434f,//491 |
| 4072 | 0.780204f, 0.620240f, -0.081142f,//492 |
| 4073 | 0.916244f, 0.264083f, 0.301259f,//493 |
| 4074 | 0.891007f, 0.386187f, 0.238677f,//494 |
| 4075 | 0.915043f, 0.000000f, 0.403355f,//495 |
| 4076 | 0.924305f, 0.131655f, 0.358229f,//496 |
| 4077 | 0.990439f, 0.000000f, 0.137952f,//497 |
| 4078 | 0.987688f, 0.133071f, 0.082242f,//498 |
| 4079 | 0.966393f, 0.132792f, 0.220117f,//499 |
| 4080 | 0.990439f, 0.000000f, -0.137952f,//500 |
| 4081 | 0.966393f, 0.132792f, -0.220117f,//501 |
| 4082 | 0.987688f, 0.133071f, -0.082242f,//502 |
| 4083 | 0.915043f, 0.000000f, -0.403355f,//503 |
| 4084 | 0.924305f, 0.131655f, -0.358229f,//504 |
| 4085 | 0.891007f, 0.386187f, -0.238677f,//505 |
| 4086 | 0.916244f, 0.264083f, -0.301259f,//506 |
| 4087 | 0.912983f, 0.399607f, 0.082324f,//507 |
| 4088 | 0.963861f, 0.266405f, 0.000000f,//508 |
| 4089 | 0.912983f, 0.399607f, -0.082324f,//509 |
| 4090 | 0.131200f, -0.484442f, 0.864929f,//510 |
| 4091 | 0.131655f, -0.358229f, 0.924305f,//511 |
| 4092 | 0.383614f, -0.375039f, 0.843911f,//512 |
| 4093 | 0.386187f, -0.238677f, 0.891007f,//513 |
| 4094 | 0.264083f, -0.301259f, 0.916244f,//514 |
| 4095 | 0.133071f, -0.082242f, 0.987688f,//515 |
| 4096 | 0.132792f, -0.220117f, 0.966393f,//516 |
| 4097 | 0.606825f, -0.237086f, 0.758652f,//517 |
| 4098 | 0.620240f, -0.081142f, 0.780204f,//518 |
| 4099 | 0.519258f, -0.156434f, 0.840178f,//519 |
| 4100 | 0.783843f, -0.081086f, 0.615642f,//520 |
| 4101 | 0.711282f, 0.000000f, 0.702907f,//521 |
| 4102 | 0.519258f, 0.156434f, 0.840178f,//522 |
| 4103 | 0.620240f, 0.081142f, 0.780204f,//523 |
| 4104 | 0.264083f, 0.301259f, 0.916244f,//524 |
| 4105 | 0.386187f, 0.238677f, 0.891007f,//525 |
| 4106 | 0.131655f, 0.358229f, 0.924305f,//526 |
| 4107 | 0.133071f, 0.082242f, 0.987688f,//527 |
| 4108 | 0.132792f, 0.220117f, 0.966393f,//528 |
| 4109 | 0.399607f, -0.082324f, 0.912983f,//529 |
| 4110 | 0.399607f, 0.082324f, 0.912983f,//530 |
| 4111 | 0.266405f, 0.000000f, 0.963861f,//531 |
| 4112 | 0.792649f, -0.213023f, 0.571252f,//532 |
| 4113 | 0.864929f, -0.131200f, 0.484442f,//533 |
| 4114 | 0.601501f, -0.371748f, 0.707107f,//534 |
| 4115 | 0.702310f, -0.296005f, 0.647412f,//535 |
| 4116 | 0.757935f, -0.468430f, 0.453991f,//536 |
| 4117 | 0.843911f, -0.383614f, 0.375039f,//537 |
| 4118 | 0.783452f, -0.346153f, 0.516122f,//538 |
| 4119 | 0.346153f, -0.516122f, 0.783452f,//539 |
| 4120 | 0.468430f, -0.453991f, 0.757935f,//540 |
| 4121 | 0.081086f, -0.615642f, 0.783843f,//541 |
| 4122 | 0.213023f, -0.571252f, 0.792649f,//542 |
| 4123 | 0.237086f, -0.758652f, 0.606825f,//543 |
| 4124 | 0.371748f, -0.707107f, 0.601501f,//544 |
| 4125 | 0.296005f, -0.647412f, 0.702310f,//545 |
| 4126 | 0.375039f, -0.843911f, 0.383614f,//546 |
| 4127 | 0.516122f, -0.783452f, 0.346153f,//547 |
| 4128 | 0.453991f, -0.757935f, 0.468430f,//548 |
| 4129 | 0.484442f, -0.864929f, 0.131200f,//549 |
| 4130 | 0.615642f, -0.783843f, 0.081086f,//550 |
| 4131 | 0.571252f, -0.792649f, 0.213023f,//551 |
| 4132 | 0.758652f, -0.606825f, 0.237086f,//552 |
| 4133 | 0.707107f, -0.601501f, 0.371748f,//553 |
| 4134 | 0.647412f, -0.702310f, 0.296005f,//554 |
| 4135 | 0.564254f, -0.513375f, 0.646578f,//555 |
| 4136 | 0.513375f, -0.646578f, 0.564254f,//556 |
| 4137 | 0.646578f, -0.564254f, 0.513375f,//557 |
| 4138 | 0.615642f, -0.783843f, -0.081086f,//558 |
| 4139 | 0.702907f, -0.711282f, 0.000000f,//559 |
| 4140 | 0.758652f, -0.606825f, -0.237086f,//560 |
| 4141 | 0.840178f, -0.519258f, -0.156434f,//561 |
| 4142 | 0.780204f, -0.620240f, -0.081142f,//562 |
| 4143 | 0.840178f, -0.519258f, 0.156434f,//563 |
| 4144 | 0.780204f, -0.620240f, 0.081142f,//564 |
| 4145 | 0.843911f, -0.383614f, -0.375039f,//565 |
| 4146 | 0.916244f, -0.264083f, -0.301259f,//566 |
| 4147 | 0.891007f, -0.386187f, -0.238677f,//567 |
| 4148 | 0.864929f, -0.131200f, -0.484442f,//568 |
| 4149 | 0.924305f, -0.131655f, -0.358229f,//569 |
| 4150 | 0.987688f, -0.133071f, -0.082242f,//570 |
| 4151 | 0.966393f, -0.132792f, -0.220117f,//571 |
| 4152 | 0.966393f, -0.132792f, 0.220117f,//572 |
| 4153 | 0.987688f, -0.133071f, 0.082242f,//573 |
| 4154 | 0.924305f, -0.131655f, 0.358229f,//574 |
| 4155 | 0.891007f, -0.386187f, 0.238677f,//575 |
| 4156 | 0.916244f, -0.264083f, 0.301259f,//576 |
| 4157 | 0.912983f, -0.399607f, -0.082324f,//577 |
| 4158 | 0.963861f, -0.266405f, 0.000000f,//578 |
| 4159 | 0.912983f, -0.399607f, 0.082324f,//579 |
| 4160 | 0.792649f, -0.213023f, -0.571252f,//580 |
| 4161 | 0.757935f, -0.468430f, -0.453991f,//581 |
| 4162 | 0.783452f, -0.346153f, -0.516122f,//582 |
| 4163 | 0.601501f, -0.371748f, -0.707107f,//583 |
| 4164 | 0.702310f, -0.296005f, -0.647412f,//584 |
| 4165 | 0.647412f, -0.702310f, -0.296005f,//585 |
| 4166 | 0.707107f, -0.601501f, -0.371748f,//586 |
| 4167 | 0.484442f, -0.864929f, -0.131200f,//587 |
| 4168 | 0.571252f, -0.792649f, -0.213023f,//588 |
| 4169 | 0.375039f, -0.843911f, -0.383614f,//589 |
| 4170 | 0.453991f, -0.757935f, -0.468430f,//590 |
| 4171 | 0.516122f, -0.783452f, -0.346153f,//591 |
| 4172 | 0.237086f, -0.758652f, -0.606825f,//592 |
| 4173 | 0.296005f, -0.647412f, -0.702310f,//593 |
| 4174 | 0.371748f, -0.707107f, -0.601501f,//594 |
| 4175 | 0.081086f, -0.615642f, -0.783843f,//595 |
| 4176 | 0.213023f, -0.571252f, -0.792649f,//596 |
| 4177 | 0.468430f, -0.453991f, -0.757935f,//597 |
| 4178 | 0.346153f, -0.516122f, -0.783452f,//598 |
| 4179 | 0.646578f, -0.564254f, -0.513375f,//599 |
| 4180 | 0.513375f, -0.646578f, -0.564254f,//600 |
| 4181 | 0.564254f, -0.513375f, -0.646578f,//601 |
| 4182 | 0.403355f, -0.915043f, 0.000000f,//602 |
| 4183 | 0.358229f, -0.924305f, -0.131655f,//603 |
| 4184 | 0.137952f, -0.990439f, 0.000000f,//604 |
| 4185 | 0.082242f, -0.987688f, -0.133071f,//605 |
| 4186 | 0.220117f, -0.966393f, -0.132792f,//606 |
| 4187 | 0.238677f, -0.891007f, -0.386187f,//607 |
| 4188 | 0.301259f, -0.916244f, -0.264083f,//608 |
| 4189 | -0.137952f, -0.990439f, 0.000000f,//609 |
| 4190 | -0.220117f, -0.966393f, -0.132792f,//610 |
| 4191 | -0.082242f, -0.987688f, -0.133071f,//611 |
| 4192 | -0.403355f, -0.915043f, 0.000000f,//612 |
| 4193 | -0.358229f, -0.924305f, -0.131655f,//613 |
| 4194 | -0.238677f, -0.891007f, -0.386187f,//614 |
| 4195 | -0.301259f, -0.916244f, -0.264083f,//615 |
| 4196 | -0.081142f, -0.780204f, -0.620240f,//616 |
| 4197 | -0.156434f, -0.840178f, -0.519258f,//617 |
| 4198 | 0.000000f, -0.702907f, -0.711282f,//618 |
| 4199 | 0.156434f, -0.840178f, -0.519258f,//619 |
| 4200 | 0.081142f, -0.780204f, -0.620240f,//620 |
| 4201 | 0.000000f, -0.963861f, -0.266405f,//621 |
| 4202 | -0.082324f, -0.912983f, -0.399607f,//622 |
| 4203 | 0.082324f, -0.912983f, -0.399607f,//623 |
| 4204 | -0.358229f, -0.924305f, 0.131655f,//624 |
| 4205 | -0.082242f, -0.987688f, 0.133071f,//625 |
| 4206 | -0.220117f, -0.966393f, 0.132792f,//626 |
| 4207 | -0.238677f, -0.891007f, 0.386187f,//627 |
| 4208 | -0.301259f, -0.916244f, 0.264083f,//628 |
| 4209 | 0.220117f, -0.966393f, 0.132792f,//629 |
| 4210 | 0.082242f, -0.987688f, 0.133071f,//630 |
| 4211 | 0.358229f, -0.924305f, 0.131655f,//631 |
| 4212 | 0.238677f, -0.891007f, 0.386187f,//632 |
| 4213 | 0.301259f, -0.916244f, 0.264083f,//633 |
| 4214 | 0.081142f, -0.780204f, 0.620240f,//634 |
| 4215 | 0.156434f, -0.840178f, 0.519258f,//635 |
| 4216 | 0.000000f, -0.702907f, 0.711282f,//636 |
| 4217 | -0.156434f, -0.840178f, 0.519258f,//637 |
| 4218 | -0.081142f, -0.780204f, 0.620240f,//638 |
| 4219 | 0.000000f, -0.963861f, 0.266405f,//639 |
| 4220 | 0.082324f, -0.912983f, 0.399607f,//640 |
| 4221 | -0.082324f, -0.912983f, 0.399607f //641 |
| 4222 | }; |
| 4223 | glEnableClientState(GL_VERTEX_ARRAY); |
| 4224 | glVertexPointer(3, GL_FLOAT, 0, v); |
| 4225 | glEnableClientState(GL_NORMAL_ARRAY); |
| 4226 | glNormalPointer(GL_FLOAT, 0, v); |
| 4227 | switch (bal){ |
| 4228 | case 1:glDrawElements(GL_TRIANGLES, 240, GL_UNSIGNED_INT,idx1);break; |
| 4229 | case 2:glDrawElements(GL_TRIANGLES, 960, GL_UNSIGNED_INT,idx2);break; |
| 4230 | case 3:glDrawElements(GL_TRIANGLES, 3840, GL_UNSIGNED_INT,idx3);break; |
| 4231 | } |
| 4232 | glDisableClientState(GL_VERTEX_ARRAY); |
| 4233 | glDisableClientState(GL_NORMAL_ARRAY); |
| 4234 | /* |
| 4235 | GLdouble mm[16]; |
| 4236 | |
| 4237 | int stack=0; |
| 4238 | glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &stack); |
| 4239 | |
| 4240 | glGetDoublev(GL_MODELVIEW_MATRIX,mm); |
| 4241 | printf("The %dth Mmatrix is:\n%9.6f %9.6f %9.6f %9.6f\n%9.6f %9.6f %9.6f %9.6f\n%9.6f %9.6f %9.6f %9.6f\n%9.6f %9.6f %9.6f %9.6f\n", |
| 4242 | stack, |
| 4243 | mm[0],mm[1],mm[2],mm[3], |
| 4244 | mm[4],mm[5],mm[6],mm[7], |
| 4245 | mm[8],mm[9],mm[10],mm[11], |
| 4246 | mm[12],mm[13],mm[14],mm[15]);*/ |
| 4247 | } |
| 4248 | |
| 4249 | void Molecule::sphere(int adp,int style){ |
| 4250 | if (program_in_use&&(g_Program!=NULL)){ |
| 4251 | //printf("%d style %d adp %d %d %d %d %d %d\n",style,adp,lichtH,wallH,ballH,ringH,adpsH,lodH); |
| 4252 | g_Program->setUniformValue(lichtH, 1); |
| 4253 | g_Program->setUniformValue(wallH, 0); |
| 4254 | g_Program->setUniformValue(ballH, ((ATOM_STYLE_SPHERE&style))?1:0); |
| 4255 | g_Program->setUniformValue(ringH, ((ATOM_STYLE_RINGS&style))?1:0); |
| 4256 | g_Program->setUniformValue(openH, ((ATOM_STYLE_SOLID&style))?0:1); |
| 4257 | g_Program->setUniformValue(adpsH, ((ATOM_STYLE_NOADP&style))?0:1); |
| 4258 | g_Program->setUniformValue(whiteringH, (ATOM_STYLE_WHITERING&style)?1:0); |
| 4259 | g_Program->setUniformValue(fogH, mist?1:0); |
| 4260 | g_Program->setUniformValue(fograngeH, fogrange); |
| 4261 | g_Program->setUniformValue(lodH, qMin(LOD-1,3)); |
| 4262 | /* int total = -1,program_id=g_program; |
| 4263 | glGetProgramiv( program_id, GL_ACTIVE_UNIFORMS, &total ); |
| 4264 | for(int i=0; i<total; ++i) { |
| 4265 | int name_len=-1, num=-1; |
| 4266 | GLenum type = GL_ZERO; |
| 4267 | char name[100]; |
| 4268 | glGetActiveUniform( program_id, GLuint(i), sizeof(name)-1, |
| 4269 | &name_len, &num, &type, name ); |
| 4270 | const char *ts; |
| 4271 | switch (type){ |
| 4272 | case GL_FLOAT: ts="float";break; |
| 4273 | case GL_FLOAT_VEC2: ts="vec2";break; |
| 4274 | case GL_FLOAT_VEC3: ts="vec3";break; |
| 4275 | case GL_FLOAT_VEC4: ts="vec4";break; |
| 4276 | case GL_DOUBLE: ts="double";break; |
| 4277 | case GL_INT: ts="int";break; |
| 4278 | case GL_INT_VEC2: ts="ivec2";break; |
| 4279 | case GL_INT_VEC3: ts="ivec3";break; |
| 4280 | case GL_INT_VEC4: ts="ivec4";break; |
| 4281 | case GL_UNSIGNED_INT: ts="unsigned int";break; |
| 4282 | case GL_BOOL: ts="bool";break; |
| 4283 | case GL_BOOL_VEC2: ts="bvec2";break; |
| 4284 | case GL_BOOL_VEC3: ts="bvec3";break; |
| 4285 | case GL_BOOL_VEC4: ts="bvec4";break; |
| 4286 | case GL_FLOAT_MAT2: ts="mat2";break; |
| 4287 | case GL_FLOAT_MAT3: ts="mat3";break; |
| 4288 | case GL_FLOAT_MAT4: ts="mat4";break; |
| 4289 | } |
| 4290 | name[name_len] = 0; |
| 4291 | int location = glGetUniformLocation( program_id, name ); |
| 4292 | int val=-1; |
| 4293 | if ((location>=0)&&((type==GL_INT)||(type==GL_BOOL))){glGetUniformiv(program_id,location,&val); } |
| 4294 | if (location>=0)printf("%2d/%2d %-42s=%d size%d %s loc%d\n",i,total,name,val,num,ts,location); |
| 4295 | if ((0==strcmp(name,"lighting"))&&val==0) return; |
| 4296 | }*/ |
| 4297 | } |
| 4298 | if (adp) glEnable(GL_BLEND); |
| 4299 | if (dratom){ |
| 4300 | // glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); |
| 4301 | glEnable(GL_BLEND); |
| 4302 | glDisable(GL_DEPTH_TEST); |
| 4303 | if (dratom==3)glColor4d(0.4,0.8,1.0,0.3); |
| 4304 | if (dratom<3) glColor4d(1.0,1.0,0.0,0.7); |
| 4305 | if (dratom==3)triacontaeder(0.106f);//gluSphere(q,0.33,7,7); |
| 4306 | else if (dratom==5) { |
| 4307 | triacontaeder(0.618f);//gluSphere(q,1.00,7,7); |
| 4308 | //gluSphere(q,1.0,4*LOD,9*LOD); |
| 4309 | }else if (dratom==76){ |
| 4310 | triacontaeder(1.0f); |
| 4311 | } |
| 4312 | else triacontaeder(0.09f);//gluSphere(q,0.3,5,5); |
| 4313 | glEnable(GL_DEPTH_TEST); |
| 4314 | // glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); |
| 4315 | } |
| 4316 | else{ |
| 4317 | //gluSphere(q,1.0,4*LOD,9*LOD); |
| 4318 | mySphere(qMin(LOD-1,3)); |
| 4319 | glDisable(GL_BLEND); |
| 4320 | } |
| 4321 | } |
| 4322 | |
| 4323 | |
| 4324 | void Molecule::dodecaeder(GLfloat r){ |
| 4325 | if (program_in_use&&(g_Program!=NULL)){ |
| 4326 | g_Program->setUniformValue(lichtH, 1); |
| 4327 | g_Program->setUniformValue(wallH, 0); |
| 4328 | g_Program->setUniformValue(ringH, 0); |
| 4329 | g_Program->setUniformValue(openH, 0); |
| 4330 | g_Program->setUniformValue(adpsH, 0); |
| 4331 | } |
| 4332 | static const GLfloat dodev[324]={ |
| 4333 | 0.000000f, -fibom1, fibo, 1.000000f, -1.000000f, 1.000000f, fibo, 0.000000f, fibom1, |
| 4334 | 0.000000f, -fibom1, fibo, fibo, 0.000000f, fibom1, 1.000000f, 1.000000f, 1.000000f, |
| 4335 | 0.000000f, -fibom1, fibo, 1.000000f, 1.000000f, 1.000000f, 0.000000f, fibom1, fibo, |
| 4336 | 0.000000f, fibom1, fibo, -1.000000f, 1.000000f, 1.000000f, -fibo, 0.000000f, fibom1, |
| 4337 | 0.000000f, fibom1, fibo, -fibo, 0.000000f, fibom1, -1.000000f, -1.000000f, 1.000000f, |
| 4338 | 0.000000f, fibom1, fibo, -1.000000f, -1.000000f, 1.000000f, 0.000000f, -fibom1, fibo, |
| 4339 | 0.000000f, fibom1, fibo, 1.000000f, 1.000000f, 1.000000f, fibom1, fibo, 0.000000f, |
| 4340 | 0.000000f, fibom1, fibo, fibom1, fibo, 0.000000f, -fibom1, fibo, 0.000000f, |
| 4341 | 0.000000f, fibom1, fibo, -fibom1, fibo, 0.000000f, -1.000000f, 1.000000f, 1.000000f, |
| 4342 | 1.000000f, 1.000000f, 1.000000f, fibo, 0.000000f, fibom1, fibo, 0.000000f, -fibom1, |
| 4343 | 1.000000f, 1.000000f, 1.000000f, fibo, 0.000000f, -fibom1, 1.000000f, 1.000000f, -1.000000f, |
| 4344 | 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, -1.000000f, fibom1, fibo, 0.000000f, |
| 4345 | 0.000000f, -fibom1, fibo, -1.000000f, -1.000000f, 1.000000f, -fibom1, -fibo, 0.000000f, |
| 4346 | 0.000000f, -fibom1, fibo, -fibom1, -fibo, 0.000000f, fibom1, -fibo, 0.000000f, |
| 4347 | 0.000000f, -fibom1, fibo, fibom1, -fibo, 0.000000f, 1.000000f, -1.000000f, 1.000000f, |
| 4348 | -1.000000f, 1.000000f, 1.000000f, -fibom1, fibo, 0.000000f, -1.000000f, 1.000000f, -1.000000f, |
| 4349 | -1.000000f, 1.000000f, 1.000000f, -1.000000f, 1.000000f, -1.000000f, -fibo, 0.000000f, -fibom1, |
| 4350 | -1.000000f, 1.000000f, 1.000000f, -fibo, 0.000000f, -fibom1, -fibo, 0.000000f, fibom1, |
| 4351 | -1.000000f, -1.000000f, 1.000000f, -fibo, 0.000000f, fibom1, -fibo, 0.000000f, -fibom1, |
| 4352 | -1.000000f, -1.000000f, 1.000000f, -fibo, 0.000000f, -fibom1, -1.000000f, -1.000000f, -1.000000f, |
| 4353 | -1.000000f, -1.000000f, 1.000000f, -1.000000f, -1.000000f, -1.000000f, -fibom1, -fibo, 0.000000f, |
| 4354 | fibo, 0.000000f, fibom1, 1.000000f, -1.000000f, 1.000000f, fibom1, -fibo, 0.000000f, |
| 4355 | fibo, 0.000000f, fibom1, fibom1, -fibo, 0.000000f, 1.000000f, -1.000000f, -1.000000f, |
| 4356 | fibo, 0.000000f, fibom1, 1.000000f, -1.000000f, -1.000000f, fibo, 0.000000f, -fibom1, |
| 4357 | -fibom1, fibo, 0.000000f, fibom1, fibo, 0.000000f, 1.000000f, 1.000000f, -1.000000f, |
| 4358 | -fibom1, fibo, 0.000000f, 1.000000f, 1.000000f, -1.000000f, 0.000000f, fibom1, -fibo, |
| 4359 | -fibom1, fibo, 0.000000f, 0.000000f, fibom1, -fibo, -1.000000f, 1.000000f, -1.000000f, |
| 4360 | 0.000000f, fibom1, -fibo, 1.000000f, 1.000000f, -1.000000f, fibo, 0.000000f, -fibom1, |
| 4361 | 0.000000f, fibom1, -fibo, fibo, 0.000000f, -fibom1, 1.000000f, -1.000000f, -1.000000f, |
| 4362 | 0.000000f, fibom1, -fibo, 1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibom1, -fibo, |
| 4363 | -fibo, 0.000000f, -fibom1, -1.000000f, 1.000000f, -1.000000f, 0.000000f, fibom1, -fibo, |
| 4364 | -fibo, 0.000000f, -fibom1, 0.000000f, fibom1, -fibo, 0.000000f, -fibom1, -fibo, |
| 4365 | -fibo, 0.000000f, -fibom1, 0.000000f, -fibom1, -fibo, -1.000000f, -1.000000f, -1.000000f, |
| 4366 | 0.000000f, -fibom1, -fibo, 1.000000f, -1.000000f, -1.000000f, fibom1, -fibo, 0.000000f, |
| 4367 | 0.000000f, -fibom1, -fibo, fibom1, -fibo, 0.000000f, -fibom1, -fibo, 0.000000f, |
| 4368 | 0.000000f, -fibom1, -fibo, -fibom1, -fibo, 0.000000f, -1.000000f, -1.000000f, -1.000000f}; |
| 4369 | static const GLfloat doden[324]={ |
| 4370 | 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, |
| 4371 | 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, |
| 4372 | 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, |
| 4373 | -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, |
| 4374 | -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, |
| 4375 | -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, |
| 4376 | 0.000000f, 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, |
| 4377 | 0.000000f, 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, |
| 4378 | -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, |
| 4379 | 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, 0.000000f, 0.850651f, 0.525731f, 0.000000f, |
| 4380 | 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, |
| 4381 | 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, 0.850651f, 0.525731f, -0.000000f, |
| 4382 | -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, |
| 4383 | -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, |
| 4384 | -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, |
| 4385 | -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, |
| 4386 | -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, |
| 4387 | -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, |
| 4388 | -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, |
| 4389 | -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, |
| 4390 | -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, 0.000000f, -0.850651f, -0.525731f, 0.000000f, |
| 4391 | 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, 0.000000f, 0.850651f, -0.525731f, 0.000000f, |
| 4392 | 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, |
| 4393 | 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, |
| 4394 | -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, |
| 4395 | 0.000000f, 0.850651f, -0.525731f, 0.000000f, 0.850651f, -0.525731f, 0.000000f, 0.850651f, -0.525731f, |
| 4396 | -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, -0.000000f, 0.850651f, -0.525731f, |
| 4397 | 0.525731f, 0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, 0.000000f, -0.850651f, |
| 4398 | 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, |
| 4399 | 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, 0.525731f, -0.000000f, -0.850651f, |
| 4400 | -0.525731f, 0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, 0.000000f, -0.850651f, |
| 4401 | -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, |
| 4402 | -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, |
| 4403 | 0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, 0.000000f, -0.850651f, -0.525731f, |
| 4404 | -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, |
| 4405 | -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f, -0.000000f, -0.850651f, -0.525731f}; |
| 4406 | //glPushMatrix(); |
| 4407 | glScalef(r,r,r); |
| 4408 | glEnableClientState(GL_VERTEX_ARRAY); |
| 4409 | glVertexPointer(3, GL_FLOAT, 0, dodev); |
| 4410 | glEnableClientState(GL_NORMAL_ARRAY); |
| 4411 | glNormalPointer(GL_FLOAT, 0, doden); |
| 4412 | glDrawArrays(GL_TRIANGLES, 0, 108); |
| 4413 | glDisableClientState(GL_VERTEX_ARRAY); |
| 4414 | glDisableClientState(GL_NORMAL_ARRAY); |
| 4415 | //glPopMatrix(); |
| 4416 | } |
| 4417 | |
| 4418 | void Molecule::icosaeder(GLfloat r){ |
| 4419 | if (program_in_use&&(g_Program!=NULL)){ |
| 4420 | g_Program->setUniformValue(lichtH, 1); |
| 4421 | g_Program->setUniformValue(wallH, 0); |
| 4422 | g_Program->setUniformValue(ringH, 0); |
| 4423 | g_Program->setUniformValue(openH, 0); |
| 4424 | g_Program->setUniformValue(adpsH, 0); |
| 4425 | } |
| 4426 | static const GLfloat icov[180]={ |
| 4427 | 1.000000f, 0.000000f, fibo, 0.000000f, fibo, 1.000000f, -1.000000f, 0.000000f, fibo, |
| 4428 | 0.000000f, -fibo, 1.000000f, 1.000000f, 0.000000f, fibo, -1.000000f, 0.000000f, fibo, |
| 4429 | 1.000000f, 0.000000f, fibo, fibo, 1.000000f, 0.000000f, 0.000000f, fibo, 1.000000f, |
| 4430 | 1.000000f, 0.000000f, fibo, 0.000000f, -fibo, 1.000000f, fibo, -1.000000f, 0.000000f, |
| 4431 | 1.000000f, 0.000000f, fibo, fibo, -1.000000f, 0.000000f, fibo, 1.000000f, 0.000000f, |
| 4432 | -1.000000f, 0.000000f, fibo, 0.000000f, fibo, 1.000000f, -fibo, 1.000000f, 0.000000f, |
| 4433 | -1.000000f, 0.000000f, fibo, -fibo, -1.000000f, 0.000000f, 0.000000f, -fibo, 1.000000f, |
| 4434 | -1.000000f, 0.000000f, fibo, -fibo, 1.000000f, 0.000000f, -fibo, -1.000000f, 0.000000f, |
| 4435 | 0.000000f, fibo, 1.000000f, fibo, 1.000000f, 0.000000f, 0.000000f, fibo, -1.000000f, |
| 4436 | 0.000000f, fibo, 1.000000f, 0.000000f, fibo, -1.000000f, -fibo, 1.000000f, 0.000000f, |
| 4437 | 0.000000f, -fibo, 1.000000f, -fibo, -1.000000f, 0.000000f, 0.000000f, -fibo, -1.000000f, |
| 4438 | 0.000000f, -fibo, 1.000000f, 0.000000f, -fibo, -1.000000f, fibo, -1.000000f, 0.000000f, |
| 4439 | fibo, 1.000000f, 0.000000f, fibo, -1.000000f, 0.000000f, 1.000000f, 0.000000f, -fibo, |
| 4440 | fibo, 1.000000f, 0.000000f, 1.000000f, 0.000000f, -fibo, 0.000000f, fibo, -1.000000f, |
| 4441 | -fibo, 1.000000f, 0.000000f, -1.000000f, 0.000000f, -fibo, -fibo, -1.000000f, 0.000000f, |
| 4442 | -fibo, 1.000000f, 0.000000f, 0.000000f, fibo, -1.000000f, -1.000000f, 0.000000f, -fibo, |
| 4443 | -fibo, -1.000000f, 0.000000f, -1.000000f, 0.000000f, -fibo, 0.000000f, -fibo, -1.000000f, |
| 4444 | fibo, -1.000000f, 0.000000f, 0.000000f, -fibo, -1.000000f, 1.000000f, 0.000000f, -fibo, |
| 4445 | 0.000000f, fibo, -1.000000f, 1.000000f, 0.000000f, -fibo, -1.000000f, 0.000000f, -fibo, |
| 4446 | 0.000000f, -fibo, -1.000000f, -1.000000f, 0.000000f, -fibo, 1.000000f, 0.000000f, -fibo}; |
| 4447 | static const GLfloat icon[180]={ |
| 4448 | -0.000000f, 0.356822f, 0.934172f, -0.000000f, 0.356822f, 0.934172f, -0.000000f, 0.356822f, 0.934172f, |
| 4449 | 0.000000f, -0.356822f, 0.934172f, -0.000000f, -0.356822f, 0.934172f, -0.000000f, -0.356822f, 0.934172f, |
| 4450 | 0.577350f, 0.577350f, 0.577350f, 0.577350f, 0.577350f, 0.577350f, 0.577350f, 0.577350f, 0.577350f, |
| 4451 | 0.577350f, -0.577350f, 0.577350f, 0.577350f, -0.577350f, 0.577350f, 0.577350f, -0.577350f, 0.577350f, |
| 4452 | 0.934172f, -0.000000f, 0.356822f, 0.934172f, -0.000000f, 0.356822f, 0.934172f, -0.000000f, 0.356822f, |
| 4453 | -0.577350f, 0.577350f, 0.577350f, -0.577350f, 0.577350f, 0.577350f, -0.577350f, 0.577350f, 0.577350f, |
| 4454 | -0.577350f, -0.577350f, 0.577350f, -0.577350f, -0.577350f, 0.577350f, -0.577350f, -0.577350f, 0.577350f, |
| 4455 | -0.934172f, -0.000000f, 0.356822f, -0.934172f, -0.000000f, 0.356822f, -0.934172f, -0.000000f, 0.356822f, |
| 4456 | 0.356822f, 0.934172f, -0.000000f, 0.356822f, 0.934172f, -0.000000f, 0.356822f, 0.934172f, -0.000000f, |
| 4457 | -0.356822f, 0.934172f, -0.000000f, -0.356822f, 0.934172f, -0.000000f, -0.356822f, 0.934172f, -0.000000f, |
| 4458 | -0.356822f, -0.934172f, -0.000000f, -0.356822f, -0.934172f, -0.000000f, -0.356822f, -0.934172f, -0.000000f, |
| 4459 | 0.356822f, -0.934172f, -0.000000f, 0.356822f, -0.934172f, -0.000000f, 0.356822f, -0.934172f, -0.000000f, |
| 4460 | 0.934172f, -0.000000f, -0.356822f, 0.934172f, -0.000000f, -0.356822f, 0.934172f, -0.000000f, -0.356822f, |
| 4461 | 0.577350f, 0.577350f, -0.577350f, 0.577350f, 0.577350f, -0.577350f, 0.577350f, 0.577350f, -0.577350f, |
| 4462 | -0.934172f, -0.000000f, -0.356822f, -0.934172f, -0.000000f, -0.356822f, -0.934172f, -0.000000f, -0.356822f, |
| 4463 | -0.577350f, 0.577350f, -0.577350f, -0.577350f, 0.577350f, -0.577350f, -0.577350f, 0.577350f, -0.577350f, |
| 4464 | -0.577350f, -0.577350f, -0.577350f, -0.577350f, -0.577350f, -0.577350f, -0.577350f, -0.577350f, -0.577350f, |
| 4465 | 0.577350f, -0.577350f, -0.577350f, 0.577350f, -0.577350f, -0.577350f, 0.577350f, -0.577350f, -0.577350f, |
| 4466 | -0.000000f, 0.356822f, -0.934172f, -0.000000f, 0.356822f, -0.934172f, -0.000000f, 0.356822f, -0.934172f, |
| 4467 | 0.000000f, -0.356822f, -0.934172f, 0.000000f, -0.356822f, -0.934172f, 0.000000f, -0.356822f, -0.934172f}; |
| 4468 | //glPushMatrix(); |
| 4469 | glScalef(r,r,r); |
| 4470 | glEnableClientState(GL_VERTEX_ARRAY); |
| 4471 | glVertexPointer(3, GL_FLOAT, 0, icov); |
| 4472 | glEnableClientState(GL_NORMAL_ARRAY); |
| 4473 | glNormalPointer(GL_FLOAT, 0, icon); |
| 4474 | glDrawArrays(GL_TRIANGLES, 0, 60); |
| 4475 | glDisableClientState(GL_VERTEX_ARRAY); |
| 4476 | glDisableClientState(GL_NORMAL_ARRAY); |
| 4477 | //glPopMatrix(); |
| 4478 | icocnt++; |
| 4479 | } |
| 4480 | |
| 4481 | void Molecule::triacontaeder(GLfloat r){ |
| 4482 | if (program_in_use&&(g_Program!=nullptr)){ |
| 4483 | g_Program->setUniformValue(lichtH, 1); |
| 4484 | g_Program->setUniformValue(wallH, 0); |
| 4485 | g_Program->setUniformValue(ringH, 0); |
| 4486 | g_Program->setUniformValue(openH, 0); |
| 4487 | g_Program->setUniformValue(adpsH, 0); |
| 4488 | } |
| 4489 | static const GLfloat triv[540]={ |
| 4490 | 1.000000f, 0.000000f, fibo, 0.000000f, fibom1, fibo, 0.000000f, -fibom1, fibo, //9 |
| 4491 | 1.000000f, 0.000000f, fibo, 1.000000f, 1.000000f, 1.000000f, 0.000000f, fibom1, fibo, //18 |
| 4492 | 1.000000f, 0.000000f, fibo, 0.000000f, -fibom1, fibo, 1.000000f, -1.000000f, 1.000000f, //27 |
| 4493 | 1.000000f, 0.000000f, fibo, fibo, 0.000000f, fibom1, 1.000000f, 1.000000f, 1.000000f, //36 |
| 4494 | 1.000000f, 0.000000f, fibo, 1.000000f, -1.000000f, 1.000000f, fibo, 0.000000f, fibom1, //45 |
| 4495 | fibo, 0.000000f, fibom1, fibo, 0.000000f, -fibom1, fibo, 1.000000f, 0.000000f, //54 |
| 4496 | fibo, 0.000000f, fibom1, fibo, -1.000000f, 0.000000f, fibo, 0.000000f, -fibom1, //63 |
| 4497 | -fibo, 0.000000f, fibom1, -fibo, 1.000000f, 0.000000f, -fibo, 0.000000f, -fibom1, //72 |
| 4498 | -fibo, 0.000000f, fibom1, -fibo, 0.000000f, -fibom1, -fibo, -1.000000f, 0.000000f, //81 |
| 4499 | fibo, 1.000000f, 0.000000f, 1.000000f, 1.000000f, -1.000000f, fibom1, fibo, 0.000000f, //90 |
| 4500 | fibo, 1.000000f, 0.000000f, fibo, 0.000000f, -fibom1, 1.000000f, 1.000000f, -1.000000f, //99 |
| 4501 | 0.000000f, fibom1, fibo, -1.000000f, 0.000000f, fibo, 0.000000f, -fibom1, fibo, //108 |
| 4502 | 0.000000f, fibom1, fibo, -1.000000f, 1.000000f, 1.000000f, -1.000000f, 0.000000f, fibo, //117 |
| 4503 | -fibom1, fibo, 0.000000f, -1.000000f, 1.000000f, -1.000000f, -fibo, 1.000000f, 0.000000f, //126 |
| 4504 | -fibom1, fibo, 0.000000f, 0.000000f, fibo, -1.000000f, -1.000000f, 1.000000f, -1.000000f, //135 |
| 4505 | -fibo, 1.000000f, 0.000000f, -1.000000f, 1.000000f, -1.000000f, -fibo, 0.000000f, -fibom1, //144 |
| 4506 | 0.000000f, fibom1, fibo, 0.000000f, fibo, 1.000000f, -1.000000f, 1.000000f, 1.000000f, //153 |
| 4507 | -fibo, -1.000000f, 0.000000f, -1.000000f, -1.000000f, -1.000000f, -fibom1, -fibo, 0.000000f, //162 |
| 4508 | -fibo, -1.000000f, 0.000000f, -fibo, 0.000000f, -fibom1, -1.000000f, -1.000000f, -1.000000f, //171 |
| 4509 | fibom1, -fibo, 0.000000f, 1.000000f, -1.000000f, -1.000000f, fibo, -1.000000f, 0.000000f, //180 |
| 4510 | fibom1, -fibo, 0.000000f, 0.000000f, -fibo, -1.000000f, 1.000000f, -1.000000f, -1.000000f, //189 |
| 4511 | fibo, -1.000000f, 0.000000f, 1.000000f, -1.000000f, -1.000000f, fibo, 0.000000f, -fibom1, //198 |
| 4512 | 1.000000f, 1.000000f, -1.000000f, 0.000000f, fibom1, -fibo, 0.000000f, fibo, -1.000000f, //207 |
| 4513 | 1.000000f, 1.000000f, -1.000000f, 1.000000f, 0.000000f, -fibo, 0.000000f, fibom1, -fibo, //216 |
| 4514 | 0.000000f, fibo, -1.000000f, 0.000000f, fibom1, -fibo, -1.000000f, 1.000000f, -1.000000f, //225 |
| 4515 | -1.000000f, 0.000000f, fibo, -1.000000f, -1.000000f, 1.000000f, 0.000000f, -fibom1, fibo, //234 |
| 4516 | -1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibom1, -fibo, 0.000000f, -fibo, -1.000000f, //243 |
| 4517 | -1.000000f, -1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibo, 0.000000f, -fibom1, -fibo, //252 |
| 4518 | -1.000000f, 0.000000f, fibo, -1.000000f, 1.000000f, 1.000000f, -fibo, 0.000000f, fibom1, //261 |
| 4519 | 0.000000f, -fibo, -1.000000f, 0.000000f, -fibom1, -fibo, 1.000000f, -1.000000f, -1.000000f, //270 |
| 4520 | -1.000000f, 0.000000f, fibo, -fibo, 0.000000f, fibom1, -1.000000f, -1.000000f, 1.000000f, //279 |
| 4521 | 1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibom1, -fibo, 1.000000f, 0.000000f, -fibo, //288 |
| 4522 | 1.000000f, 0.000000f, -fibo, 0.000000f, -fibom1, -fibo, 0.000000f, fibom1, -fibo, //297 |
| 4523 | 0.000000f, fibom1, -fibo, 0.000000f, -fibom1, -fibo, -1.000000f, 0.000000f, -fibo, //306 |
| 4524 | 0.000000f, -fibom1, fibo, 0.000000f, -fibo, 1.000000f, 1.000000f, -1.000000f, 1.000000f, //315 |
| 4525 | 1.000000f, 1.000000f, 1.000000f, fibo, 1.000000f, 0.000000f, fibom1, fibo, 0.000000f, //324 |
| 4526 | 1.000000f, 1.000000f, 1.000000f, fibom1, fibo, 0.000000f, 0.000000f, fibo, 1.000000f, //333 |
| 4527 | 0.000000f, fibo, 1.000000f, fibom1, fibo, 0.000000f, -fibom1, fibo, 0.000000f, //342 |
| 4528 | 0.000000f, fibo, 1.000000f, -fibom1, fibo, 0.000000f, -1.000000f, 1.000000f, 1.000000f, //351 |
| 4529 | -1.000000f, -1.000000f, 1.000000f, -fibo, -1.000000f, 0.000000f, -fibom1, -fibo, 0.000000f, //360 |
| 4530 | -1.000000f, -1.000000f, 1.000000f, -fibom1, -fibo, 0.000000f, 0.000000f, -fibo, 1.000000f, //369 |
| 4531 | 0.000000f, -fibo, 1.000000f, -fibom1, -fibo, 0.000000f, fibom1, -fibo, 0.000000f, //378 |
| 4532 | 0.000000f, -fibo, 1.000000f, fibom1, -fibo, 0.000000f, 1.000000f, -1.000000f, 1.000000f, //387 |
| 4533 | fibom1, fibo, 0.000000f, 0.000000f, fibo, -1.000000f, -fibom1, fibo, 0.000000f, //396 |
| 4534 | -fibom1, -fibo, 0.000000f, 0.000000f, -fibo, -1.000000f, fibom1, -fibo, 0.000000f, //405 |
| 4535 | fibom1, fibo, 0.000000f, 1.000000f, 1.000000f, -1.000000f, 0.000000f, fibo, -1.000000f, //414 |
| 4536 | 0.000000f, fibom1, fibo, 1.000000f, 1.000000f, 1.000000f, 0.000000f, fibo, 1.000000f, //423 |
| 4537 | -fibom1, -fibo, 0.000000f, -1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibo, -1.000000f, //432 |
| 4538 | fibo, 0.000000f, -fibom1, 1.000000f, 0.000000f, -fibo, 1.000000f, 1.000000f, -1.000000f, //441 |
| 4539 | fibo, 0.000000f, -fibom1, 1.000000f, -1.000000f, -1.000000f, 1.000000f, 0.000000f, -fibo, //450 |
| 4540 | -fibo, 0.000000f, -fibom1, -1.000000f, 1.000000f, -1.000000f, -1.000000f, 0.000000f, -fibo, //459 |
| 4541 | -fibo, 0.000000f, -fibom1, -1.000000f, 0.000000f, -fibo, -1.000000f, -1.000000f, -1.000000f, //468 |
| 4542 | -1.000000f, 1.000000f, -1.000000f, 0.000000f, fibom1, -fibo, -1.000000f, 0.000000f, -fibo, //477 |
| 4543 | 0.000000f, -fibom1, fibo, -1.000000f, -1.000000f, 1.000000f, 0.000000f, -fibo, 1.000000f, //486 |
| 4544 | 1.000000f, 1.000000f, 1.000000f, fibo, 0.000000f, fibom1, fibo, 1.000000f, 0.000000f, //495 |
| 4545 | -1.000000f, 1.000000f, 1.000000f, -fibo, 1.000000f, 0.000000f, -fibo, 0.000000f, fibom1, //504 |
| 4546 | -1.000000f, 1.000000f, 1.000000f, -fibom1, fibo, 0.000000f, -fibo, 1.000000f, 0.000000f, //513 |
| 4547 | -1.000000f, -1.000000f, 1.000000f, -fibo, 0.000000f, fibom1, -fibo, -1.000000f, 0.000000f, //522 |
| 4548 | 1.000000f, -1.000000f, 1.000000f, fibo, -1.000000f, 0.000000f, fibo, 0.000000f, fibom1, //531 |
| 4549 | 1.000000f, -1.000000f, 1.000000f, fibom1, -fibo, 0.000000f, fibo, -1.000000f, 0.000000f}; //540 |
| 4550 | static const GLfloat trin[540]={ |
| 4551 | -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, |
| 4552 | 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, |
| 4553 | 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, |
| 4554 | 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, |
| 4555 | 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, |
| 4556 | 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, |
| 4557 | 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, |
| 4558 | -1.000000f, -0.000000f, -0.000000f, -1.000000f, -0.000000f, -0.000000f, -1.000000f, -0.000000f, -0.000000f, |
| 4559 | -1.000000f, -0.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, |
| 4560 | 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, |
| 4561 | 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, |
| 4562 | -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, |
| 4563 | -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, |
| 4564 | -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, |
| 4565 | -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, |
| 4566 | -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, |
| 4567 | -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, |
| 4568 | -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, |
| 4569 | -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, |
| 4570 | 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, |
| 4571 | 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, |
| 4572 | 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, |
| 4573 | 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, |
| 4574 | 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, |
| 4575 | -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, |
| 4576 | -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, |
| 4577 | -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, |
| 4578 | -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, |
| 4579 | -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, |
| 4580 | 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, |
| 4581 | -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, |
| 4582 | 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, |
| 4583 | -0.000000f, -0.000000f, -1.000000f, -0.000000f, -0.000000f, -1.000000f, -0.000000f, -0.000000f, -1.000000f, |
| 4584 | -0.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, |
| 4585 | 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, |
| 4586 | 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, |
| 4587 | 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, |
| 4588 | -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, |
| 4589 | -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, |
| 4590 | -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, |
| 4591 | -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, |
| 4592 | -0.000000f, -1.000000f, -0.000000f, -0.000000f, -1.000000f, -0.000000f, -0.000000f, -1.000000f, -0.000000f, |
| 4593 | 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, |
| 4594 | -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, -0.000000f, 1.000000f, -0.000000f, |
| 4595 | -0.000000f, -1.000000f, 0.000000f, -0.000000f, -1.000000f, 0.000000f, -0.000000f, -1.000000f, 0.000000f, |
| 4596 | 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, |
| 4597 | 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, |
| 4598 | -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, |
| 4599 | 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, |
| 4600 | 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, |
| 4601 | -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, -0.809017f, 0.309017f, -0.500000f, |
| 4602 | -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, |
| 4603 | -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, |
| 4604 | -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, |
| 4605 | 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, |
| 4606 | -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, |
| 4607 | -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, |
| 4608 | -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, |
| 4609 | 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, 0.809017f, -0.309017f, 0.500000f, |
| 4610 | 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f}; |
| 4611 | //glPushMatrix(); |
| 4612 | glEnable(GL_CULL_FACE); |
| 4613 | glScalef(r,r,r); |
| 4614 | glEnableClientState(GL_VERTEX_ARRAY); |
| 4615 | glVertexPointer(3, GL_FLOAT, 0, triv); |
| 4616 | glEnableClientState(GL_NORMAL_ARRAY); |
| 4617 | glNormalPointer(GL_FLOAT, 0, trin); |
| 4618 | glDrawArrays(GL_TRIANGLES, 0, 180); |
| 4619 | glDisableClientState(GL_VERTEX_ARRAY); |
| 4620 | glDisableClientState(GL_NORMAL_ARRAY); |
| 4621 | glDisable(GL_CULL_FACE); |
| 4622 | |
| 4623 | |
| 4624 | |
| 4625 | } |
| 4626 | |
| 4627 | void Molecule::cube(GLfloat r){ |
| 4628 | if (program_in_use&&(g_Program!=nullptr)){ |
| 4629 | g_Program->setUniformValue(lichtH, 1); |
| 4630 | g_Program->setUniformValue(wallH, 0); |
| 4631 | g_Program->setUniformValue(ringH, 0); |
| 4632 | g_Program->setUniformValue(openH, 0); |
| 4633 | g_Program->setUniformValue(adpsH, 0); |
| 4634 | } |
| 4635 | static const GLfloat cubv[108]={ |
| 4636 | -fibom1, -fibo, 0.000000f, -fibo, 0.000000f, -fibom1, 0.000000f, fibom1, -fibo, |
| 4637 | -fibom1, -fibo, 0.000000f, 0.000000f, fibom1, -fibo, 1.000000f, -1.000000f, -1.000000f, |
| 4638 | -1.000000f, 1.000000f, 1.000000f, fibom1, fibo, 0.000000f, 0.000000f, fibom1, -fibo, |
| 4639 | -1.000000f, 1.000000f, 1.000000f, 0.000000f, fibom1, -fibo, -fibo, 0.000000f, -fibom1, |
| 4640 | -1.000000f, 1.000000f, 1.000000f, -fibom1, -fibo, 0.000000f, 0.000000f, -fibom1, fibo, |
| 4641 | -1.000000f, 1.000000f, 1.000000f, -fibo, 0.000000f, -fibom1, -fibom1, -fibo, 0.000000f, |
| 4642 | -1.000000f, 1.000000f, 1.000000f, fibo, 0.000000f, fibom1, fibom1, fibo, 0.000000f, |
| 4643 | -1.000000f, 1.000000f, 1.000000f, 0.000000f, -fibom1, fibo, fibo, 0.000000f, fibom1, |
| 4644 | 0.000000f, -fibom1, fibo, 1.000000f, -1.000000f, -1.000000f, fibo, 0.000000f, fibom1, |
| 4645 | 0.000000f, -fibom1, fibo, -fibom1, -fibo, 0.000000f, 1.000000f, -1.000000f, -1.000000f, |
| 4646 | fibo, 0.000000f, fibom1, 0.000000f, fibom1, -fibo, fibom1, fibo, 0.000000f, |
| 4647 | fibo, 0.000000f, fibom1, 1.000000f, -1.000000f, -1.000000f, 0.000000f, fibom1, -fibo}; |
| 4648 | static const GLfloat cubn[108]={ |
| 4649 | -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, |
| 4650 | -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, -0.309017f, -0.500000f, -0.809017f, |
| 4651 | -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, |
| 4652 | -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, -0.500000f, 0.809017f, -0.309017f, |
| 4653 | -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, |
| 4654 | -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, -0.809017f, -0.309017f, 0.500000f, |
| 4655 | 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, |
| 4656 | 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, 0.309017f, 0.500000f, 0.809017f, |
| 4657 | 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, |
| 4658 | 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, 0.500000f, -0.809017f, 0.309017f, |
| 4659 | 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, |
| 4660 | 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f, 0.809017f, 0.309017f, -0.500000f}; |
| 4661 | //glPushMatrix(); |
| 4662 | glScalef(r,r,r); |
| 4663 | glEnableClientState(GL_VERTEX_ARRAY); |
| 4664 | glVertexPointer(3, GL_FLOAT, 0, cubv); |
| 4665 | glEnableClientState(GL_NORMAL_ARRAY); |
| 4666 | glNormalPointer(GL_FLOAT, 0, cubn); |
| 4667 | glDrawArrays(GL_TRIANGLES, 0, 36); |
| 4668 | glDisableClientState(GL_VERTEX_ARRAY); |
| 4669 | glDisableClientState(GL_NORMAL_ARRAY); |
| 4670 | //glPopMatrix(); |
| 4671 | } |
| 4672 | |
| 4673 | double Molecule::dieder(V3 a,V3 b, V3 c){ |
| 4674 | |
| 4675 | static double erg; |
| 4676 | double A[3],B[3],sig; |
| 4677 | sig=a.x*b.y*c.z - a.z*b.y*c.x + |
| 4678 | a.z*b.x*c.y - a.x*b.z*c.y + |
| 4679 | a.y*b.z*c.x - a.y*b.x*c.z; |
| 4680 | |
| 4681 | A[0]= a.y*b.z - a.z*b.y; |
| 4682 | A[1]=-a.x*b.z + a.z*b.x; |
| 4683 | A[2]= a.x*b.y - a.y*b.x; |
| 4684 | |
| 4685 | B[0]=-b.y*c.z + b.z*c.y; |
| 4686 | B[1]= b.x*c.z - b.z*c.x; |
| 4687 | B[2]=-b.x*c.y + b.y*c.x; |
| 4688 | // printf("A%f B%f\n",sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2]),sqrt(B[0]*B[0]+B[1]*B[1]+B[2]*B[2])); |
| 4689 | erg=(A[0]*B[0]+A[1]*B[1]+A[2]*B[2])/(sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])*sqrt(B[0]*B[0]+B[1]*B[1]+B[2]*B[2])); |
| 4690 | erg=acos(erg)/M_PI*180.0f; |
| 4691 | return (sig>0)?(erg):(-erg); |
| 4692 | } |
| 4693 | |
| 4694 | double Molecule::winkel(V3 a,V3 b){ |
| 4695 | |
| 4696 | static double erg; |
| 4697 | if ((Norm(a)<0.001)||(Norm(b)<0.001)) return 0; |
| 4698 | erg= a*b /(sqrt(Norm(a))*sqrt(Norm(b))); |
| 4699 | // erg=(a.x*b.x+a.y*b.y+a.z*b.z)/(sqrt(a.x*a.x+a.y*a.y+a.z*a.z)*sqrt(b.x*b.x+b.y*b.y+b.z*b.z)); |
| 4700 | erg=acos(erg)/M_PI*180.0; |
| 4701 | return(erg); |
| 4702 | } |
| 4703 | |
| 4704 | V3 Molecule::kreuzX(double x1,double y1,double z1,double x2,double y2,double z2) { |
| 4705 | |
| 4706 | static V3 erg; |
| 4707 | erg.x=-y1*z2+z1*y2; |
| 4708 | erg.y=-z1*x2+x1*z2; |
| 4709 | erg.z=-x1*y2+y1*x2; |
| 4710 | return(erg); |
| 4711 | } |
| 4712 | |
| 4713 | bool Molecule::decodeSymmCard(QString symmCard){ |
| 4714 | /*! decodes a symmetry card like 'SYMM -X, 1/2+Y, -Z' and feeds cell.symmops and cell.trans lists. |
| 4715 | * @param symmCard like 'SYMM -X, 1/2+Y, -Z'. |
| 4716 | * \returns true on sucess. |
| 4717 | * */ |
| 4718 | QString sc=symmCard.toUpper().remove("SYMM").trimmed(); |
| 4719 | sc=sc.remove("'"); |
| 4720 | sc=sc.remove(" "); |
| 4721 | QStringList axe=sc.split(","); |
| 4722 | QStringList bruch; |
| 4723 | if (axe.size()!=3) return false; |
| 4724 | double sx[3],sy[3],sz[3],t[3]; |
| 4725 | for (int i=0; i<3; i++){ |
| 4726 | sx[i]=0;sy[i]=0;sz[i]=0;t[i]=0; |
| 4727 | if (axe.at(i).contains("-X")) {sx[i]=-1.0;axe[i].remove("-X");} |
| 4728 | else if (axe.at(i).contains("X")) {sx[i]=1.0;axe[i].remove("X");} |
| 4729 | if (axe.at(i).contains("-Y")) {sy[i]=-1.0;axe[i].remove("-Y");} |
| 4730 | else if (axe.at(i).contains("Y")) {sy[i]=1.0;axe[i].remove("Y");} |
| 4731 | if (axe.at(i).contains("-Z")) {sz[i]=-1.0;axe[i].remove("-Z");} |
| 4732 | else if (axe.at(i).contains("Z")) {sz[i]=1.0;axe[i].remove("Z");} |
| 4733 | if (axe.at(i).endsWith("+")) axe[i].remove("+"); |
| 4734 | if (axe.at(i).contains("/")) { |
| 4735 | bruch=axe.at(i).split("/"); |
| 4736 | if (bruch.size()==2) t[i]=bruch.at(0).toDouble() / bruch.at(1).toDouble(); |
| 4737 | } |
| 4738 | else if (!axe.at(i).isEmpty()) t[i]=axe.at(i).toDouble(); |
| 4739 | } |
| 4740 | Matrix sm = Matrix(sx[0],sy[0],sz[0], sx[1],sy[1],sz[1], sx[2],sy[2],sz[2]); |
| 4741 | |
| 4742 | cell.symmops.append(sm); |
| 4743 | cell.trans.append(V3(t[0],t[1],t[2])); |
| 4744 | return true; |
| 4745 | } |
| 4746 | |
| 4747 | bool Molecule::decodeSymmCardEQIV(QString symmCard){ |
| 4748 | /*! decodes a symmetry card like 'SYMM -X, 1/2+Y, -Z' and feeds Molecule.symmopsEQIV, Molecule.transEQIV and Molecule.labelEQIV. |
| 4749 | * \returns true on success. |
| 4750 | * @param symmCard like 'SYMM -X, 1/2+Y, -Z'. |
| 4751 | */ |
| 4752 | QString sc=symmCard.toUpper().remove("EQIV").trimmed(); |
| 4753 | labelEQIV.append(sc.section(' ',0,0)); |
| 4754 | sc.remove(labelEQIV.last()); |
| 4755 | sc=sc.remove("'"); |
| 4756 | sc=sc.remove(" "); |
| 4757 | QStringList axe=sc.split(","); |
| 4758 | QStringList bruch; |
| 4759 | if (axe.size()!=3) return false; |
| 4760 | double sx[3],sy[3],sz[3],t[3]; |
| 4761 | for (int i=0; i<3; i++){ |
| 4762 | sx[i]=0;sy[i]=0;sz[i]=0;t[i]=0; |
| 4763 | if (axe.at(i).contains("-X")) {sx[i]=-1.0;axe[i].remove("-X");} |
| 4764 | else if (axe.at(i).contains("X")) {sx[i]=1.0;axe[i].remove("X");} |
| 4765 | if (axe.at(i).contains("-Y")) {sy[i]=-1.0;axe[i].remove("-Y");} |
| 4766 | else if (axe.at(i).contains("Y")) {sy[i]=1.0;axe[i].remove("Y");} |
| 4767 | if (axe.at(i).contains("-Z")) {sz[i]=-1.0;axe[i].remove("-Z");} |
| 4768 | else if (axe.at(i).contains("Z")) {sz[i]=1.0;axe[i].remove("Z");} |
| 4769 | if (axe.at(i).endsWith("+")) axe[i].remove("+"); |
| 4770 | if (axe.at(i).contains("/")) { |
| 4771 | bruch=axe.at(i).split("/"); |
| 4772 | if (bruch.size()==2) t[i]=bruch.at(0).toDouble() / bruch.at(1).toDouble(); |
| 4773 | } |
| 4774 | else if (!axe.at(i).isEmpty()) t[i]=axe.at(i).toDouble(); |
| 4775 | } |
| 4776 | Matrix sm = Matrix(sx[0],sy[0],sz[0], sx[1],sy[1],sz[1], sx[2],sy[2],sz[2]); |
| 4777 | symmopsEQIV.append(sm); |
| 4778 | transEQIV.append(V3(t[0],t[1],t[2])); |
| 4779 | // qDebug()<<sx[0]<<sy[0]<<sz[0]<< sx[1]<<sy[1]<<sz[1]<< sx[2]<<sy[2]<<sz[2]<<t[0]<<t[1]<<t[2]; |
| 4780 | return true; |
| 4781 | } |
| 4782 | |
| 4783 | QString Molecule::symmCard2Code(QString symmCard){ |
| 4784 | /*! Creates a internal symmetry code from a human readable symmetry card. |
| 4785 | * @param symmCard human readable symmetry card like "-X, 1/2+Y, -Z" |
| 4786 | * \returns internal symmetry code like 'n_555:1' |
| 4787 | */ |
| 4788 | QString sc=symmCard.toUpper().trimmed(); |
| 4789 | sc=sc.remove("'"); |
| 4790 | sc=sc.remove(" "); |
| 4791 | QStringList axe=sc.split(","); |
| 4792 | QStringList bruch; |
| 4793 | if (axe.size()!=3) return ""; |
| 4794 | double sx[3],sy[3],sz[3],t[3]; |
| 4795 | for (int i=0; i<3; i++){ |
| 4796 | sx[i]=0;sy[i]=0;sz[i]=0;t[i]=0; |
| 4797 | if (axe.at(i).contains("-X")) {sx[i]=-1.0;axe[i].remove("-X");} |
| 4798 | else if (axe.at(i).contains("X")) {sx[i]=1.0;axe[i].remove("X");} |
| 4799 | if (axe.at(i).contains("-Y")) {sy[i]=-1.0;axe[i].remove("-Y");} |
| 4800 | else if (axe.at(i).contains("Y")) {sy[i]=1.0;axe[i].remove("Y");} |
| 4801 | if (axe.at(i).contains("-Z")) {sz[i]=-1.0;axe[i].remove("-Z");} |
| 4802 | else if (axe.at(i).contains("Z")) {sz[i]=1.0;axe[i].remove("Z");} |
| 4803 | if (axe.at(i).endsWith("+")) axe[i].remove("+"); |
| 4804 | if (axe.at(i).contains("/")) { |
| 4805 | bruch=axe.at(i).split("/"); |
| 4806 | if (bruch.size()==2) t[i]=bruch.at(0).toDouble() / bruch.at(1).toDouble(); |
| 4807 | } |
| 4808 | else if (!axe.at(i).isEmpty()) t[i]=axe.at(i).toDouble(); |
| 4809 | } |
| 4810 | Matrix sm = Matrix(sx[0],sy[0],sz[0], sx[1],sy[1],sz[1], sx[2],sy[2],sz[2]); |
| 4811 | if (!cell.symmops.contains(sm)) return ""; |
| 4812 | V3 r; |
| 4813 | r.x=fmod(t[0]+10,1.0); |
| 4814 | r.y=fmod(t[1]+10,1.0); |
| 4815 | r.z=fmod(t[2]+10,1.0); |
| 4816 | for (int i=0; i<cell.symmops.size();i++){ |
| 4817 | if ((cell.symmops.at(i)==sm)&&(cell.trans.at(i)==r)){ |
| 4818 | QString ss=QString("%1_%2%3%4:1,") |
| 4819 | .arg(i+1) |
| 4820 | .arg((int)(t[0]-r.x) +5) |
| 4821 | .arg((int)(t[1]-r.y) +5) |
| 4822 | .arg((int)(t[2]-r.z) +5); |
| 4823 | return ss; |
| 4824 | } |
| 4825 | } |
| 4826 | return ""; |
| 4827 | } |
| 4828 | |
| 4829 | double Molecule::shortestDistance(QString sc){ |
| 4830 | /*! computes the shortest distance for the given internal symmetry code. |
| 4831 | */ |
| 4832 | double erg=100000; |
| 4833 | V3 frac; |
| 4834 | int s,h,k,l,symmgroup; |
| 4835 | sscanf(sc.toLatin1(),"%d_%1d%1d%1d:%d",&s,&h,&k,&l,&symmgroup); |
| 4836 | //printf("BS:!%s! %d h%d k%d l%d sg%d\n",brauchSymm.at(j).toStdString().c_str(),s,h,k,l,symmgroup); |
| 4837 | h-=5; |
| 4838 | k-=5; |
| 4839 | l-=5; |
| 4840 | s--; |
| 4841 | for (int i=0;i<asymm.size();i++){ |
| 4842 | if ((asymm[i].molindex==symmgroup)&&(asymm[i].an>-1)){ |
| 4843 | frac=cell.symmops.at(s)*asymm[i].frac+cell.trans.at(s)+V3(h,k,l); |
| 4844 | for (int j=0;j<asymm.size();j++){ |
| 4845 | if (asymm.at(j).an<0)continue; |
| 4846 | erg=qMin(erg,fl(frac.x-asymm.at(j).frac.x,frac.y-asymm.at(j).frac.y,frac.z-asymm.at(j).frac.z)); |
| 4847 | } |
| 4848 | } |
| 4849 | } |
| 4850 | return erg; |
| 4851 | } |
| 4852 | |
| 4853 | int commonFaces(Vert a,Vert b, int f[2]){ |
| 4854 | int matches=0; |
| 4855 | for (int i=0; i<3; i++) |
| 4856 | for (int j=0; j<3; j++) |
| 4857 | if (a.faces[i]==b.faces[j])f[matches++]=a.faces[i]; |
| 4858 | return matches; |
| 4859 | } |
| 4860 | |
| 4861 | void Molecule::voronoij(CEnvironment au, int intat){ |
| 4862 | double dk,range=5.0; |
| 4863 | voroMsg.clear(); |
| 4864 | voroMsg.append("<b>Voronoi:</b><br>"); |
| 4865 | //QTime speedTest; |
| 4866 | //speedTest.start(); |
| 4867 | vtriangles.clear(); |
| 4868 | VPoly triangle; |
| 4869 | vorobas=1; |
| 4870 | V3 prime,dp,D,floorD; |
| 4871 | QList<SdmItem> sdm; |
| 4872 | SdmItem sdmItem; |
| 4873 | sdmItem.a1=0; |
| 4874 | sdmItem.a2=1; |
| 4875 | sdmItem.sn=0; |
| 4876 | //sdmItem.p1=sdmItem.p2=V3(0,0,0); |
| 4877 | for (int i=0; i<au.size(); i++){ |
| 4878 | for (int j=0; j<au.size(); j++ ){ |
| 4879 | if ((au.at(i).sg)||(au.at(j).sg)) continue; |
| 4880 | // bool hma=false; |
| 4881 | for (int n=0;n<cell.symmops.size(); n++){ |
| 4882 | prime=cell.symmops.at(n) * au.at(i).frac + cell.trans.at(n); |
| 4883 | D=prime - au.at(j).frac+ V3(0.5,0.5,0.5) ; |
| 4884 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 4885 | for (int h=-1; h<2; h++){ |
| 4886 | for (int k=-1; k<2; k++){ |
| 4887 | for (int l=-1; l<2; l++){ |
| 4888 | V3 fD=floorD+V3(h,k,l); |
| 4889 | dp=D - fD - V3(0.5,0.5,0.5); |
| 4890 | dk=fl(dp.x,dp.y,dp.z); |
| 4891 | if ((dk>0.01)&&((range)>=dk)){ |
| 4892 | sdmItem.d=dk; |
| 4893 | sdmItem.floorD=fD; |
| 4894 | sdmItem.a1=i; |
| 4895 | sdmItem.a2=j; |
| 4896 | sdmItem.sn=n; |
| 4897 | sdm.append(sdmItem); |
| 4898 | } |
| 4899 | } |
| 4900 | } |
| 4901 | } |
| 4902 | } |
| 4903 | } |
| 4904 | } |
| 4905 | #if (QT_VERSION >= 0x050000) |
| 4906 | std::sort(sdm.begin(),sdm.end()); |
| 4907 | #else |
| 4908 | qSort(sdm.begin(),sdm.end()); |
| 4909 | #endif |
| 4910 | //SDMprint(sdm,au); |
| 4911 | QList<V3> n,m,doneLine; |
| 4912 | QList<int> intra, altcol; |
| 4913 | QList<Vert> v; |
| 4914 | Vert vert; |
| 4915 | V3 pf,pc,mx,nx,of,oc; |
| 4916 | Matrix mat; |
| 4917 | double vol=0.0,avol,tvol; |
| 4918 | for (int i=(intat>-1)?intat:0; i<au.size(); i++){ |
| 4919 | if (au.at(i).an<0) continue; |
| 4920 | //find faces |
| 4921 | n.clear(); |
| 4922 | m.clear(); |
| 4923 | v.clear(); |
| 4924 | doneLine.clear(); |
| 4925 | intra.clear(); |
| 4926 | avol=0.0; |
| 4927 | int faci=0; |
| 4928 | //int vcnt=0; |
| 4929 | frac2kart(au.at(i).frac,oc); |
| 4930 | int tris=0; |
| 4931 | for (int j=0; j<sdm.size();j++){ |
| 4932 | if(sdm.at(j).d<0.1) continue; |
| 4933 | if ((sdm.at(j).a2==i)&&(au[sdm.at(j).a1].an>-1)) { |
| 4934 | pf = cell.symmops.at(sdm.at(j).sn) * au[sdm.at(j).a1].frac + cell.trans.at(sdm.at(j).sn) - sdm.at(j).floorD; |
| 4935 | frac2kart(pf,pc); |
| 4936 | /* |
| 4937 | printf("%9.5f %9.5f %9.5f %9.5f %9.5f %9.5f\n" |
| 4938 | ,oc.x |
| 4939 | ,oc.y |
| 4940 | ,oc.z |
| 4941 | ,pc.x |
| 4942 | ,pc.y |
| 4943 | ,pc.z |
| 4944 | );// */ |
| 4945 | mx =0.5*(oc+pc); |
| 4946 | nx = Normalize(pc-oc); |
| 4947 | bool exists = false; |
| 4948 | double dpl; |
| 4949 | for (int tp=0; tp<m.size(); tp++){ |
| 4950 | dpl=n.at(tp)*(mx-m.at(tp)); |
| 4951 | if (fabs(dpl)<0.001){exists=true;break;} |
| 4952 | } |
| 4953 | if (!exists){ |
| 4954 | m.append(mx); |
| 4955 | n.append(nx); |
| 4956 | intra.append((sdm.at(j).sn==0)&&(Norm(sdm.at(j).floorD)==0.0)); |
| 4957 | if (intat>-1)altcol.append(au[sdm.at(j).a1].an); |
| 4958 | } |
| 4959 | }//is neighbour of i |
| 4960 | }// j sdm |
| 4961 | for (int h=0; h<n.size()-2; h++) |
| 4962 | for (int k=h+1; k<n.size()-1; k++) |
| 4963 | for (int l=k+1; l<n.size(); l++){ |
| 4964 | mat=Matrix(n.at(h),n.at(k),n.at(l)); |
| 4965 | double d=determinant(mat),dpl; |
| 4966 | //printf("%d,%d,%d %9.5f\n",h,k,l,d); |
| 4967 | if (fabs(d)<0.0002) continue; |
| 4968 | |
| 4969 | //p = (dot(p1,n1)*cross(n2,n3)-dot(p2,n2)*cross(n1,n3)+dot(p3,n3)*cross(n1,n2))/d |
| 4970 | bool out=false; |
| 4971 | vert.pos=( |
| 4972 | (m.at(h)*n.at(h))*(n.at(k)%n.at(l))+ |
| 4973 | (m.at(k)*n.at(k))*(n.at(l)%n.at(h))+ |
| 4974 | (m.at(l)*n.at(l))*(n.at(h)%n.at(k)))*(1.0/d); |
| 4975 | vert.faces[0]=h; |
| 4976 | vert.faces[1]=k; |
| 4977 | vert.faces[2]=l; |
| 4978 | for (int pli=0; pli<n.size(); pli++){//teste lage zu allen ebenen |
| 4979 | dpl=n.at(pli)*(vert.pos-m.at(pli)); |
| 4980 | if (dpl>0.00001) { |
| 4981 | out=true; |
| 4982 | break; |
| 4983 | } |
| 4984 | } |
| 4985 | if (!out) { |
| 4986 | v.append(vert); |
| 4987 | // printf("[%d,%d,%d] %9.5f%9.5f%9.5f \n",h,k,l,vert.pos.x,vert.pos.y,vert.pos.z); |
| 4988 | } |
| 4989 | } |
| 4990 | for (int mi=0; mi<m.size();mi++){// this is to get the midpoint of a face in its actual center |
| 4991 | V3 mnew=V3(0,0,0); |
| 4992 | int poli=0; |
| 4993 | for (int vi=0; vi<v.size(); vi++){ |
| 4994 | if ((v.at(vi).faces[0]==mi)||(v.at(vi).faces[1]==mi)||(v.at(vi).faces[2]==mi)){ |
| 4995 | mnew+=v.at(vi).pos; |
| 4996 | poli++; |
| 4997 | } |
| 4998 | } |
| 4999 | mnew*=1.0/poli; |
| 5000 | // printf("%dsoll 0=%f\n",poli,n.at(mi)*(mnew-m.at(mi))); |
| 5001 | if (poli) {m[mi]=mnew;faci++;} |
| 5002 | } |
| 5003 | /* glBegin(GL_LINES); |
| 5004 | for(int vi=0; vi<v.size()-1; vi++) |
| 5005 | for(int vj=vi+1; vj<v.size(); vj++){ |
| 5006 | int fc[2]; |
| 5007 | if (commonFaces(v.at(vi),v.at(vj),fc)==2){ |
| 5008 | glColor4fv(Acol[au[i].an]); |
| 5009 | glVertex3d(v.at(vi).pos.x,v.at(vi).pos.y,v.at(vi).pos.z); |
| 5010 | glVertex3d(v.at(vj).pos.x,v.at(vj).pos.y,v.at(vj).pos.z); |
| 5011 | } |
| 5012 | } |
| 5013 | glEnd();*/ |
| 5014 | // glBegin(GL_TRIANGLES); |
| 5015 | //glBegin(GL_LINES); |
| 5016 | |
| 5017 | for(int vi=0; vi<v.size()-1; vi++) |
| 5018 | for(int vj=vi+1; vj<v.size(); vj++){ |
| 5019 | int fc[2]; |
| 5020 | if (commonFaces(v.at(vi),v.at(vj),fc)==2){ |
| 5021 | V3 lin=v.at(vi).pos+v.at(vj).pos; |
| 5022 | double dis; |
| 5023 | bool done=false; |
| 5024 | for (int di=0; di<doneLine.size(); di++){ |
| 5025 | dis=Distance(lin,doneLine.at(di)); |
| 5026 | if (dis<0.000001) {done=true; break;} |
| 5027 | } |
| 5028 | if (done) continue; |
| 5029 | doneLine.append(lin); |
| 5030 | tvol=determinant(Matrix(m.at(fc[0])-oc, v.at(vi).pos-oc,v.at(vj).pos-oc)); |
| 5031 | int v1=(tvol<0)?vj:vi, |
| 5032 | v2=(tvol<0)?vi:vj; |
| 5033 | triangle.mid=m.at(fc[0]); |
| 5034 | triangle.nor=n.at(fc[0]); |
| 5035 | triangle.acol=(intat>-1)?altcol.at(fc[0]):au[i].an; |
| 5036 | triangle.intra=(intat>-1)?0:intra.at(fc[0]); |
| 5037 | triangle.verts0=v[v1].pos; |
| 5038 | triangle.verts1=v[v2].pos; |
| 5039 | |
| 5040 | vtriangles.append(triangle); |
| 5041 | /* |
| 5042 | GLfloat colo[4]={ Acol[au[i].an][0], Acol[au[i].an][1], Acol[au[i].an][2], 0.4}; |
| 5043 | //GLfloat colo[4]={ Acol[tris%100][0], Acol[tris%100][1], Acol[tris%100][2], 0.4}; |
| 5044 | colo[3]=intra.at(fc[0])?1.0:0.4; |
| 5045 | glColor4fv(colo); |
| 5046 | glNormal3d(n.at(fc[0]).x,n.at(fc[0]).y,n.at(fc[0]).z); |
| 5047 | glVertex3d(m.at(fc[0]).x,m.at(fc[0]).y,m.at(fc[0]).z); |
| 5048 | glVertex3d(v.at(v1).pos.x,v.at(v1).pos.y,v.at(v1).pos.z); |
| 5049 | glVertex3d(v.at(v2).pos.x,v.at(v2).pos.y,v.at(v2).pos.z); |
| 5050 | */ |
| 5051 | tris++; |
| 5052 | double tv=fabs(tvol)/6.0; |
| 5053 | avol+=tv; |
| 5054 | vol+=tv*au[i].sof; |
| 5055 | tvol=determinant(Matrix(m.at(fc[1])-oc, v.at(vi).pos-oc,v.at(vj).pos-oc)); |
| 5056 | v1=(tvol<0)?vj:vi; |
| 5057 | v2=(tvol<0)?vi:vj; |
| 5058 | triangle.mid=m.at(fc[1]); |
| 5059 | triangle.nor=n.at(fc[1]); |
| 5060 | |
| 5061 | triangle.acol=(intat>-1)?altcol.at(fc[1]):au[i].an; |
| 5062 | triangle.intra=(intat>-1)?0:intra.at(fc[1]); |
| 5063 | // triangle.col[3]=((intat>-1)&&(intra.at(fc[1])))?0.8:0.4; |
| 5064 | triangle.verts0=v[v1].pos; |
| 5065 | triangle.verts1=v[v2].pos; |
| 5066 | vtriangles.append(triangle); |
| 5067 | /* |
| 5068 | colo[3]=intra.at(fc[1])?1.0:0.4; |
| 5069 | glColor4fv(colo); |
| 5070 | |
| 5071 | glNormal3d(n.at(fc[1]).x,n.at(fc[1]).y,n.at(fc[1]).z); |
| 5072 | glVertex3d(m.at(fc[1]).x,m.at(fc[1]).y,m.at(fc[1]).z); |
| 5073 | glVertex3d(v.at(v1).pos.x,v.at(v1).pos.y,v.at(v1).pos.z); |
| 5074 | glVertex3d(v.at(v2).pos.x,v.at(v2).pos.y,v.at(v2).pos.z); |
| 5075 | */ |
| 5076 | tris++; |
| 5077 | tv=fabs(tvol)/6.0; |
| 5078 | avol+=tv; |
| 5079 | vol+=tv*au[i].sof; |
| 5080 | } |
| 5081 | } |
| 5082 | // glEnd(); |
| 5083 | // printf("%d neighbours found for %s. Voronoij polyeder has %d verices, %d edges and %d faces. Triangles %d Volume %f Total Volume= %f cell volume %f\n", |
| 5084 | // m.size(),au.at(i).Label,v.size(),v.size()+m.size()-2,m.size(), |
| 5085 | printf("%-12s: Triangles %6d Volume %18.5f\n", au.at(i).Label.toStdString().c_str(), tris, avol); |
| 5086 | voroMsg.append(QString("%1 : EulerTest: %2 Volume %3 Å<sup>3</sup>.<br>").arg(au.at(i).Label).arg(-tris/2+faci+v.size()).arg(avol)); |
| 5087 | |
| 5088 | if (intat>-1) break; |
| 5089 | }//i atoms au |
| 5090 | if (intat==-1) { |
| 5091 | printf("Total Volume= %18.5f Total Volume * z = %18.5f cell volume %18.5f delta =%f%%\n",vol,vol*cell.symmops.size(),cell.V,(vol*cell.symmops.size()-cell.V)/cell.V*100.0); |
| 5092 | voroMsg.append(QString("Total Volume= %1 Å<sup>3</sup> cell volume %2 Å<sup>3</sup> ΔV %3%<br>").arg(vol*cell.symmops.size()).arg(cell.V).arg((vol*cell.symmops.size()-cell.V)/cell.V*100.0)); |
| 5093 | } |
| 5094 | // printf("drawing %dms\n",speedTest.restart()); |
| 5095 | } |
| 5096 | V3 eye; |
| 5097 | bool vbyeye(VPoly a,VPoly b){ |
| 5098 | //return (Distance((a.mid+a.verts0+a.verts1)*0.33333,eye)>Distance((b.mid+b.verts0+b.verts1)*0.33333,eye)); |
| 5099 | return (Distance(a.mid,eye)>Distance(b.mid,eye)); |
| 5100 | } |
| 5101 | |
| 5102 | void Molecule::drawAxses(){ |
| 5103 | glLineWidth(2.5); |
| 5104 | glDisable(GL_CULL_FACE); |
| 5105 | glEnable(GL_BLEND); |
| 5106 | glDisable(GL_LIGHTING); |
| 5107 | glBegin(GL_LINES); |
| 5108 | QColor c; |
| 5109 | //glColor3d(0,0,0); |
| 5110 | for (int i=0; i<axvecs.size()/2; i++){ |
| 5111 | if (dontshowSel.contains(axcols.at(i*2))) continue; |
| 5112 | if (dontshowSop.contains(axoprs.at(i*2))) continue; |
| 5113 | c=symmColors.at(axcols.at(i*2)); |
| 5114 | glColor3d(c.redF(),c.greenF(),c.blueF()); |
| 5115 | glVertex3d(axvecs.at(i*2).x,axvecs.at(i*2).y,axvecs.at(i*2).z); |
| 5116 | glVertex3d(axvecs.at(i*2+1).x,axvecs.at(i*2+1).y,axvecs.at(i*2+1).z); |
| 5117 | } |
| 5118 | glEnd(); |
| 5119 | glEnable(GL_LIGHTING); |
| 5120 | } |
| 5121 | |
| 5122 | void Molecule::drawInversionCenters(){ |
| 5123 | //printf("drawInversionCenters() %d %d\n",(dontshowSel.contains(5)),invvecs.size()); |
| 5124 | if (dontshowSel.contains(5)) return; |
| 5125 | QColor c; |
| 5126 | c=symmColors.at(5); |
| 5127 | glColor3d(c.redF(),c.greenF(),c.blueF()); |
| 5128 | for (int i=0; i<invvecs.size(); i++){ |
| 5129 | if (dontshowSop.contains(invoprs.at(i))) continue; |
| 5130 | glPushMatrix(); |
| 5131 | glTranslated(invvecs.at(i).x,invvecs.at(i).y,invvecs.at(i).z); |
| 5132 | triacontaeder(beloRad); |
| 5133 | //printf("%d %f %f %f\n",i,invvecs.at(i).x,invvecs.at(i).y,invvecs.at(i).z); |
| 5134 | glPopMatrix(); |
| 5135 | } |
| 5136 | } |
| 5137 | |
| 5138 | void Molecule::drawVoronoi(V3 auge){ |
| 5139 | eye=auge; |
| 5140 | #if (QT_VERSION >= 0x050000) |
| 5141 | std::sort(vtriangles.begin(),vtriangles.end(),vbyeye); |
| 5142 | #else |
| 5143 | qSort(vtriangles.begin(),vtriangles.end(),vbyeye); |
| 5144 | #endif |
| 5145 | glLineWidth(2.5); |
| 5146 | glDisable(GL_CULL_FACE); |
| 5147 | glEnable(GL_BLEND); |
| 5148 | glDisable(GL_LIGHTING); |
| 5149 | glBegin(GL_LINES); |
| 5150 | |
| 5151 | for (int ti=0; ti<vtriangles.size(); ti++){ |
| 5152 | glColor4d( |
| 5153 | atomColor(vtriangles.at(ti).acol).redF(), |
| 5154 | atomColor(vtriangles.at(ti).acol).greenF(), |
| 5155 | atomColor(vtriangles.at(ti).acol).blueF(), |
| 5156 | 0.5); |
| 5157 | glVertex3d(vtriangles.at(ti).verts0.x,vtriangles.at(ti).verts0.y,vtriangles.at(ti).verts0.z); |
| 5158 | glVertex3d(vtriangles.at(ti).verts1.x,vtriangles.at(ti).verts1.y,vtriangles.at(ti).verts1.z); |
| 5159 | } |
| 5160 | glEnd(); |
| 5161 | glEnable(GL_LIGHTING); |
| 5162 | glBegin(GL_TRIANGLES); |
| 5163 | for (int ti=0; ti<vtriangles.size(); ti++){ |
| 5164 | glColor4d(atomColor(vtriangles.at(ti).acol).redF(), |
| 5165 | atomColor(vtriangles.at(ti).acol).greenF(), |
| 5166 | atomColor(vtriangles.at(ti).acol).blueF(), |
| 5167 | (vtriangles.at(ti).intra>0)?0.03:(vtriangles.at(ti).intra<0)?0.2:0.6); |
| 5168 | // Farbverlauf(ti,0,vtriangles.size(),0.2); |
| 5169 | glNormal3d(vtriangles.at(ti).nor.x,vtriangles.at(ti).nor.y,vtriangles.at(ti).nor.z); |
| 5170 | glVertex3d(vtriangles.at(ti).mid.x,vtriangles.at(ti).mid.y,vtriangles.at(ti).mid.z); |
| 5171 | glVertex3d(vtriangles.at(ti).verts0.x,vtriangles.at(ti).verts0.y,vtriangles.at(ti).verts0.z); |
| 5172 | glVertex3d(vtriangles.at(ti).verts1.x,vtriangles.at(ti).verts1.y,vtriangles.at(ti).verts1.z); |
| 5173 | } |
| 5174 | glEnd(); |
| 5175 | // glEndList(); |
| 5176 | } |
| 5177 | |
| 5178 | void Molecule::drawPlanes(){ |
| 5179 | glLineWidth(2.5); |
| 5180 | glDisable(GL_CULL_FACE); |
| 5181 | glEnable(GL_BLEND); |
| 5182 | glDisable(GL_LIGHTING); |
| 5183 | glBegin(GL_LINES); |
| 5184 | QColor c; |
| 5185 | for (int ti=0; ti<ptriangles.size(); ti++){ |
| 5186 | if (dontshowSop.contains(ptriangles.at(ti).n)) continue; |
| 5187 | if (dontshowSel.contains(ptriangles.at(ti).colr)) continue; |
| 5188 | if (Norm(ptriangles.at(ti).glide)>0.01){ |
| 5189 | c=symmColors.at(ptriangles.at(ti).colr); |
| 5190 | glColor4d(c.redF(),c.greenF(),c.blueF(),1.0); |
| 5191 | glVertex3d(ptriangles.at(ti).mid.x,ptriangles.at(ti).mid.y,ptriangles.at(ti).mid.z); |
| 5192 | //glVertex3d(0,0,0); |
| 5193 | glVertex3d(ptriangles.at(ti).mid.x+ptriangles.at(ti).glide.x, |
| 5194 | ptriangles.at(ti).mid.y+ptriangles.at(ti).glide.y, |
| 5195 | ptriangles.at(ti).mid.z+ptriangles.at(ti).glide.z); |
| 5196 | } |
| 5197 | c=symmColors.at(ptriangles.at(ti).colr); |
| 5198 | glColor4d(c.redF(),c.greenF(),c.blueF(),0.5); |
| 5199 | //glColor4d(ptriangles.at(ti).colr.redF(), ptriangles.at(ti).colr.greenF(), ptriangles.at(ti).colr.blueF(), 0.5); |
| 5200 | glVertex3d(ptriangles.at(ti).verts0.x,ptriangles.at(ti).verts0.y,ptriangles.at(ti).verts0.z); |
| 5201 | glVertex3d(ptriangles.at(ti).verts1.x,ptriangles.at(ti).verts1.y,ptriangles.at(ti).verts1.z); |
| 5202 | } |
| 5203 | glEnd(); |
| 5204 | glBegin(GL_TRIANGLES); |
| 5205 | for (int ti=0; ti<ptriangles.size(); ti++){ |
| 5206 | if (dontshowSop.contains(ptriangles.at(ti).n)) continue; |
| 5207 | if (dontshowSel.contains(ptriangles.at(ti).colr)) continue; |
| 5208 | c=symmColors.at(ptriangles.at(ti).colr); |
| 5209 | glColor4d(c.redF(),c.greenF(),c.blueF(),planeTransparence); |
| 5210 | glNormal3d(ptriangles.at(ti).nor.x, ptriangles.at(ti).nor.y, ptriangles.at(ti).nor.z); |
| 5211 | glVertex3d(ptriangles.at(ti).mid.x, ptriangles.at(ti).mid.y, ptriangles.at(ti).mid.z); |
| 5212 | glVertex3d(ptriangles.at(ti).verts0.x, ptriangles.at(ti).verts0.y, ptriangles.at(ti).verts0.z); |
| 5213 | glVertex3d(ptriangles.at(ti).verts1.x, ptriangles.at(ti).verts1.y, ptriangles.at(ti).verts1.z); |
| 5214 | } |
| 5215 | glEnd(); |
| 5216 | |
| 5217 | for (int ti=0; ti<ptriangles.size(); ti++){ |
| 5218 | if (dontshowSop.contains(ptriangles.at(ti).n)) continue; |
| 5219 | if (dontshowSel.contains(ptriangles.at(ti).colr)) continue; |
| 5220 | if (Norm(ptriangles.at(ti).glide)>0.01){ |
| 5221 | c=symmColors.at(ptriangles.at(ti).colr); |
| 5222 | glColor4d(c.redF(),c.greenF(),c.blueF(),1.0); |
| 5223 | spitze(ptriangles.at(ti).glide,ptriangles.at(ti).mid+ptriangles.at(ti).glide); |
| 5224 | } |
| 5225 | } |
| 5226 | // glEndList(); |
| 5227 | glEnable(GL_LIGHTING); |
| 5228 | } |
| 5229 | |
| 5230 | void Molecule::loadSettings(){ |
| 5231 | /*! Loads molecular parameters stored in shelxle.ini |
| 5232 | */ |
| 5233 | QSettings einstellung( QSettings::IniFormat, QSettings::UserScope ,PROGRAM_NAME,mynewnameis ); |
| 5234 | printf("loadSettings '%s' <=> '%s'\n",PROGRAM_NAME,mynewnameis.toStdString().c_str()); |
| 5235 | einstellung.sync(); |
| 5236 | einstellung.beginGroup("PSE"); |
| 5237 | pseFontSize=einstellung.value("FontSize",10).toInt(); |
| 5238 | einstellung.endGroup(); |
| 5239 | einstellung.beginGroup("HFIX"); |
| 5240 | HFixSuitableAtomsOnly=einstellung.value("HFixSuitableAtomsOnly0",false).toBool(); |
| 5241 | einstellung.endGroup(); |
| 5242 | einstellung.beginGroup("Atoms"); |
| 5243 | int acsize; |
| 5244 | acsize = einstellung.beginReadArray("CovaleceRadii"); |
| 5245 | //printf("H hat %d actsize %d\n", Kovalenz_Radien[0], acsize); |
| 5246 | for (int i = 0; i < acsize; ++i) { |
| 5247 | einstellung.setArrayIndex(i); |
| 5248 | Kovalenz_Radien[i] = einstellung.value("Radius").toInt(); |
| 5249 | //printf ("%d = %d\n",i,Kovalenz_Radien[i]); |
| 5250 | } |
| 5251 | einstellung.endArray(); |
| 5252 | acsize = einstellung.beginReadArray("BallRadii"); |
| 5253 | for (int i = 0; i < acsize; ++i) { |
| 5254 | einstellung.setArrayIndex(i); |
| 5255 | arad[i]=einstellung.value("Radius").toDouble(); |
| 5256 | } |
| 5257 | einstellung.endArray(); |
| 5258 | acsize = einstellung.beginReadArray("AtomColors"); |
| 5259 | // printf("H hat %d Col actsize %d\n", Kovalenz_Radien[0], acsize); |
| 5260 | for (int i = 0; i < acsize; ++i) { |
| 5261 | einstellung.setArrayIndex(i); |
| 5262 | AtomColor[i] = einstellung.value("Color").value<QColor>(); |
| 5263 | AtomColor[i].setAlphaF(0.25); |
| 5264 | } |
| 5265 | einstellung.endArray(); |
| 5266 | acsize = einstellung.beginReadArray("AtomStyles"); |
| 5267 | |
| 5268 | for (int i = 0; i < acsize; ++i) { |
| 5269 | einstellung.setArrayIndex(i); |
| 5270 | AtomStyle[i] = einstellung.value("Style").toInt(); |
| 5271 | //printf("%d style %X\n",i, AtomStyle[i]); |
| 5272 | } |
| 5273 | einstellung.endArray(); |
| 5274 | einstellung.endGroup(); |
| 5275 | einstellung.beginGroup("SymmetryElements"); |
| 5276 | einstellung.beginWriteArray("SymmetryElementColors",107); |
| 5277 | for (int i = 0, j = 0; i < 18; ++i) { |
| 5278 | if ((i>5)&&(j%5==0)) j++; |
| 5279 | int colori=27+j++; |
| 5280 | //printf("%d %s\n",i,QColor::colorNames().at(colori).toStdString().c_str()); |
| 5281 | einstellung.setArrayIndex(i); |
| 5282 | symmColors[i] = einstellung.value("Color",QColor::colorNames().at(colori)).value<QColor>(); |
| 5283 | symmColors[i].setAlphaF(1.0); |
| 5284 | } |
| 5285 | einstellung.endArray(); |
| 5286 | einstellung.endGroup(); |
| 5287 | einstellung.beginGroup("Bonds"); |
| 5288 | bondColor=einstellung.value("BondColor",QColor(Qt::darkGray)).value<QColor>(); |
| 5289 | bondColorStyle=einstellung.value("BondStyle",0).toInt(); |
| 5290 | bondStrength=einstellung.value("BondStrength",0.05).toDouble(); |
| 5291 | q_bondWidth=einstellung.value("Q-BondStrength",1.00f).toFloat(); |
| 5292 | HAMax=einstellung.value("HBondMaxDist",2.5).toDouble(); |
| 5293 | HAWink=einstellung.value("HBondMaxAng",135.0).toDouble(); |
| 5294 | acsize = einstellung.beginReadArray("HBondDonors"); |
| 5295 | if (acsize>0) theseAreDonors.clear(); |
| 5296 | for (int i = 0; i < acsize; ++i) { |
| 5297 | einstellung.setArrayIndex(i); |
| 5298 | theseAreDonors.append(getOZ(einstellung.value("Element").toString())); |
| 5299 | } |
| 5300 | einstellung.endArray(); |
| 5301 | |
| 5302 | acsize = einstellung.beginReadArray("HBondAcceptors"); |
| 5303 | if (acsize>0) theseAreAcceptors.clear(); |
| 5304 | for (int i = 0; i < acsize; ++i) { |
| 5305 | einstellung.setArrayIndex(i); |
| 5306 | theseAreAcceptors.append(getOZ(einstellung.value("Element").toString())); |
| 5307 | } |
| 5308 | einstellung.endArray(); |
| 5309 | //qDebug()<<theseAreAcceptors<<theseAreDonors; |
| 5310 | |
| 5311 | enviBondColor=einstellung.value("enviBondColor",QColor(Qt::darkGreen)).value<QColor>(); |
| 5312 | enviHBColor=einstellung.value("enviHBColor",QColor(Qt::darkYellow)).value<QColor>(); |
| 5313 | enviDefaultColor=einstellung.value("enviDefaultColor",QColor(Qt::black)).value<QColor>(); |
| 5314 | einstellung.endGroup(); |
| 5315 | einstellung.beginGroup("QPeaks"); |
| 5316 | qPeakRad = einstellung.value("QPeaksRadius",0.05).toDouble(); |
| 5317 | einstellung.endGroup(); |
| 5318 | einstellung.beginGroup("Window"); |
| 5319 | ffmpegexe=einstellung.value("FFMPEG.EXE",ffmpegexe).toString(); |
| 5320 | LOD=einstellung.value("LevelOfDetail",4).toInt(); |
| 5321 | //if (einstellung.contains("Use_GLSL_Shaders")) useShaders=einstellung.value("Use_GLSL_Shaders").toBool(); |
| 5322 | einstellung.endGroup(); |
| 5323 | einstellung.beginGroup("IDEAL"); |
| 5324 | beloRad = einstellung.value("beloRad",0.04).toDouble(); |
| 5325 | beloColor = einstellung.value("beloColor",QColor("teal")).value<QColor>(); |
| 5326 | beloColorByDefden= einstellung.value("beloColorByDefden",true).toBool(); |
| 5327 | beloLabels = einstellung.value("beloLabels",true).toBool(); |
| 5328 | einstellung.endGroup(); |
| 5329 | } |
| 5330 | |
| 5331 | void Molecule::setHBondMaxDist(double d){if ((d>0.0)&&(d<4.0)) HAMax=d;} |
| 5332 | void Molecule::setHBondMaxAngl(double w){if ((w>0.0)&&(w<180.0)) HAWink=w;} |
| 5333 | |
| 5334 | bool Molecule::canbeDonor(int an){ |
| 5335 | return theseAreDonors.contains(an); |
| 5336 | } |
| 5337 | |
| 5338 | bool Molecule::canbeAcceptor(int an){ |
| 5339 | return theseAreAcceptors.contains(an); |
| 5340 | } |
| 5341 | //QList<int> theseAreAcceptors;// |
| 5342 | //QList<int> theseAreDonors; |
| 5343 | double Molecule::hbdist(){return HAMax;} |
| 5344 | double Molecule::hbangl(){return HAWink;} |
| 5345 | #include <stdio.h> |
| 5346 | QString Molecule::symmcode2human(int s){ |
| 5347 | /*! @param s the Nth symmetry operation of the space group. |
| 5348 | * \returns human readable string. |
| 5349 | */ |
| 5350 | QString erg; |
| 5351 | Matrix m; |
| 5352 | V3 t; |
| 5353 | int h=0,k=0,l=0; |
| 5354 | m=cell.symmops.at(s); |
| 5355 | QString symstrX,symstrY,symstrZ; |
| 5356 | if (m.m11==1) symstrX.append("+x"); |
| 5357 | if (m.m11==-1) symstrX.append("-x"); |
| 5358 | if (m.m21==1) symstrX.append("+y"); |
| 5359 | if (m.m21==-1) symstrX.append("-y"); |
| 5360 | if (m.m31==1) symstrX.append("+z"); |
| 5361 | if (m.m31==-1) symstrX.append("-z"); |
| 5362 | |
| 5363 | if (m.m12==1) symstrY.append("+x"); |
| 5364 | if (m.m12==-1) symstrY.append("-x"); |
| 5365 | if (m.m22==1) symstrY.append("+y"); |
| 5366 | if (m.m22==-1) symstrY.append("-y"); |
| 5367 | if (m.m32==1) symstrY.append("+z"); |
| 5368 | if (m.m32==-1) symstrY.append("-z"); |
| 5369 | |
| 5370 | if (m.m13==1) symstrZ.append("+x"); |
| 5371 | if (m.m13==-1) symstrZ.append("-x"); |
| 5372 | if (m.m23==1) symstrZ.append("+y"); |
| 5373 | if (m.m23==-1) symstrZ.append("-y"); |
| 5374 | if (m.m33==1) symstrZ.append("+z"); |
| 5375 | if (m.m33==-1) symstrZ.append("-z"); |
| 5376 | t=cell.trans.at(s); |
| 5377 | V3 zaehler,nenner; |
| 5378 | double egal; |
| 5379 | for (int g=1;g<7; g++){ |
| 5380 | //nenner.x=(t.x<0)?-g:g; |
| 5381 | nenner.x=g; |
| 5382 | zaehler.x=(int)round((t.x+h)*g); |
| 5383 | if (fabs(modf(t.x*g,&egal))<0.05) break; |
| 5384 | } |
| 5385 | for (int g=1;g<7; g++){ |
| 5386 | //nenner.y=(t.y<0)?-g:g; |
| 5387 | nenner.y=g; |
| 5388 | zaehler.y=(int)round((t.y+k)*g); |
| 5389 | if (fabs(modf(t.y*g,&egal))<0.05) break; |
| 5390 | } |
| 5391 | for (int g=1;g<7; g++){ |
| 5392 | //nenner.z=(t.z<0)?-g:g; |
| 5393 | nenner.z=g; |
| 5394 | zaehler.z=(int)round((t.z+l)*g); |
| 5395 | if (fabs(modf(t.z*g,&egal))<0.05) break; |
| 5396 | } |
| 5397 | erg=(QString(" %1/%2%3, %4/%5%6, %7/%8%9") |
| 5398 | .arg(zaehler.x) |
| 5399 | .arg(nenner.x) |
| 5400 | .arg(symstrX) |
| 5401 | .arg(zaehler.y) |
| 5402 | .arg(nenner.y) |
| 5403 | .arg(symstrY) |
| 5404 | .arg(zaehler.z) |
| 5405 | .arg(nenner.z) |
| 5406 | .arg(symstrZ)); |
| 5407 | erg.remove(QRegularExpression("0/\\d")); |
| 5408 | erg.replace("1/1","1"); |
| 5409 | erg.replace("2/1","2"); |
| 5410 | erg.replace("3/1","3"); |
| 5411 | erg.replace("4/1","4"); |
| 5412 | erg.replace("5/1","5"); |
| 5413 | erg.replace("6/1","6"); |
| 5414 | return erg; |
| 5415 | } |
| 5416 | |
| 5417 | QString Molecule::symmcode2human(QString brauchSymm){ |
| 5418 | /*! @param brauchSymm internal symmetry code n_555 |
| 5419 | * \returns human readable string |
| 5420 | */ |
| 5421 | QString erg; |
| 5422 | Matrix m; |
| 5423 | V3 t; |
| 5424 | int h,k,l,s; |
| 5425 | sscanf(brauchSymm.toLatin1(),"%d_%1d%1d%1d",&s,&h,&k,&l); |
| 5426 | h-=5; |
| 5427 | k-=5; |
| 5428 | l-=5; |
| 5429 | s--; |
| 5430 | m=cell.symmops.at(s); |
| 5431 | QString symstrX,symstrY,symstrZ; |
| 5432 | if (m.m11==1) symstrX.append("+x"); |
| 5433 | if (m.m11==-1) symstrX.append("-x"); |
| 5434 | if (m.m21==1) symstrX.append("+y"); |
| 5435 | if (m.m21==-1) symstrX.append("-y"); |
| 5436 | if (m.m31==1) symstrX.append("+z"); |
| 5437 | if (m.m31==-1) symstrX.append("-z"); |
| 5438 | |
| 5439 | if (m.m12==1) symstrY.append("+x"); |
| 5440 | if (m.m12==-1) symstrY.append("-x"); |
| 5441 | if (m.m22==1) symstrY.append("+y"); |
| 5442 | if (m.m22==-1) symstrY.append("-y"); |
| 5443 | if (m.m32==1) symstrY.append("+z"); |
| 5444 | if (m.m32==-1) symstrY.append("-z"); |
| 5445 | |
| 5446 | if (m.m13==1) symstrZ.append("+x"); |
| 5447 | if (m.m13==-1) symstrZ.append("-x"); |
| 5448 | if (m.m23==1) symstrZ.append("+y"); |
| 5449 | if (m.m23==-1) symstrZ.append("-y"); |
| 5450 | if (m.m33==1) symstrZ.append("+z"); |
| 5451 | if (m.m33==-1) symstrZ.append("-z"); |
| 5452 | t=cell.trans.at(s); |
| 5453 | V3 zaehler,nenner; |
| 5454 | double egal; |
| 5455 | for (int g=1;g<7; g++){ |
| 5456 | nenner.x=(t.x<0)?-g:g;; |
| 5457 | zaehler.x=(int)round((t.x+h)*g); |
| 5458 | if (fabs(modf(t.x*g,&egal))<0.05) break; |
| 5459 | } |
| 5460 | for (int g=1;g<7; g++){ |
| 5461 | nenner.y=(t.y<0)?-g:g; |
| 5462 | zaehler.y=(int)round((t.y+k)*g); |
| 5463 | if (fabs(modf(t.y*g,&egal))<0.05) break; |
| 5464 | } |
| 5465 | for (int g=1;g<7; g++){ |
| 5466 | nenner.z=(t.z<0)?-g:g; |
| 5467 | zaehler.z=(int)round((t.z+l)*g); |
| 5468 | if (fabs(modf(t.z*g,&egal))<0.05) break; |
| 5469 | } |
| 5470 | erg=(QString("%1/%2%3, %4/%5%6, %7/%8%9") |
| 5471 | .arg(zaehler.x) |
| 5472 | .arg(nenner.x) |
| 5473 | .arg(symstrX) |
| 5474 | .arg(zaehler.y) |
| 5475 | .arg(nenner.y) |
| 5476 | .arg(symstrY) |
| 5477 | .arg(zaehler.z) |
| 5478 | .arg(nenner.z) |
| 5479 | .arg(symstrZ)); |
| 5480 | |
| 5481 | |
| 5482 | erg.remove(QRegularExpression("0/\\d")); |
| 5483 | erg.replace("1/1","1"); |
| 5484 | erg.replace("2/1","2"); |
| 5485 | erg.replace("3/1","3"); |
| 5486 | erg.replace("4/1","4"); |
| 5487 | erg.replace("5/1","5"); |
| 5488 | erg.replace("6/1","6"); |
| 5489 | return erg; |
| 5490 | } |
| 5491 | |
| 5492 | QString Molecule::symmcode2human(QString brauchSymm, int j){ |
| 5493 | /*! @param brauchSymm internal symmetry code n_555 |
| 5494 | * @param j symmetry number to prepend the human readable string returned. |
| 5495 | * \returns human readable string |
| 5496 | */ |
| 5497 | QString erg; |
| 5498 | Matrix m; |
| 5499 | V3 t; |
| 5500 | int h,k,l,s; |
| 5501 | sscanf(brauchSymm.toLatin1(),"%d_%1d%1d%1d",&s,&h,&k,&l); |
| 5502 | h-=5; |
| 5503 | k-=5; |
| 5504 | l-=5; |
| 5505 | s--; |
| 5506 | m=cell.symmops.at(s); |
| 5507 | QString symstrX,symstrY,symstrZ; |
| 5508 | if (m.m11==1) symstrX.append("+x"); |
| 5509 | if (m.m11==-1) symstrX.append("-x"); |
| 5510 | if (m.m21==1) symstrX.append("+y"); |
| 5511 | if (m.m21==-1) symstrX.append("-y"); |
| 5512 | if (m.m31==1) symstrX.append("+z"); |
| 5513 | if (m.m31==-1) symstrX.append("-z"); |
| 5514 | |
| 5515 | if (m.m12==1) symstrY.append("+x"); |
| 5516 | if (m.m12==-1) symstrY.append("-x"); |
| 5517 | if (m.m22==1) symstrY.append("+y"); |
| 5518 | if (m.m22==-1) symstrY.append("-y"); |
| 5519 | if (m.m32==1) symstrY.append("+z"); |
| 5520 | if (m.m32==-1) symstrY.append("-z"); |
| 5521 | |
| 5522 | if (m.m13==1) symstrZ.append("+x"); |
| 5523 | if (m.m13==-1) symstrZ.append("-x"); |
| 5524 | if (m.m23==1) symstrZ.append("+y"); |
| 5525 | if (m.m23==-1) symstrZ.append("-y"); |
| 5526 | if (m.m33==1) symstrZ.append("+z"); |
| 5527 | if (m.m33==-1) symstrZ.append("-z"); |
| 5528 | t=cell.trans.at(s); |
| 5529 | V3 zaehler,nenner; |
| 5530 | double egal; |
| 5531 | for (int g=1;g<7; g++){ |
| 5532 | nenner.x=(t.x<0)?-g:g;; |
| 5533 | zaehler.x=(int)round(((t.x+h)*g));//+0.0001 |
| 5534 | if (fabs(modf(t.x*g,&egal))<0.05) break; |
| 5535 | } |
| 5536 | for (int g=1;g<7; g++){ |
| 5537 | nenner.y=(t.y<0)?-g:g; |
| 5538 | zaehler.y=(int)round(((t.y+k)*g));//+0.001 |
| 5539 | if (fabs(modf(t.y*g,&egal))<0.05) break; |
| 5540 | } |
| 5541 | for (int g=1;g<7; g++){ |
| 5542 | nenner.z=(t.z<0)?-g:g; |
| 5543 | zaehler.z=(int)round(((t.z+l)*g));//+0.001 |
| 5544 | if (fabs(modf(t.z*g,&egal))<0.05) break; |
| 5545 | } |
| 5546 | |
| 5547 | erg=(QString("»%1 :<b> %2/%3%4, %5/%6%7, %8/%9%10</b><br>") |
| 5548 | .arg(j) |
| 5549 | .arg(zaehler.x) |
| 5550 | .arg(nenner.x) |
| 5551 | .arg(symstrX) |
| 5552 | .arg(zaehler.y) |
| 5553 | .arg(nenner.y) |
| 5554 | .arg(symstrY) |
| 5555 | .arg(zaehler.z) |
| 5556 | .arg(nenner.z) |
| 5557 | .arg(symstrZ)); |
| 5558 | |
| 5559 | erg.remove(QRegularExpression("0/\\d")); |
| 5560 | erg.replace("1/1","1"); |
| 5561 | erg.replace("2/1","2"); |
| 5562 | erg.replace("3/1","3"); |
| 5563 | erg.replace("4/1","4"); |
| 5564 | erg.replace("5/1","5"); |
| 5565 | erg.replace("6/1","6"); |
| 5566 | return erg; |
| 5567 | } |
| 5568 | |
| 5569 | QString Molecule::symmcode2human(QStringList brauchSymm){ |
| 5570 | /*! @param brauchSymm list of internal symmetry codes |
| 5571 | * \returns human readable string sepearated by <br> |
| 5572 | */ |
| 5573 | QString erg; |
| 5574 | Matrix m; |
| 5575 | V3 t; |
| 5576 | int h,k,l,s; |
| 5577 | for (int j=0; j<brauchSymm.size();j++){ |
| 5578 | sscanf(brauchSymm[j].toLatin1(),"%d_%1d%1d%1d",&s,&h,&k,&l); |
| 5579 | h-=5; |
| 5580 | k-=5; |
| 5581 | l-=5; |
| 5582 | s--; |
| 5583 | m=cell.symmops.at(s); |
| 5584 | QString symstrX,symstrY,symstrZ; |
| 5585 | if (m.m11==1) symstrX.append("+x"); |
| 5586 | if (m.m11==-1) symstrX.append("-x"); |
| 5587 | if (m.m21==1) symstrX.append("+y"); |
| 5588 | if (m.m21==-1) symstrX.append("-y"); |
| 5589 | if (m.m31==1) symstrX.append("+z"); |
| 5590 | if (m.m31==-1) symstrX.append("-z"); |
| 5591 | |
| 5592 | if (m.m12==1) symstrY.append("+x"); |
| 5593 | if (m.m12==-1) symstrY.append("-x"); |
| 5594 | if (m.m22==1) symstrY.append("+y"); |
| 5595 | if (m.m22==-1) symstrY.append("-y"); |
| 5596 | if (m.m32==1) symstrY.append("+z"); |
| 5597 | if (m.m32==-1) symstrY.append("-z"); |
| 5598 | |
| 5599 | if (m.m13==1) symstrZ.append("+x"); |
| 5600 | if (m.m13==-1) symstrZ.append("-x"); |
| 5601 | if (m.m23==1) symstrZ.append("+y"); |
| 5602 | if (m.m23==-1) symstrZ.append("-y"); |
| 5603 | if (m.m33==1) symstrZ.append("+z"); |
| 5604 | if (m.m33==-1) symstrZ.append("-z"); |
| 5605 | t=cell.trans.at(s); |
| 5606 | V3 zaehler,nenner; |
| 5607 | double egal; |
| 5608 | for (int g=1;g<7; g++){ |
| 5609 | nenner.x=(t.x<0)?-g:g;; |
| 5610 | zaehler.x=(int)round((t.x+h)*g); |
| 5611 | if (fabs(modf(t.x*g,&egal))<0.05) break; |
| 5612 | } |
| 5613 | for (int g=1;g<7; g++){ |
| 5614 | nenner.y=(t.y<0)?-g:g; |
| 5615 | zaehler.y=(int)round((t.y+k)*g); |
| 5616 | if (fabs(modf(t.y*g,&egal))<0.05) break; |
| 5617 | } |
| 5618 | for (int g=1;g<7; g++){ |
| 5619 | nenner.z=(t.z<0)?-g:g; |
| 5620 | zaehler.z=(int)round((t.z+l)*g); |
| 5621 | if (fabs(modf(t.z*g,&egal))<0.05) break; |
| 5622 | } |
| 5623 | erg.append(QString("»%1 :<b> %2/%3%4, %5/%6%7, %8/%9%10</b><br>") |
| 5624 | .arg(j+1) |
| 5625 | .arg(zaehler.x) |
| 5626 | .arg(nenner.x) |
| 5627 | .arg(symstrX) |
| 5628 | .arg(zaehler.y) |
| 5629 | .arg(nenner.y) |
| 5630 | .arg(symstrY) |
| 5631 | .arg(zaehler.z) |
| 5632 | .arg(nenner.z) |
| 5633 | .arg(symstrZ)); |
| 5634 | |
| 5635 | } |
| 5636 | erg.remove(QRegularExpression("0/\\d")); |
| 5637 | erg.replace("1/1","1"); |
| 5638 | erg.replace("2/1","2"); |
| 5639 | erg.replace("3/1","3"); |
| 5640 | erg.replace("4/1","4"); |
| 5641 | erg.replace("5/1","5"); |
| 5642 | erg.replace("6/1","6"); |
| 5643 | return erg; |
| 5644 | } |
| 5645 | |
| 5646 | void Molecule::frac2kart(V3 x, V3 &y){ |
| 5647 | /*! |
| 5648 | * converts a fractional coordinate into a cartesian using cell information. |
| 5649 | * @param[in] x fractional coordinate. |
| 5650 | * @param[out] y cartesian coordinate. |
| 5651 | */ |
| 5652 | Matrix u; |
| 5653 | u.m11 = cell.a; |
| 5654 | u.m21 = 0.0; |
| 5655 | u.m31 = 0.0; |
| 5656 | u.m12 = cell.b * cell.cosga; |
| 5657 | u.m22 = cell.b * cell.singa; |
| 5658 | u.m32 = 0.0; |
| 5659 | u.m13 = cell.c * cell.cosbe; |
| 5660 | u.m23 = cell.tau; |
| 5661 | u.m33 = cell.c * cell.phi / cell.singa; |
| 5662 | |
| 5663 | y.x = x.x * u.m11 + x.y * u.m12 + x.z * u.m13; |
| 5664 | y.y = x.x * u.m21 + x.y * u.m22 + x.z * u.m23; |
| 5665 | y.z = x.x * u.m31 + x.y * u.m32 + x.z * u.m33; |
| 5666 | |
| 5667 | } |
| 5668 | |
| 5669 | QMatrix3x3 Molecule::cholesky(){ |
| 5670 | QMatrix3x3 u ; |
| 5671 | u(0,0) = cell.a; |
| 5672 | u(1,0) = 0.0; |
| 5673 | u(2,0) = 0.0; |
| 5674 | u(0,1) = cell.b * cell.cosga; |
| 5675 | u(1,1) = cell.b * cell.singa; |
| 5676 | u(2,1) = 0.0; |
| 5677 | u(0,2) = cell.c * cell.cosbe; |
| 5678 | u(1,2) = cell.tau; |
| 5679 | u(2,2) = cell.c * cell.phi / cell.singa; |
| 5680 | /*QMatrix3x3 v; |
| 5681 | v.setToIdentity(); |
| 5682 | QMatrix3x3 w = u * v; |
| 5683 | qDebug()<<w;*/ |
| 5684 | return u; |
| 5685 | |
| 5686 | } |
| 5687 | |
| 5688 | void Molecule::kart2frac(V3 x, V3 &y){ |
| 5689 | /*! |
| 5690 | * converts a cartesian coordinate into a fractional using cell information. |
| 5691 | * @param[in] x cartesian coordinate. |
| 5692 | * @param[out] y fractional coordinate. |
| 5693 | */ |
| 5694 | Matrix u; |
| 5695 | y.x =0.0 ; |
| 5696 | y.y =0.0 ; |
| 5697 | y.z =0.0; |
| 5698 | u.m11 = 1.0/cell.a; |
| 5699 | u.m21 = 0.0; |
| 5700 | u.m31 = 0.0; |
| 5701 | u.m12 = -1.0/(cell.a * cell.tanga); |
| 5702 | u.m22 = 1.0/(cell.b * cell.singa); |
| 5703 | u.m32 = 0.0; |
| 5704 | u.m13 = (cell.cosal*cell.cosga-cell.cosbe)/(cell.a*cell.phi*cell.singa); |
| 5705 | u.m23 = (cell.cosbe*cell.cosga-cell.cosal)/(cell.b*cell.phi*cell.singa); |
| 5706 | u.m33 = cell.singa/(cell.c*cell.phi); |
| 5707 | // Wird jetzt hier genauso wie in int Tab B S.345 gerechnet (M^-1^). |
| 5708 | y.x = x.x * u.m11 + x.y * u.m12 + x.z * u.m13; |
| 5709 | y.y = x.x * u.m21 + x.y * u.m22 + x.z * u.m23; |
| 5710 | y.z = x.x * u.m31 + x.y * u.m32 + x.z * u.m33; |
| 5711 | } |
| 5712 | |
| 5713 | QString Molecule::pse(int oz){ |
| 5714 | |
| 5715 | |
| 5716 | if ((oz>-1)&&(oz<PSE.size())) return PSE.at(oz); |
| 5717 | switch (oz){ |
| 5718 | case -1: return "Q"; |
| 5719 | case -42: return "BELO"; |
| 5720 | case -66: return "Cnt"; |
| 5721 | default: return ""; |
| 5722 | } |
| 5723 | } |
| 5724 | |
| 5725 | int Molecule::getOZ(QString S1){ |
| 5726 | QString s=S1; |
| 5727 | s=s.remove('$'); |
| 5728 | s=s.section(QRegularExpression("[^A-Za-z]"),0,0); |
| 5729 | s=s.toUpper(); |
| 5730 | if (s=="CNT") return -66; |
| 5731 | if (s=="D") return 0; |
| 5732 | QRegularExpression r = QRegularExpression(s, QRegularExpression::CaseInsensitiveOption); |
| 5733 | return PSE.indexOf(r); |
| 5734 | } |
| 5735 | |
| 5736 | void Molecule::uniqueInCell(){ |
| 5737 | /*! Moves centers of gravity of each fragment into the unit cell box and close to the origin. |
| 5738 | * */ |
| 5739 | QList<int> flags; |
| 5740 | int toflipp=0; |
| 5741 | for (int i=0; i<asymm.size(); i++) if (asymm.at(i).an>-1){ |
| 5742 | flags.append(-1); |
| 5743 | toflipp++; |
| 5744 | }else flags.append(0); |
| 5745 | flags[0]=1; |
| 5746 | // printf("MaxMol = %d\n",maxmol); |
| 5747 | double dk; |
| 5748 | V3 prime,dp,D,floorD; |
| 5749 | // V3 D,floorD; |
| 5750 | QList<V3> minMol; |
| 5751 | for (int i=0; i<maxmol; i++) minMol.append(V3(0,0,0)); |
| 5752 | SdmItem sdmItem; |
| 5753 | sdmItem.a1=0; |
| 5754 | sdmItem.a2=1; |
| 5755 | sdmItem.sn=0; |
| 5756 | sdmItem.covalent=true; |
| 5757 | QList<SdmItem> starter; |
| 5758 | QList<int> mii; |
| 5759 | for (int j=0; j<maxmol; j++){ |
| 5760 | int mi=0; |
| 5761 | for (int i=0; i<asymm.size(); i++){ |
| 5762 | if (asymm.at(i).an<0) continue; |
| 5763 | if ((asymm.at(i).molindex-1)!=j) continue; |
| 5764 | minMol[j]+=asymm.at(i).frac; |
| 5765 | mi++; |
| 5766 | } |
| 5767 | mii.append(mi); |
| 5768 | minMol[j]*=1.0/mi; |
| 5769 | // printf("mole#%-2d has %3d atoms. Center of mass is at %9.4f %9.4f %9.4f \n",j,mi, minMol[j].x, minMol[j].y, minMol[j].z); |
| 5770 | } |
| 5771 | for (int j=0; j<maxmol; j++){ |
| 5772 | if (mii.at(j)==0){ |
| 5773 | sdmItem.sn=0; |
| 5774 | sdmItem.floorD=V3(floor(minMol.at(j).x),floor(minMol.at(j).y),floor(minMol.at(j).z)); |
| 5775 | sdmItem.a2=sdmItem.a1=j; |
| 5776 | starter.append(sdmItem); |
| 5777 | }else{ |
| 5778 | double min=99999.0; |
| 5779 | for (int n=0;n<cell.symmops.size(); n++){ |
| 5780 | prime=cell.symmops.at(n) * minMol.at(j) + cell.trans.at(n); |
| 5781 | D=prime ;//+ V3(0.5,0.5,0.5) ; |
| 5782 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 5783 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 5784 | dk=fl(dp.x,dp.y,dp.z); |
| 5785 | if (dk<min){ |
| 5786 | sdmItem.d=dk; |
| 5787 | min=dk; |
| 5788 | sdmItem.floorD=floorD; |
| 5789 | sdmItem.a1=j; |
| 5790 | sdmItem.a2=j; |
| 5791 | sdmItem.sn=n; |
| 5792 | } |
| 5793 | } |
| 5794 | // printf("Mole#%-2d floorD %3.0f %3.0f %3.0f %d\n",j,sdmItem.floorD.x,sdmItem.floorD.y,sdmItem.floorD.z,sdmItem.sn); |
| 5795 | starter.append(sdmItem); |
| 5796 | } |
| 5797 | } |
| 5798 | for (int i=0; i<asymm.size(); i++){ |
| 5799 | if (asymm.at(i).an<0) continue; |
| 5800 | if (asymm.at(i).molindex<1) continue; |
| 5801 | int n = starter.at(asymm.at(i).molindex-1).sn; |
| 5802 | V3 f = starter.at(asymm.at(i).molindex-1).floorD; |
| 5803 | asymm[i].frac= cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n) - f; |
| 5804 | frac2kart(asymm[i].frac,asymm[i].pos); |
| 5805 | |
| 5806 | } |
| 5807 | for (int j=0; j<maxmol; j++){ |
| 5808 | int mi=0; |
| 5809 | minMol[j]=V3(0,0,0); |
| 5810 | for (int i=0; i<asymm.size(); i++){ |
| 5811 | if ((asymm.at(i).molindex-1)!=j) continue; |
| 5812 | minMol[j]+=asymm.at(i).frac; |
| 5813 | mi++; |
| 5814 | } |
| 5815 | minMol[j]*=1.0/mi; |
| 5816 | // printf("mole#%-2d has %2d atoms. Center of mass is at %9.4f %9.4f %9.4f \n",j,mi, minMol[j].x, minMol[j].y, minMol[j].z); |
| 5817 | } |
| 5818 | packer(sdmcompleter()); |
| 5819 | showatoms.clear(); |
| 5820 | for (int i=0; i<asymm.size();i++){ |
| 5821 | showatoms.append(asymm[i]); |
| 5822 | showatoms[i].molindex=asymm[i].molindex; |
| 5823 | } |
| 5824 | showbonds.clear(); |
| 5825 | showbonds=connecting(showatoms); |
| 5826 | } |
| 5827 | |
| 5828 | void Molecule::enviSDM(double range){ |
| 5829 | /*! Calculates the shortes distance matrix for the ENVIronment functionality in the given range. |
| 5830 | * @param range maximal distances around each atom to generate a matrix entry. |
| 5831 | */ |
| 5832 | |
| 5833 | // George Sheldrick Seminar ideas |
| 5834 | double dk,dddd; |
| 5835 | V3 prime,dp,D,floorD; |
| 5836 | envi_sdm.clear(); |
| 5837 | SdmItem sdmItem; |
| 5838 | sdmItem.a1=0; |
| 5839 | sdmItem.a2=1; |
| 5840 | sdmItem.sn=0; |
| 5841 | //sdmItem.p1=sdmItem.p2=V3(0,0,0); |
| 5842 | for (int i=0; i<asymm.size(); i++){ |
| 5843 | for (int j=0; j<asymm.size(); j++ ){ |
| 5844 | // bool hma=false; |
| 5845 | for (int n=0;n<cell.symmops.size(); n++){ |
| 5846 | prime=cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n); |
| 5847 | D=prime - asymm.at(j).frac+ V3(0.5,0.5,0.5) ; |
| 5848 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 5849 | for (int h=-1; h<2; h++){ |
| 5850 | for (int k=-1; k<2; k++){ |
| 5851 | for (int l=-1; l<2; l++){ |
| 5852 | V3 fD=floorD+V3(h,k,l); |
| 5853 | dp=D - fD - V3(0.5,0.5,0.5); |
| 5854 | dk=fl(dp.x,dp.y,dp.z); |
| 5855 | if ((dk>0.01)&&((range)>=dk)){ |
| 5856 | sdmItem.d=dk; |
| 5857 | sdmItem.floorD=fD; |
| 5858 | sdmItem.a1=i; |
| 5859 | sdmItem.a2=j; |
| 5860 | sdmItem.sn=n; |
| 5861 | if ((asymm[i].an>-1)&&(asymm[j].an>-1)&& |
| 5862 | ((asymm[i].part*asymm[j].part==0)|| |
| 5863 | (asymm[i].part==asymm[j].part))) |
| 5864 | dddd=(Kovalenz_Radien[asymm[i].an]+ Kovalenz_Radien[asymm[j].an])*0.012; |
| 5865 | else dddd=0; |
| 5866 | if (sdmItem.d<dddd){ |
| 5867 | sdmItem.covalent=true; |
| 5868 | }else sdmItem.covalent=false; |
| 5869 | envi_sdm.append(sdmItem); |
| 5870 | } |
| 5871 | } |
| 5872 | } |
| 5873 | } |
| 5874 | } |
| 5875 | } |
| 5876 | } |
| 5877 | #if (QT_VERSION >= 0x050000) |
| 5878 | std::sort(envi_sdm.begin(),envi_sdm.end()); |
| 5879 | #else |
| 5880 | qSort(envi_sdm.begin(),envi_sdm.end()); |
| 5881 | #endif |
| 5882 | //histogram |
| 5883 | /* |
| 5884 | double hmi,hma; |
| 5885 | hmi=envi_sdm.first().d; |
| 5886 | hma=envi_sdm.last().d; |
| 5887 | double hstep=(hma-hmi)/20.0; |
| 5888 | printf("%g %g %g %d\n",hma,hmi,hstep,envi_sdm.size()); |
| 5889 | if (hstep<0.01) return; |
| 5890 | int hbox[20]={ |
| 5891 | 0,0,0,0,0, |
| 5892 | 0,0,0,0,0, |
| 5893 | 0,0,0,0,0, |
| 5894 | 0,0,0,0,0}; |
| 5895 | for (int i=0; i<envi_sdm.size();i++){ |
| 5896 | int hind=(int) (envi_sdm.at(i).d/hstep); |
| 5897 | hbox[hind]++; |
| 5898 | } |
| 5899 | for (int i=0;i<20;i++){ |
| 5900 | printf("%g-%g %d (%g)\n",hmi+hstep*i,hmi+i*hstep+hstep,hbox[i],hma); |
| 5901 | } |
| 5902 | // */ |
| 5903 | } |
| 5904 | |
| 5905 | void Molecule::neighborSort(Knopf &kn){//sort neighbors by atomic number |
| 5906 | // I think bublle sort is fine for such a sort list |
| 5907 | for (int i = 0; i < kn.neighbors.size(); i++){ |
| 5908 | for (int j = i+1; j < kn.neighbors.size(); j++){ |
| 5909 | if ((kn.neighbors.at(i)>=asymm.size())||(kn.neighbors.at(j)>=asymm.size())) continue; |
| 5910 | if (asymm.at(kn.neighbors.at(i)).an < asymm.at(kn.neighbors.at(j)).an){ |
| 5911 | int swap=kn.neighbors.at(i); |
| 5912 | kn.neighbors[i]=kn.neighbors.at(j); |
| 5913 | kn.neighbors[j]=swap; |
| 5914 | } |
| 5915 | } |
| 5916 | } |
| 5917 | } |
| 5918 | |
| 5919 | QList<SdmItem> Molecule::computeSDM(CEnvironment au){ |
| 5920 | double dk,dddd; |
| 5921 | V3 prime,dp,D,floorD; |
| 5922 | SdmItem sdmItem; |
| 5923 | sdmItem.a1=0; |
| 5924 | sdmItem.a2=0; |
| 5925 | sdmItem.sn=0; |
| 5926 | QList<SdmItem> _sdm; |
| 5927 | for (int i=0; i<au.size(); i++){ |
| 5928 | for (int j=i+1; j<au.size(); j++ ){ |
| 5929 | double min=1000000; |
| 5930 | bool hma=false; |
| 5931 | for (int n=0;n<cell.symmops.size(); n++){ |
| 5932 | //for (int n=0;n<1; n++){ |
| 5933 | prime=cell.symmops.at(n) * au.at(i).frac + cell.trans.at(n); |
| 5934 | D=prime - au.at(j).frac+ V3(0.5,0.5,0.5) ; |
| 5935 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 5936 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 5937 | dk=fl(dp.x,dp.y,dp.z); |
| 5938 | if (n) dk+=0.0001; |
| 5939 | if ((dk>0.01)&&((min+0.00)>=dk)){ |
| 5940 | min=fmin(dk,min); |
| 5941 | sdmItem.d=min; |
| 5942 | sdmItem.floorD=floorD; |
| 5943 | sdmItem.a1=i; |
| 5944 | sdmItem.a2=j; |
| 5945 | sdmItem.sn=n; |
| 5946 | hma=true; |
| 5947 | } |
| 5948 | } |
| 5949 | if ((au[sdmItem.a1].an>-1)&& |
| 5950 | (au[sdmItem.a2].an>-1)&& |
| 5951 | ((au[sdmItem.a1].part*au[sdmItem.a2].part==0)||(au[sdmItem.a1].part==au[sdmItem.a2].part))){ |
| 5952 | dddd=(Kovalenz_Radien[au[sdmItem.a1].an]+ Kovalenz_Radien[au[sdmItem.a2].an])*0.012; |
| 5953 | } else { |
| 5954 | dddd=0; |
| 5955 | } |
| 5956 | sdmItem.covalent=(sdmItem.d<dddd); |
| 5957 | if (hma) _sdm.append(sdmItem); |
| 5958 | } |
| 5959 | |
| 5960 | } |
| 5961 | return _sdm; |
| 5962 | } |
| 5963 | |
| 5964 | QStringList Molecule::sdmcompleter(){ |
| 5965 | /*! Calculates the shortest distance matrix. |
| 5966 | * Counts the number of fragmets in the asymmetric unit. |
| 5967 | * Finds possible hydrogen bond contacts. |
| 5968 | * \returns internal symmtry code list for grown structures. |
| 5969 | */ |
| 5970 | // George Sheldrick Seminar ideas |
| 5971 | // printf("sdm1 %d\n",__LINE__); |
| 5972 | // QTime zeit; zeit.start(); |
| 5973 | //printf("sdmcompleter\n"); |
| 5974 | double dk,dddd; |
| 5975 | V3 prime,dp,D,floorD; |
| 5976 | contact.clear(); |
| 5977 | sdm.clear(); |
| 5978 | SdmItem sdmItem; |
| 5979 | sdmItem.a1=0; |
| 5980 | sdmItem.a2=0; |
| 5981 | sdmItem.sn=0; |
| 5982 | SdmItem sdmItem2; |
| 5983 | sdmItem2.a1=0; |
| 5984 | sdmItem2.a2=0; |
| 5985 | sdmItem2.sn=0; |
| 5986 | |
| 5987 | knoepfe.clear(); |
| 5988 | Knopf kn; |
| 5989 | kn.neighbors.clear(); |
| 5990 | for (int i=0; i<asymm.size(); i++){ |
| 5991 | kn.neighbors.clear(); |
| 5992 | for (int j=0; j<asymm.size(); j++ ){ |
| 5993 | double min=1000000; |
| 5994 | bool hma=false; |
| 5995 | for (int n=0;n<cell.symmops.size(); n++){ |
| 5996 | prime=cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n); |
| 5997 | D=prime - asymm.at(j).frac+ V3(0.5,0.5,0.5) ; |
| 5998 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 5999 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 6000 | dk=fl(dp.x,dp.y,dp.z); |
| 6001 | if (n) dk+=0.0001; |
| 6002 | if ((dk>0.01)&&((min+0.00)>=dk)){ |
| 6003 | min=fmin(dk,min); |
| 6004 | sdmItem.d=min; |
| 6005 | sdmItem.floorD=floorD; |
| 6006 | sdmItem.a1=i; |
| 6007 | sdmItem.a2=j; |
| 6008 | sdmItem.sn=n; |
| 6009 | hma=true; |
| 6010 | } |
| 6011 | } |
| 6012 | if ((asymm[sdmItem.a1].an>-1)&&(asymm[sdmItem.a2].an>-1)&& |
| 6013 | ((asymm[sdmItem.a1].part*asymm[sdmItem.a2].part==0)|| (asymm[sdmItem.a1].part==asymm[sdmItem.a2].part))) |
| 6014 | dddd=(Kovalenz_Radien[asymm[sdmItem.a1].an]+ Kovalenz_Radien[asymm[sdmItem.a2].an])*0.0115; |
| 6015 | else dddd=0; |
| 6016 | if (sdmItem.d<dddd){ |
| 6017 | if (hma) kn.neighbors.append(j); |
| 6018 | sdmItem.covalent=true; |
| 6019 | } else { |
| 6020 | sdmItem.covalent=false; |
| 6021 | } |
| 6022 | //if ((sdmItem.sn!=0)&&((asymm[sdmItem.a1].part<0)||(asymm[sdmItem.a2].part<0))) sdmItem.covalent=false; |
| 6023 | if (hma) sdm.append(sdmItem); |
| 6024 | } |
| 6025 | neighborSort(kn); |
| 6026 | knoepfe.append(kn); |
| 6027 | } |
| 6028 | |
| 6029 | for (int i=0; i<asymm.size(); i++){ //wasserstoffbrueckensuche |
| 6030 | for (int j=0; j<asymm.size(); j++ ){ |
| 6031 | for (int nn=0;nn<cell.symmops.size(); nn++){ |
| 6032 | prime=cell.symmops.at(nn) * asymm.at(i).frac + cell.trans.at(nn); |
| 6033 | D=prime - asymm.at(j).frac+ V3(0.5,0.5,0.5) ; |
| 6034 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 6035 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 6036 | dk=fl(dp.x,dp.y,dp.z); |
| 6037 | if((1)&&(abs(asymm[i].an-7)<2)&&(abs(asymm[j].an-7)<2)&&(fabs(dk-2.775)<0.325)){//N O F mit abstanden zwischen 2.45 bis 3.1 A koennten H=Bruecken sein |
| 6038 | sdmItem2.d=dk; |
| 6039 | sdmItem2.floorD=floorD; |
| 6040 | sdmItem2.a1=i; |
| 6041 | sdmItem2.a2=j; |
| 6042 | sdmItem2.sn=nn; |
| 6043 | sdmItem2.covalent=true; |
| 6044 | double ang1=361,ang2=361,an; |
| 6045 | for (int oo=0; oo<knoepfe.at(i).neighbors.size(); oo++){ |
| 6046 | an=wl(asymm.at(j).frac, |
| 6047 | cell.symmops.at(nn) * asymm.at(i).frac + cell.trans.at(nn)-floorD, |
| 6048 | cell.symmops.at(nn) * asymm.at(knoepfe.at(i).neighbors.at(oo)).frac + cell.trans.at(nn)-floorD); |
| 6049 | ang1=(an<ang1)?an:ang1; |
| 6050 | } |
| 6051 | for (int oo=0; oo<knoepfe.at(j).neighbors.size(); oo++){ |
| 6052 | an=wl( |
| 6053 | cell.symmops.at(nn) * asymm.at(i).frac + cell.trans.at(nn)-floorD, |
| 6054 | asymm.at(j).frac, |
| 6055 | asymm.at(knoepfe.at(j).neighbors.at(oo)).frac); |
| 6056 | ang2=(an<ang2)?an:ang2; |
| 6057 | } |
| 6058 | /*printf("Paarschippen: %s %s %f %f %f %d\n", |
| 6059 | asymm.at(i).Label.toStdString().c_str(), |
| 6060 | asymm.at(j).Label.toStdString().c_str(), |
| 6061 | dk, ang1, ang2,((qMax(ang1,ang2)!=361)&&((qMin(ang1,ang2)<85)||(qMax(ang1,ang2)>180))));// */ |
| 6062 | if ((qMax(ang1,ang2)!=361)&&((qMin(ang1,ang2)<85)||(qMax(ang1,ang2)>180))) sdmItem2.covalent=false; |
| 6063 | else { |
| 6064 | //printf("contact ok\n"); |
| 6065 | contact.append(sdmItem2); |
| 6066 | } |
| 6067 | } |
| 6068 | } |
| 6069 | } |
| 6070 | } |
| 6071 | // printf("sdm3 %d\n",zeit.elapsed());//\n"); zeit.restart(); |
| 6072 | QString bs; |
| 6073 | QStringList brauchSymm; |
| 6074 | int someleft=0,nextmol=0; |
| 6075 | maxmol=1; |
| 6076 | for (int i=0; i<asymm.size();i++) asymm[i].molindex=-1; |
| 6077 | asymm[0].molindex=1;//starter; |
| 6078 | do { |
| 6079 | nextmol=0; |
| 6080 | do { |
| 6081 | someleft=0; |
| 6082 | for (int i=0; i<sdm.size();i++){ |
| 6083 | if ((sdm.at(i).covalent)&&(asymm[sdm.at(i).a1].molindex*asymm[sdm.at(i).a2].molindex<0)) { |
| 6084 | asymm[sdm.at(i).a1].molindex=maxmol; |
| 6085 | asymm[sdm.at(i).a2].molindex=maxmol; |
| 6086 | someleft++; |
| 6087 | } |
| 6088 | } |
| 6089 | }while (someleft); |
| 6090 | for ( int i=0; i<asymm.size();i++) { |
| 6091 | if ((asymm[i].an>-1)&&(asymm[i].molindex<0)) {nextmol=i;break;} |
| 6092 | } |
| 6093 | if (nextmol) { |
| 6094 | asymm[nextmol].molindex=(++maxmol); |
| 6095 | } |
| 6096 | }while (nextmol); |
| 6097 | Fragments=QString("<b>The asymmetric unit contains %1 fragments.</b><br>").arg(maxmol); |
| 6098 | for (int k =0; k<sdm.size();k++){ |
| 6099 | if (sdm.at(k).covalent){ |
| 6100 | if (asymm[sdm.at(k).a1].molindex<1) continue; |
| 6101 | if (asymm[sdm.at(k).a1].molindex>6) continue; |
| 6102 | for (int n=0;n<cell.symmops.size(); n++){ |
| 6103 | if (((asymm[sdm.at(k).a1].part!=0)&&(asymm[sdm.at(k).a2].part!=0)&&(asymm[sdm.at(k).a1].part!=asymm[sdm.at(k).a2].part)))continue; |
| 6104 | if ((asymm[sdm.at(k).a1].an==asymm[sdm.at(k).a2].an)&&(asymm[sdm.at(k).a1].an==0)) continue; |
| 6105 | prime=cell.symmops.at(n) * asymm[sdm.at(k).a1].frac + cell.trans.at(n); |
| 6106 | D=prime - asymm[sdm.at(k).a2].frac+ V3(0.5,0.5,0.5) ; |
| 6107 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 6108 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 6109 | if ((n==0)&&(V3(0,0,0)==floorD)) continue; |
| 6110 | dk=fl(dp.x,dp.y,dp.z); |
| 6111 | dddd=(sdm.at(k).d+0.2); |
| 6112 | if ((dk>0.001)&&(dddd>=dk)) { |
| 6113 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm[sdm.at(k).a1].molindex); |
| 6114 | if ((!brauchSymm.contains(bs))) { |
| 6115 | brauchSymm.append(bs); |
| 6116 | // printf("%d %d %d %d [%d]\n",n+1,(int)floorD.x,(int)floorD.y,(int)floorD.z ,brauchSymm.size()); |
| 6117 | } |
| 6118 | } |
| 6119 | } |
| 6120 | } |
| 6121 | } |
| 6122 | // printf("sdm4 %d\n",zeit.elapsed()); zeit.restart(); |
| 6123 | #if (QT_VERSION >= 0x050000) |
| 6124 | std::sort(sdm.begin(),sdm.end()); |
| 6125 | #else |
| 6126 | qSort(sdm.begin(),sdm.end()); |
| 6127 | #endif |
| 6128 | // printf("sdm5 %d\n",zeit.elapsed());//\n"); zeit.restart(); |
| 6129 | enviSDM(2.5); |
| 6130 | // printf("sdm5 %d\n",zeit.elapsed());//\n"); zeit.restart(); |
| 6131 | |
| 6132 | QList<int> flags; |
| 6133 | for (int i=0; i<asymm.size(); i++) flags.append((asymm.at(i).an<0)?-1:1); |
| 6134 | for (int i=0; i<envi_sdm.size(); i++){ |
| 6135 | if ((flags.at(envi_sdm.at(i).a1)*flags.at(envi_sdm.at(i).a2))==-1) { |
| 6136 | //if ((qbeforehkl)||((flags.at(sdm.at(i).a1)==-1)&&((asymm.at(sdm.at(i).a2).an>-1)))){ |
| 6137 | // if (((asymm[envi_sdm.at(i).a1].Label=="Q11")||(asymm[envi_sdm.at(i).a2].Label=="Q11"))&&(envi_sdm.at(i).d<2.6)) |
| 6138 | // qDebug()<<asymm[envi_sdm.at(i).a1].Label<<asymm[envi_sdm.at(i).a2].Label<<envi_sdm.at(i).d<<flags[envi_sdm.at(i).a1]<<flags[envi_sdm.at(i).a2]; |
| 6139 | if (asymm[envi_sdm.at(i).a1].an>-1) continue; |
| 6140 | if (asymm[envi_sdm.at(i).a1].an==-66) continue; |
| 6141 | if ((envi_sdm.at(i).sn==0)&&(envi_sdm.at(i).floorD==V3(0,0,0))) {flags[envi_sdm.at(i).a1]=1;continue;} |
| 6142 | if (envi_sdm.at(i).d>2.4) continue; |
| 6143 | asymm[envi_sdm.at(i).a1].frac = cell.symmops.at(envi_sdm.at(i).sn) * asymm[envi_sdm.at(i).a1].frac + cell.trans.at(envi_sdm.at(i).sn) - envi_sdm.at(i).floorD; |
| 6144 | flags[envi_sdm.at(i).a1]=1; |
| 6145 | frac2kart(asymm[envi_sdm.at(i).a1].frac,asymm[envi_sdm.at(i).a1].pos); |
| 6146 | //} |
| 6147 | } |
| 6148 | } |
| 6149 | // printf("sdm6 %d\n",zeit.elapsed()); zeit.restart(); |
| 6150 | return brauchSymm; |
| 6151 | } |
| 6152 | |
| 6153 | Connection Molecule::connecting(const CEnvironment &atom,bool eac){ |
| 6154 | /*! Creates bonds and lbonds depending on covalent radii. |
| 6155 | * If edit atom style flag (eac) is not set FREE and BIND instructions are considered. |
| 6156 | * Feeds also Molecule.knoepfe list. |
| 6157 | * \returns the Connection bond list. |
| 6158 | * */ |
| 6159 | Connection bonds; |
| 6160 | bonds.clear(); |
| 6161 | lbonds.clear(); |
| 6162 | MyBond bond; |
| 6163 | double soll=0; |
| 6164 | printf("connecting %d atoms atom styles dialog %d\n",atom.size(),eac); |
| 6165 | for (int i=0; i<atom.size(); i++){ |
| 6166 | for (int j=0; j<=i; j++ ){ |
| 6167 | double d = sqrt(Distance(atom.at(i).pos,atom.at(j).pos)); |
| 6168 | if ((atom.at(i).an>-1)&&(atom.at(j).an>-1)&&(atom.at(i).part!=0)&&(atom.at(j).part!=0)&&((bindPart.key(atom.at(i).part)==atom.at(j).part)||(bindPart.value(atom.at(i).part)==atom.at(j).part))){ |
| 6169 | soll=(Kovalenz_Radien[atom.at(i).an]+ Kovalenz_Radien[atom.at(j).an])*0.012; |
| 6170 | //printf("%f %f %s==%s %d %d %d %d\n",d,soll,atom.at(i).Label.toStdString().c_str(),atom.at(j).Label.toStdString().c_str(), atom.at(i).an,atom.at(j).an,atom.at(i).part,atom.at(j).part); |
| 6171 | } |
| 6172 | else { |
| 6173 | if ((atom.at(i).part<0)&&(atom.at(j).part!=0)&&(atom.at(i).symmGroup!=atom.at(j).symmGroup)) continue; |
| 6174 | if ((atom.at(j).part<0)&&(atom.at(i).part!=0)&&(atom.at(i).symmGroup!=atom.at(j).symmGroup)) continue; |
| 6175 | if ((atom.at(i).an==0)&&(atom.at(j).an==0)) continue; |
| 6176 | if ((atom.at(i).an>-1)&&(atom.at(j).an>-1)&& |
| 6177 | ((!atom.at(i).part)||(!atom.at(j).part)||(atom.at(i).part==atom.at(j).part))){ |
| 6178 | soll=(Kovalenz_Radien[atom.at(i).an]+ Kovalenz_Radien[atom.at(j).an])*0.012; |
| 6179 | //printf("%d + %d = %d %d %d\n",Kovalenz_Radien[atom.at(i).an], Kovalenz_Radien[atom.at(j).an], (Kovalenz_Radien[atom.at(i).an]+ Kovalenz_Radien[atom.at(j).an]) , atom.at(i).an, atom.at(j).an); |
| 6180 | //printf("%f %f %s==%s %d %d %d %d\n",d,soll,atom.at(i).Label.toStdString().c_str(),atom.at(j).Label.toStdString().c_str(), atom.at(i).an,atom.at(j).an,atom.at(i).part,atom.at(j).part); |
| 6181 | } |
| 6182 | else{ |
| 6183 | soll=-1; |
| 6184 | } |
| 6185 | } |
| 6186 | if ((d>0.1)&&(d<soll)) { |
| 6187 | bond.ato1=&atom[i]; |
| 6188 | bond.ato2=&atom[j]; |
| 6189 | bond.a1=i; |
| 6190 | bond.a2=j; |
| 6191 | bond.length=d; |
| 6192 | bonds.append(bond); |
| 6193 | } |
| 6194 | else if ((d<qboMax)&&(d>qboMin)){ |
| 6195 | if ((atom.at(i).an==-42)||(atom.at(j).an==-42)) continue;//belo: wuff! |
| 6196 | if ((atom.at(i).an==0)||(atom.at(j).an==0)) continue; |
| 6197 | if ((!atom.at(i).part)||(!atom.at(j).part)||(atom.at(i).part==atom.at(j).part)){ |
| 6198 | bond.ato1=&atom[i]; |
| 6199 | bond.ato2=&atom[j]; |
| 6200 | bond.a1=i; |
| 6201 | bond.a2=j; |
| 6202 | bond.length=d; |
| 6203 | lbonds.append(bond); |
| 6204 | } |
| 6205 | } |
| 6206 | } |
| 6207 | } |
| 6208 | //printf("connected %d\n",bonds.size()); |
| 6209 | //centroid metal bonds ... just normal bonds but bonds between metal and nonmetal that are close to the centroid will be removed. |
| 6210 | if (!eac) { |
| 6211 | bool weHaveCentroids=false; |
| 6212 | bool weHaveMetals=false; |
| 6213 | for (int i=0; i<atom.size(); i++){ |
| 6214 | if (AtomStyle[atom.at(i).an]&ATOM_STYLE_METAL){weHaveMetals=true;break;} |
| 6215 | } |
| 6216 | for (int i=0; i<atom.size(); i++){ |
| 6217 | if (atom.at(i).an==-66){weHaveCentroids=true;break;} |
| 6218 | } |
| 6219 | if (weHaveMetals && weHaveCentroids){ |
| 6220 | // printf("(weHaveMetals && weHaveCentroids)\n"); |
| 6221 | for (int i=0; i<atom.size(); i++){ |
| 6222 | if (atom.at(i).an==-66){ |
| 6223 | for (int j=0;j<atom.size();j++){ |
| 6224 | if (atom.at(j).an<1) continue; |
| 6225 | //printf("%d %d i=%d j=%d size=%d\n",atom.at(i).an,atom.at(j).an,i,j,atom.size()); |
| 6226 | if ((AtomStyle[atom.at(j).an]&ATOM_STYLE_METAL)==0)continue; |
| 6227 | soll=(70+Kovalenz_Radien[atom.at(j).an])*0.012; |
| 6228 | double d = sqrt(Distance(atom.at(i).pos,atom.at(j).pos)); |
| 6229 | if (d<soll){//add the centroid metal bond |
| 6230 | bond.ato1=&atom[i]; |
| 6231 | bond.ato2=&atom[j]; |
| 6232 | bond.a1=i; |
| 6233 | bond.a2=j; |
| 6234 | bond.length=d; |
| 6235 | for (int k=0;k<bonds.size();k++){ |
| 6236 | if ((bonds.at(k).a1==j)&&(atom.at(bonds.at(k).a2).an>0)&&((AtomStyle[atom.at(bonds.at(k).a2).an]&ATOM_STYLE_METAL)==0)){ |
| 6237 | d = sqrt(Distance(atom.at(i).pos,atom.at(bonds.at(k).a2).pos));//re-use d distance cnt -- non metal |
| 6238 | if ((d<qboMax)&&(d>qboMin)){ |
| 6239 | bonds.removeAt(k); |
| 6240 | // printf("1Removed metal non metal bond %s == %s\n",bonds.at(k).ato1->Label.toStdString().c_str(),bonds.at(k).ato2->Label.toStdString().c_str()); |
| 6241 | k=(k>0)?k-1:0; |
| 6242 | } |
| 6243 | }//a1 is a metal |
| 6244 | if ((bonds.at(k).a2==j)&&(atom.at(bonds.at(k).a1).an>0)&&((AtomStyle[atom.at(bonds.at(k).a1).an]&ATOM_STYLE_METAL)==0)){ |
| 6245 | d = sqrt(Distance(atom.at(i).pos,atom.at(bonds.at(k).a1).pos));//re-use d distance cnt -- non metal |
| 6246 | if ((d<qboMax)&&(d>qboMin)){ |
| 6247 | bonds.removeAt(k); |
| 6248 | //printf("2Removed metal non metal bond %s == %s\n",bonds.at(k).ato1->Label.toStdString().c_str(),bonds.at(k).ato2->Label.toStdString().c_str()); |
| 6249 | k=(k>0)?k-1:0; |
| 6250 | } |
| 6251 | }//a1 is a metal |
| 6252 | }//k |
| 6253 | bonds.append(bond); |
| 6254 | }//cnt metal contact |
| 6255 | }//j |
| 6256 | }//centroid |
| 6257 | }//i |
| 6258 | }//metals and centroids present |
| 6259 | }//!eac |
| 6260 | printf("bind size %d free size %d bonds %d lbonds %d\n",bindatoms.size(),freeatoms.size(),bonds.size(),lbonds.size()); |
| 6261 | if (!eac) for (int i=0; i<freeatoms.size(); i++){ |
| 6262 | MyAtom a1, a2; |
| 6263 | bool bo=false; |
| 6264 | if (freeatoms.at(i).Lab1.contains('_')) a1.resiNr=freeatoms.at(i).Lab1.section('_',1,1).toInt(&bo); |
| 6265 | if (!bo) a1.resiNr=-1; |
| 6266 | if (freeatoms.at(i).Lab2.contains('_'))a2.resiNr=freeatoms.at(i).Lab2.section('_',1,1).toInt(&bo); |
| 6267 | if (!bo)a2.resiNr=-1; |
| 6268 | a1.Label = freeatoms.at(i).Lab1.section('_',0,0); |
| 6269 | a2.Label = freeatoms.at(i).Lab2.section('_',0,0); |
| 6270 | //printf("#%d %d\n",a2.resiNr,a1.resiNr); |
| 6271 | |
| 6272 | for (int j=0;j<bonds.size();j++){ |
| 6273 | if (((a1.resiNr>-1)&& (bonds.at(j).ato1->resiNr!=a1.resiNr))|| |
| 6274 | ((a2.resiNr>-1)&& (bonds.at(j).ato2->resiNr!=a2.resiNr))) continue; |
| 6275 | if (((a1.resiNr>-1)&& (bonds.at(j).ato2->resiNr!=a1.resiNr))|| |
| 6276 | ((a2.resiNr>-1)&& (bonds.at(j).ato1->resiNr!=a2.resiNr))) continue; |
| 6277 | if (((bonds.at(j).ato1->Label.section('_',0,0).toUpper()== a1.Label)&& |
| 6278 | (bonds.at(j).ato2->Label.section('_',0,0).toUpper()== a2.Label))|| |
| 6279 | ((bonds.at(j).ato2->Label.section('_',0,0).toUpper()== a1.Label)&& |
| 6280 | (bonds.at(j).ato1->Label.section('_',0,0).toUpper()== a2.Label))){ |
| 6281 | bonds.removeAt(j); |
| 6282 | j=qMax(j-1,0); |
| 6283 | } |
| 6284 | } |
| 6285 | } |
| 6286 | if (!eac) for (int i=0; i<bindatoms.size(); i++){ |
| 6287 | MyAtom a1, a2; |
| 6288 | bool bo=false; |
| 6289 | int sy1=-1,sy2=-1; |
| 6290 | if (bindatoms.at(i).Lab1.contains("_$"))sy1=bindatoms.at(i).Lab1.section("_$",1,1).toInt(&bo); |
| 6291 | if (bindatoms.at(i).Lab2.contains("_$"))sy2=bindatoms.at(i).Lab2.section("_$",1,1).toInt(&bo); |
| 6292 | bo=false; |
| 6293 | if (bindatoms.at(i).Lab1.contains('_'))a1.resiNr=bindatoms.at(i).Lab1.section('_',1,1).toInt(&bo); |
| 6294 | if (!bo) a1.resiNr=-1; |
| 6295 | if (bindatoms.at(i).Lab2.contains('_'))a2.resiNr=bindatoms.at(i).Lab2.section('_',1,1).toInt(&bo); |
| 6296 | if (!bo)a2.resiNr=-1; |
| 6297 | a1.Label = bindatoms.at(i).Lab1.section('_',0,0); |
| 6298 | a2.Label = bindatoms.at(i).Lab2.section('_',0,0); |
| 6299 | printf("#>%d %d %d %d [%d] %s === %s\n",a2.resiNr,a1.resiNr,sy1,sy2,i,a1.Label.toStdString().c_str(),a2.Label.toStdString().c_str()); |
| 6300 | double mindd=50.0; |
| 6301 | printf("-Q %d\n",eqivMap.size()); |
| 6302 | if ((!eqivMap.isEmpty())&&(qMax(sy1,sy2)>0)) { |
| 6303 | // printf("sg %d\n",eqivMap.value(QString("$%1").arg(sy2))); |
| 6304 | // printf("%s %s\n",a1.Label.toUpper().toStdString().c_str(),a2.Label.toUpper().toStdString().c_str()); |
| 6305 | for (int iii=0; iii<atom.size(); iii++){ |
| 6306 | for (int jjj=0; jjj<atom.size(); jjj++){ |
| 6307 | if ((a1.resiNr>-1)&& (atom.at(iii).resiNr!=a1.resiNr)) continue; |
| 6308 | if ((a2.resiNr>-1)&& (atom.at(jjj).resiNr!=a2.resiNr)) continue; |
| 6309 | if ((sy1>-0)&&(atom.at(iii).symmGroup==0)) continue; |
| 6310 | if ((sy2>-0)&&(atom.at(jjj).symmGroup==0)) continue; |
| 6311 | //printf("sg %d\n",eqivMap.value(QString("$%1").arg(sy1))); |
| 6312 | if ((sy1>-0)&&(eqivMap.value(QString("$%1").arg(sy1))!=atom.at(iii).symmGroup)) continue; |
| 6313 | if ((sy2>-0)&&(eqivMap.value(QString("$%1").arg(sy2))!=atom.at(jjj).symmGroup)) continue; |
| 6314 | if ((atom.at(iii).Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper() == a1.Label.toUpper())&& |
| 6315 | (atom.at(jjj).Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper() == a2.Label.toUpper())){ |
| 6316 | bond.ato1=&atom[iii]; |
| 6317 | bond.ato2=&atom[jjj]; |
| 6318 | bond.a1=iii; |
| 6319 | bond.a2=jjj; |
| 6320 | bond.length=sqrt(Distance(atom[iii].pos,atom[jjj].pos)); |
| 6321 | printf("%g %f\n",bond.length,mindd); |
| 6322 | if ((mindd+0.01)>=bond.length) bonds.append(bond); |
| 6323 | if (bond.length>0.7) mindd=qMin(bond.length, mindd); |
| 6324 | |
| 6325 | } |
| 6326 | } |
| 6327 | } |
| 6328 | }else{ |
| 6329 | // printf("sg %d\n",eqivMap.value(QString("$%1").arg(sy2))); |
| 6330 | // printf("%s %s\n",a1.Label.toUpper().toStdString().c_str(),a2.Label.toUpper().toStdString().c_str()); |
| 6331 | for (int iii=0; iii<atom.size(); iii++){ |
| 6332 | for (int jjj=0; jjj<atom.size(); jjj++){ |
| 6333 | if ((a1.resiNr>-1)&& (atom.at(iii).resiNr!=a1.resiNr)) continue; |
| 6334 | if ((a2.resiNr>-1)&& (atom.at(jjj).resiNr!=a2.resiNr)) continue; |
| 6335 | if ((atom.at(iii).Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper() == a1.Label.toUpper())&& |
| 6336 | (atom.at(jjj).Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper() == a2.Label.toUpper())){ |
| 6337 | bond.ato1=&atom[iii]; |
| 6338 | bond.ato2=&atom[jjj]; |
| 6339 | bond.a1=iii; |
| 6340 | bond.a2=jjj; |
| 6341 | bond.length=sqrt(Distance(atom[iii].pos,atom[jjj].pos)); |
| 6342 | printf("%g %f\n",bond.length,mindd); |
| 6343 | if ((mindd+0.01)>=bond.length) bonds.append(bond); |
| 6344 | if (bond.length>0.7) mindd=qMin(bond.length, mindd); |
| 6345 | |
| 6346 | } |
| 6347 | } |
| 6348 | } |
| 6349 | } |
| 6350 | for (int j=0; j < bonds.size(); j++){ |
| 6351 | if (((bonds.at(j).ato1->Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper()==a1.Label.toUpper())&& |
| 6352 | (bonds.at(j).ato2->Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper()==a2.Label.toUpper()))|| |
| 6353 | ((bonds.at(j).ato1->Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper()==a2.Label.toUpper())&& |
| 6354 | (bonds.at(j).ato2->Label.section('_',0,0).section(QString::fromUtf8("»"),0,0).toUpper()==a1.Label.toUpper()))) |
| 6355 | if (bonds.at(j).length>(mindd+0.1)) { |
| 6356 | double d=bonds.at(j).length; |
| 6357 | printf("-- %f %f\n",d,mindd); |
| 6358 | bonds.removeAt(j); |
| 6359 | if (j) j--; |
| 6360 | } |
| 6361 | } |
| 6362 | } |
| 6363 | printf(">>>bind size %d free size %d bonds %d lbonds %d\n",bindatoms.size(),freeatoms.size(),bonds.size(),lbonds.size()); |
| 6364 | |
| 6365 | //-->Verknopfung !!! |
| 6366 | if (!eac){ |
| 6367 | for (int i=0; i<knoepfe.size();i++) knoepfe[i].neighbors.clear(); |
| 6368 | knoepfe.clear(); |
| 6369 | Knopf kn; |
| 6370 | kn.neighbors.clear(); |
| 6371 | for (int i=0; i<atom.size(); i++){ |
| 6372 | kn.neighbors.clear(); |
| 6373 | for (int j=0; j<bonds.size(); j++){ |
| 6374 | if (bonds.at(j).a1==i){ |
| 6375 | kn.neighbors.append(bonds.at(j).a2); |
| 6376 | } |
| 6377 | if (bonds.at(j).a2==i){ |
| 6378 | kn.neighbors.append(bonds.at(j).a1); |
| 6379 | } |
| 6380 | } |
| 6381 | neighborSort(kn); |
| 6382 | knoepfe.append(kn); |
| 6383 | } |
| 6384 | } |
| 6385 | return bonds; |
| 6386 | } |
| 6387 | |
| 6388 | double Molecule::fl(double x,double y,double z){ |
| 6389 | double a,b,c; |
| 6390 | a = (cell.ga==90.0)?0.0:2.0*x*y*cell.a*cell.b*cell.cosga; |
| 6391 | b = (cell.be==90.0)?0.0:2.0*x*z*cell.a*cell.c*cell.cosbe; |
| 6392 | c = (cell.al==90.0)?0.0:2.0*y*z*cell.b*cell.c*cell.cosal; |
| 6393 | double erg=sqrt(x*x*cell.a*cell.a+ |
| 6394 | y*y*cell.b*cell.b+ |
| 6395 | z*z*cell.c*cell.c+ |
| 6396 | a+b+c); |
| 6397 | return erg; |
| 6398 | } |
| 6399 | |
| 6400 | double Molecule::wl(V3 p2, V3 p1, V3 p3){ |
| 6401 | V3 f1=p2-p1;//12 |
| 6402 | V3 f2=p3-p1;//13 |
| 6403 | V3 f3=p3-p2;//23 |
| 6404 | double a=0,b=0,c=0; |
| 6405 | a = (cell.ga==90.0)?0.0:2.0*f1.x*f1.y*cell.a*cell.b*cell.cosga; |
| 6406 | a += (cell.be==90.0)?0.0:2.0*f1.x*f1.z*cell.a*cell.c*cell.cosbe; |
| 6407 | a += (cell.al==90.0)?0.0:2.0*f1.y*f1.z*cell.b*cell.c*cell.cosal; |
| 6408 | |
| 6409 | b = (cell.ga==90.0)?0.0:2.0*f2.x*f2.y*cell.a*cell.b*cell.cosga; |
| 6410 | b += (cell.be==90.0)?0.0:2.0*f2.x*f2.z*cell.a*cell.c*cell.cosbe; |
| 6411 | b += (cell.al==90.0)?0.0:2.0*f2.y*f2.z*cell.b*cell.c*cell.cosal; |
| 6412 | |
| 6413 | c = ( cell.ga==90.0)?0.0:2.0*f3.x*f3.y*cell.a*cell.b*cell.cosga; |
| 6414 | c += (cell.be==90.0)?0.0:2.0*f3.x*f3.z*cell.a*cell.c*cell.cosbe; |
| 6415 | c += (cell.al==90.0)?0.0:2.0*f3.y*f3.z*cell.b*cell.c*cell.cosal; |
| 6416 | double d12,d13,d23; |
| 6417 | d12 = f1.x*f1.x*cell.a*cell.a+ |
| 6418 | f1.y*f1.y*cell.b*cell.b+ |
| 6419 | f1.z*f1.z*cell.c*cell.c+a; |
| 6420 | d13 = f2.x*f2.x*cell.a*cell.a+ |
| 6421 | f2.y*f2.y*cell.b*cell.b+ |
| 6422 | f2.z*f2.z*cell.c*cell.c+b; |
| 6423 | d23 = f3.x*f3.x*cell.a*cell.a+ |
| 6424 | f3.y*f3.y*cell.b*cell.b+ |
| 6425 | f3.z*f3.z*cell.c*cell.c+c; |
| 6426 | double erg=acos((d12+d13-d23)/(2.0*sqrt(d12)*sqrt(d13)))*g2r; |
| 6427 | return erg; |
| 6428 | } |
| 6429 | |
| 6430 | void Molecule::cellSetup(){ |
| 6431 | cell.cosal=cos(cell.al/g2r); |
| 6432 | cell.cosbe=cos(cell.be/g2r); |
| 6433 | cell.cosga=cos(cell.ga/g2r); |
| 6434 | cell.sinal=sin(cell.al/g2r); |
| 6435 | cell.sinbe=sin(cell.be/g2r); |
| 6436 | cell.singa=sin(cell.ga/g2r); |
| 6437 | cell.tanga=tan(cell.ga/g2r); |
| 6438 | cell.phi= sqrt(1-(cell.cosal*cell.cosal)- |
| 6439 | (cell.cosbe*cell.cosbe)-(cell.cosga*cell.cosga) |
| 6440 | +2*cell.cosal*cell.cosbe*cell.cosga); |
| 6441 | cell.tau=cell.c *((cell.cosal- cell.cosbe* cell.cosga)/ cell.singa); |
| 6442 | cell.V = cell.a*cell.b*cell.c*cell.phi; |
| 6443 | cell.as=cell.c*cell.b*cell.sinal/cell.V; |
| 6444 | cell.bs=cell.c*cell.a*cell.sinbe/cell.V; |
| 6445 | cell.cs=cell.a*cell.b*cell.singa/cell.V; |
| 6446 | cell.cosra = (cell.cosbe*cell.cosga-cell.cosal)/(cell.sinbe*cell.singa); |
| 6447 | cell.cosrb = (cell.cosga*cell.cosal-cell.cosbe)/(cell.singa*cell.sinal); |
| 6448 | cell.cosrg = (cell.cosal*cell.cosbe-cell.cosga)/(cell.sinal*cell.sinbe); |
| 6449 | cell.G.m11=cell.a*cell.a; |
| 6450 | cell.G.m22=cell.b*cell.b; |
| 6451 | cell.G.m33=cell.c*cell.c; |
| 6452 | cell.G.m12=cell.G.m21=cell.a*cell.b*cell.cosga; |
| 6453 | cell.G.m13=cell.G.m31=cell.a*cell.c*cell.cosbe; |
| 6454 | cell.G.m23=cell.G.m32=cell.b*cell.c*cell.cosal; |
| 6455 | cell.Gi=inverse(cell.G); |
| 6456 | cell.Cholesky = cholesky(); |
| 6457 | } |
| 6458 | |
| 6459 | void Molecule::applyLatticeCentro(int gitter){ |
| 6460 | /*! Adds centrings and inversion symmetry to the symmops and trans list. |
| 6461 | * @param gitter the parameter of the shelx LATT instruction. ==> see Shelxl manual. |
| 6462 | */ |
| 6463 | int z=cell.symmops.size(); |
| 6464 | cell.ns0=z; |
| 6465 | Matrix inv(-1.0,0.0,0.0, 0.0,-1.0,0.0, 0.0,0.0,-1.0); |
| 6466 | cell.centeric=false; |
| 6467 | if (gitter>0){ |
| 6468 | for (int i=0; i<z;i++){ |
| 6469 | Matrix m=cell.symmops.at(i)*inv; |
| 6470 | cell.symmops.append(m); |
| 6471 | cell.trans.append(cell.trans.at(i)); |
| 6472 | } |
| 6473 | cell.centeric=true; |
| 6474 | } |
| 6475 | latt=gitter; |
| 6476 | gitter=(gitter>0)?gitter:-gitter; |
| 6477 | z=cell.symmops.size(); |
| 6478 | cell.centered=false; |
| 6479 | switch (gitter){ |
| 6480 | case 5 : |
| 6481 | for (int i=0; i<z;i++){ |
| 6482 | V3 tt = cell.trans.at(i)+V3(0.0, 0.5, 0.5); |
| 6483 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6484 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6485 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6486 | cell.symmops.append(cell.symmops.at(i)); |
| 6487 | cell.trans.append(tt); |
| 6488 | cell.centered=true; |
| 6489 | } |
| 6490 | break; |
| 6491 | case 6 : |
| 6492 | for (int i=0; i<z;i++){ |
| 6493 | V3 tt = cell.trans.at(i)+V3(0.5, 0.0, 0.5); |
| 6494 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6495 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6496 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6497 | cell.symmops.append(cell.symmops.at(i)); |
| 6498 | cell.trans.append(tt); |
| 6499 | cell.centered=true; |
| 6500 | } |
| 6501 | break; |
| 6502 | case 7 : |
| 6503 | for (int i=0; i<z;i++){ |
| 6504 | V3 tt = cell.trans.at(i)+V3(0.5, 0.5, 0.0); |
| 6505 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6506 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6507 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6508 | cell.symmops.append(cell.symmops.at(i)); |
| 6509 | cell.trans.append(tt); |
| 6510 | cell.centered=true; |
| 6511 | } |
| 6512 | break; |
| 6513 | case 4 : |
| 6514 | for (int i=0; i<z;i++){ |
| 6515 | V3 tt = cell.trans.at(i)+V3(0.0, 0.5, 0.5); |
| 6516 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6517 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6518 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6519 | cell.symmops.append(cell.symmops.at(i)); |
| 6520 | cell.trans.append(tt); |
| 6521 | tt = cell.trans.at(i)+V3(0.5, 0.0, 0.5); |
| 6522 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6523 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6524 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6525 | cell.symmops.append(cell.symmops.at(i)); |
| 6526 | cell.trans.append(tt); |
| 6527 | tt = cell.trans.at(i)+V3(0.5, 0.5, 0.0); |
| 6528 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6529 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6530 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6531 | cell.symmops.append(cell.symmops.at(i)); |
| 6532 | cell.trans.append(tt); |
| 6533 | cell.centered=true; |
| 6534 | } |
| 6535 | break; |
| 6536 | case 2 : |
| 6537 | for (int i=0; i<z;i++){ |
| 6538 | V3 tt = cell.trans.at(i)+V3(0.5, 0.5, 0.5); |
| 6539 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6540 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6541 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6542 | cell.symmops.append(cell.symmops.at(i)); |
| 6543 | cell.trans.append(tt); |
| 6544 | cell.centered=true; |
| 6545 | } |
| 6546 | break; |
| 6547 | case 3 : |
| 6548 | for (int i=0; i<z;i++){ |
| 6549 | V3 tt = cell.trans.at(i)+V3(2.0/3.0, 1.0/3.0, 1.0/3.0); |
| 6550 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6551 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6552 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6553 | cell.symmops.append(cell.symmops.at(i)); |
| 6554 | cell.trans.append(tt); |
| 6555 | tt = cell.trans.at(i)+V3(1.0/3.0, 2.0/3.0, 2.0/3.0); |
| 6556 | tt.x=(tt.x>1)?tt.x-1:tt.x; |
| 6557 | tt.y=(tt.y>1)?tt.y-1:tt.y; |
| 6558 | tt.z=(tt.z>1)?tt.z-1:tt.z; |
| 6559 | cell.symmops.append(cell.symmops.at(i)); |
| 6560 | cell.trans.append(tt); |
| 6561 | cell.centered=true; |
| 6562 | |
| 6563 | } |
| 6564 | break; |
| 6565 | case 0 :break; |
| 6566 | } |
| 6567 | |
| 6568 | } |
| 6569 | |
| 6570 | double Molecule::dimension(){ |
| 6571 | /*! calculates the maximal interatomic distance (Ang) of showatoms environment if this is 0 then 10.0 is returned instead. |
| 6572 | */ |
| 6573 | double max=0,gg=0; |
| 6574 | for (int i=0;i<showatoms.size();i++) |
| 6575 | for (int j=i+1;j<showatoms.size();j++){ |
| 6576 | if ((showatoms[j].an>=0)&&(showatoms[j].an>=0)) |
| 6577 | gg=sqrt( Distance(showatoms[i].pos,showatoms[j].pos)); |
| 6578 | max=(max<gg)?gg:max; |
| 6579 | } |
| 6580 | if (max==0) return 10.0; |
| 6581 | return max; |
| 6582 | } |
| 6583 | |
| 6584 | double Molecule::dimension(CEnvironment ce){ |
| 6585 | /*! calculates the maximal interatomic distance (Ang) of showatoms environment if this is 0 then 10.0 is returned instead. |
| 6586 | */ |
| 6587 | double max=0,gg=0; |
| 6588 | for (int i=0;i<ce.size();i++) |
| 6589 | for (int j=i+1;j<ce.size();j++){ |
| 6590 | if ((ce[j].an>=0)&&(ce[j].an>=0)) |
| 6591 | gg=sqrt( Distance(ce[i].pos,ce[j].pos)); |
| 6592 | max=(max<gg)?gg:max; |
| 6593 | } |
| 6594 | if (max==0) return 10.0; |
| 6595 | return max; |
| 6596 | } |
| 6597 | |
| 6598 | #define Ato4d(arr) arr[0], arr[1], arr[2], arr[3] |
| 6599 | |
| 6600 | void Molecule::atoms(CEnvironment atom,int proba, double radScal){ |
| 6601 | /*! Draws atoms as spheres or as ellipses cubes or icosahedrons. |
| 6602 | * @params atoms list of atoms to be drawn . |
| 6603 | * @params proba ellipsoid probability (currently 10 30 50 70 90 %). |
| 6604 | * |
| 6605 | * Molecule.dratom controls the wireframe style of the resulting atom . |
| 6606 | * |
| 6607 | * Molecule.tubes atom balls is drawn in bondstrength. |
| 6608 | * |
| 6609 | * Molecule.adp atom is drawn as a ellipsoid. |
| 6610 | * |
| 6611 | * Molecule.monoQrom Q-Peaks are drawn in Color Molecule.mQolor . |
| 6612 | * */ |
| 6613 | if (atom.isEmpty())return; |
| 6614 | if (shaders_work&&g_program&&(g_Program!=NULL)) { |
| 6615 | Licht=1; |
| 6616 | if (!g_Program->bind()) qWarning() << "Could not bind program to the context"; |
| 6617 | g_Program->setUniformValue(lichtH,1); |
| 6618 | /*glGetUniformiv(g_program,lichtH,&Licht); |
| 6619 | if (!Licht) { |
| 6620 | int ect=0; |
| 6621 | GLenum err = GL_NO_ERROR; |
| 6622 | while((err = glGetError()) != GL_NO_ERROR) |
| 6623 | { |
| 6624 | printf("DAVOR %d %d [%d]\n",err==GL_INVALID_VALUE ,err == GL_INVALID_OPERATION,++ect); |
| 6625 | } |
| 6626 | }*/ |
| 6627 | shaderAtoms(atom, proba, radScal); |
| 6628 | g_Program->release(); |
| 6629 | return; |
| 6630 | }//else{printf("%d %d %d %p\n",shaders_work,g_program,useShaders,g_Program);} |
| 6631 | /* |
| 6632 | int myAdp=adp; |
| 6633 | int myStyle=7; |
| 6634 | int pminus=0; |
| 6635 | int wire=0; |
| 6636 | GLfloat white[4]={0.2f, 0.2f, 0.3f, 0.0f}; |
| 6637 | GLfloat black[4]={0.0f, 0.0f, 0.0f, 1.0f}; |
| 6638 | for (int i=0; i<atom.size();i++){ |
| 6639 | if ((!dratom)&&(atom.at(i).hidden)) continue; |
| 6640 | if ((nopm1)&&(atom.at(i).symmGroup)&&(atom.at(i).part<0))continue; |
| 6641 | if ((dratom==2)&&(atom.at(i).part==0))continue; |
| 6642 | if ((dratom==2)&&(atom.at(i).symmGroup)&&(atom.at(i).part<0))continue; |
| 6643 | if ((dratom==2)&&(atom.at(i).hidden))continue; |
| 6644 | if ((dratom==5)&&(atom.at(i).hidden))continue; |
| 6645 | int nonPositiveDefinite=0; |
| 6646 | glPushMatrix(); |
| 6647 | nonPositiveDefinite=0; |
| 6648 | glTranslated(atom.at(i).pos.x,atom.at(i).pos.y,atom.at(i).pos.z); |
| 6649 | double rad=(atom.at(i).an==-2)?0.5:qPeakRad; |
| 6650 | bool parthigh=false; |
| 6651 | if (dratom==5){ |
| 6652 | wire=1; |
| 6653 | dratom=0; |
| 6654 | } |
| 6655 | if (dratom==2) { |
| 6656 | dratom=0; |
| 6657 | parthigh=true; |
| 6658 | } |
| 6659 | if (!dratom){ |
| 6660 | // printf("ph %d alpha %g tubes %d,myAdp %d %d\n",parthigh,atomColor(atom.at(i).an].alphaF(),tubes,myAdp,((!myAdp)||((myStyle&ATOM_STYLE_SPHERE)&&(!(myStyle&ATOM_STYLE_SOLID))))); |
| 6661 | if (atom.at(i).an>-1) { |
| 6662 | myStyle=AtomStyle[atom.at(i).an]; |
| 6663 | //printf("style: %X\n",myStyle); |
| 6664 | if (atom.at(i).Label.contains("(noADP)")) myStyle|=ATOM_STYLE_NOADP; |
| 6665 | glColor4d(atomColor(atom.at(i).an).redF(), |
| 6666 | atomColor(atom.at(i).an).greenF(), |
| 6667 | atomColor(atom.at(i).an).blueF(), |
| 6668 | atomColor(atom.at(i).an).alphaF()); |
| 6669 | rad=arad[atom.at(i).an]; |
| 6670 | if (parthigh) { |
| 6671 | QColor pcolor=PartColor::color(atom.at(i).part); |
| 6672 | if (atom.at(i).part==666) pcolor.setAlpha(200); |
| 6673 | else pcolor.setAlpha(140); |
| 6674 | glColor4d(pcolor.redF(), |
| 6675 | pcolor.greenF(), |
| 6676 | pcolor.blueF(), |
| 6677 | pcolor.alphaF()); |
| 6678 | } |
| 6679 | |
| 6680 | if ((highlightEquivalents)&&(!parthigh)&&(atom.at(i).symmGroup)) { |
| 6681 | glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,white ); |
| 6682 | glColor4d(qMin(1.0,(atomColor(atom.at(i).an).redF()+0.1) * 1.2), |
| 6683 | qMin(1.0,(atomColor(atom.at(i).an).greenF()+0.1) * 1.2), |
| 6684 | qMin(1.0,(atomColor(atom.at(i).an).blueF()+0.1) * 1.2), |
| 6685 | 1.0); |
| 6686 | } |
| 6687 | else glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,black ); |
| 6688 | if ((atom.at(i).symmGroup)&&(atom.at(i).part<0)){ |
| 6689 | glColor4d(atomColor(atom.at(i).an).redF(), |
| 6690 | atomColor(atom.at(i).an).greenF(), |
| 6691 | 1.0, |
| 6692 | 0.3); |
| 6693 | pminus=1; |
| 6694 | // myStyle|=ATOM_STYLE_NOADP; |
| 6695 | } |
| 6696 | myAdp=(myStyle&ATOM_STYLE_NOADP)?0:adp; |
| 6697 | } |
| 6698 | if (wire) {myStyle|=ATOM_STYLE_SPHERE;if (myStyle&ATOM_STYLE_SOLID)myStyle-=ATOM_STYLE_SOLID; } |
| 6699 | if (tubes){ |
| 6700 | rad=bondStrength; |
| 6701 | if (atom.at(i).part==666) rad*=4.5; |
| 6702 | myAdp=0; |
| 6703 | nonPositiveDefinite=0; |
| 6704 | } |
| 6705 | |
| 6706 | if ((atom.at(i).an<0)||(atom.at(i).Label.startsWith('Q',Qt::CaseInsensitive))){ |
| 6707 | glColor4d(1.0 ,0.7, 0.8 ,0.4); |
| 6708 | if (atom.at(i).an==-66) { |
| 6709 | rad*=2; |
| 6710 | glColor4d(0.6,0.3,0.1,0.3); |
| 6711 | dodecaeder(rad); |
| 6712 | }else{ |
| 6713 | if((atom.at(i).an==-1)&&(!monoQrom)) Farbverlauf(atom.at(i).peakHeight, pmin, pmax); |
| 6714 | if (monoQrom) glColor3d(mQolor.redF(),mQolor.greenF(),mQolor.blueF()); |
| 6715 | // if (!wire) |
| 6716 | icosaeder(rad); |
| 6717 | } |
| 6718 | } |
| 6719 | else { |
| 6720 | if (myAdp){ |
| 6721 | V3 ev=V3(0,0,0); |
| 6722 | double *arr=jacobi(atom.at(i).uc,ev); |
| 6723 | if ((ev.x>0)&&(ev.y>0)&&(ev.z>0)){ |
| 6724 | nonPositiveDefinite=0; |
| 6725 | glRotated(Ato4d(arr)); |
| 6726 | double psc=(parthigh)?1.32:1.0; |
| 6727 | if (atom.at(i).part==666) psc*=1.2; |
| 6728 | switch (proba ) { |
| 6729 | case 10 :{ glScaled(0.76*sqrt(ev.x)*psc,0.76*sqrt(ev.y)*psc,0.76*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 10% Wahrscheinlichkeit |
| 6730 | case 30 :{ glScaled(1.19*sqrt(ev.x)*psc,1.19*sqrt(ev.y)*psc,1.19*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 30% Wahrscheinlichkeit |
| 6731 | case 50 :{ glScaled(1.54*sqrt(ev.x)*psc,1.54*sqrt(ev.y)*psc,1.54*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 50% Wahrscheinlichkeit |
| 6732 | case 70 :{ glScaled(1.91*sqrt(ev.x)*psc,1.91*sqrt(ev.y)*psc,1.91*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 70% Wahrscheinlichkeit |
| 6733 | case 90 :{ glScaled(2.50*sqrt(ev.x)*psc,2.50*sqrt(ev.y)*psc,2.50*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 90% Wahrscheinlichkeit |
| 6734 | default: ; |
| 6735 | } |
| 6736 | }else {nonPositiveDefinite=1;} |
| 6737 | } |
| 6738 | |
| 6739 | if (parthigh) { |
| 6740 | rad*=1.32; |
| 6741 | if (atom.at(i).part==666) rad*=1.2; |
| 6742 | glEnable(GL_BLEND); |
| 6743 | myStyle&=(ATOM_STYLE_SPHERE|ATOM_STYLE_NOADP); |
| 6744 | myStyle|=ATOM_STYLE_SPHERE; |
| 6745 | } |
| 6746 | |
| 6747 | / * |
| 6748 | #define ATOM_STYLE_WALLS 1 |
| 6749 | #define ATOM_STYLE_RINGS 2 |
| 6750 | #define ATOM_STYLE_SPHERE 4 |
| 6751 | #define ATOM_STYLE_SOLID 8 |
| 6752 | #define ATOM_STYLE_WHITERING 16 |
| 6753 | #define ATOM_STYLE_NOLABEL 32 |
| 6754 | * / |
| 6755 | if (atom.at(i).an>-1) { |
| 6756 | if (myAdp&&intern) { |
| 6757 | if (!nonPositiveDefinite) ellipse(myStyle); |
| 6758 | else { |
| 6759 | cube(rad); |
| 6760 | } |
| 6761 | |
| 6762 | } |
| 6763 | else if ((!myAdp)||((myStyle&ATOM_STYLE_SPHERE)&&(!(myStyle&ATOM_STYLE_SOLID)))){ |
| 6764 | rad*=radScal; |
| 6765 | if (!myAdp) glScaled(rad,rad,rad); |
| 6766 | if (!nonPositiveDefinite) { |
| 6767 | if (wire)dratom =5; |
| 6768 | sphere(myAdp|pminus); |
| 6769 | } |
| 6770 | else { |
| 6771 | cube(rad); |
| 6772 | } |
| 6773 | } |
| 6774 | } |
| 6775 | else |
| 6776 | icosaeder(rad); |
| 6777 | } |
| 6778 | } |
| 6779 | else{ |
| 6780 | atom[i].hidden=0; |
| 6781 | sphere(0); |
| 6782 | } |
| 6783 | // glEnable(GL_COLOR_MATERIAL); |
| 6784 | glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,black ); |
| 6785 | glPopMatrix(); |
| 6786 | if (parthigh) dratom=2; |
| 6787 | }*/ |
| 6788 | } |
| 6789 | |
| 6790 | void Molecule::billBoard(){ |
| 6791 | const GLfloat v[]={ |
| 6792 | 0.f,0.f,0.f, |
| 6793 | 1.f,0.f,0.f, |
| 6794 | 1.f,1.f,0.f, |
| 6795 | 0.f,1.f,0.f, |
| 6796 | 0.f,0.f,0.f, |
| 6797 | 1.f,1.f,0.f |
| 6798 | }; |
| 6799 | glEnableClientState(GL_VERTEX_ARRAY); |
| 6800 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
| 6801 | glVertexPointer(3, GL_FLOAT, 0, v); |
| 6802 | glTexCoordPointer(3, GL_FLOAT, 0, v); |
| 6803 | glDrawArrays(GL_TRIANGLES, 0, 6); |
| 6804 | glDisableClientState(GL_VERTEX_ARRAY); |
| 6805 | glDisableClientState(GL_NORMAL_ARRAY); |
| 6806 | glDisableClientState(GL_VERTEX_ARRAY); |
| 6807 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
| 6808 | } |
| 6809 | |
| 6810 | void Molecule::pappe(){ |
| 6811 | glEnable(GL_ALPHA_TEST); |
| 6812 | g_Program->setUniformValue(wallH, 1); |
| 6813 | const GLfloat v[]={ |
| 6814 | -1.f,-1.f, 0.f, |
| 6815 | 1.f,-1.f, 0.f, |
| 6816 | -1.f, 1.f, 0.f, |
| 6817 | |
| 6818 | -1.f, 1.f, 0.f, |
| 6819 | 1.f,-1.f, 0.f, |
| 6820 | 1.f, 1.f, 0.f, |
| 6821 | |
| 6822 | -1.f, 0.f,-1.f, |
| 6823 | 1.f, 0.f,-1.f, |
| 6824 | -1.f, 0.f, 1.f, |
| 6825 | |
| 6826 | -1.f, 0.f, 1.f, |
| 6827 | 1.f, 0.f,-1.f, |
| 6828 | 1.f, 0.f, 1.f, |
| 6829 | |
| 6830 | 0.f,-1.f,-1.f, |
| 6831 | 0.f, 1.f,-1.f, |
| 6832 | 0.f,-1.f, 1.f, |
| 6833 | |
| 6834 | 0.f,-1.f, 1.f, |
| 6835 | 0.f, 1.f,-1.f, |
| 6836 | 0.f, 1.f, 1.f, |
| 6837 | |
| 6838 | 1.f,-1.f, 0.f, |
| 6839 | -1.f,-1.f, 0.f, |
| 6840 | -1.f, 1.f, 0.f, |
| 6841 | |
| 6842 | 1.f,-1.f, 0.f, |
| 6843 | -1.f, 1.f, 0.f, |
| 6844 | 1.f, 1.f, 0.f, |
| 6845 | |
| 6846 | 1.f, 0.f,-1.f, |
| 6847 | -1.f, 0.f,-1.f, |
| 6848 | -1.f, 0.f, 1.f, |
| 6849 | |
| 6850 | 1.f, 0.f,-1.f, |
| 6851 | -1.f, 0.f, 1.f, |
| 6852 | 1.f, 0.f, 1.f, |
| 6853 | |
| 6854 | 0.f, 1.f,-1.f, |
| 6855 | 0.f,-1.f,-1.f, |
| 6856 | 0.f,-1.f, 1.f, |
| 6857 | |
| 6858 | 0.f, 1.f,-1.f, |
| 6859 | 0.f,-1.f, 1.f, |
| 6860 | 0.f, 1.f, 1.f |
| 6861 | }; |
| 6862 | const GLfloat n[]={ |
| 6863 | 0.f, 0.f, 1.f, |
| 6864 | 0.f, 0.f, 1.f, |
| 6865 | 0.f, 0.f, 1.f, |
| 6866 | |
| 6867 | 0.f, 0.f, 1.f, |
| 6868 | 0.f, 0.f, 1.f, |
| 6869 | 0.f, 0.f, 1.f, |
| 6870 | |
| 6871 | 0.f,-1.f, 0.f, |
| 6872 | 0.f,-1.f, 0.f, |
| 6873 | 0.f,-1.f, 0.f, |
| 6874 | |
| 6875 | 0.f,-1.f, 0.f, |
| 6876 | 0.f,-1.f, 0.f, |
| 6877 | 0.f,-1.f, 0.f, |
| 6878 | |
| 6879 | 1.f, 0.f, 0.f, |
| 6880 | 1.f, 0.f, 0.f, |
| 6881 | 1.f, 0.f, 0.f, |
| 6882 | |
| 6883 | 1.f, 0.f, 0.f, |
| 6884 | 1.f, 0.f, 0.f, |
| 6885 | 1.f, 0.f, 0.f, |
| 6886 | |
| 6887 | |
| 6888 | 0.f, 0.f,-1.f, |
| 6889 | 0.f, 0.f,-1.f, |
| 6890 | 0.f, 0.f,-1.f, |
| 6891 | |
| 6892 | 0.f, 0.f,-1.f, |
| 6893 | 0.f, 0.f,-1.f, |
| 6894 | 0.f, 0.f,-1.f, |
| 6895 | |
| 6896 | 0.f, 1.f, 0.f, |
| 6897 | 0.f, 1.f, 0.f, |
| 6898 | 0.f, 1.f, 0.f, |
| 6899 | |
| 6900 | 0.f, 1.f, 0.f, |
| 6901 | 0.f, 1.f, 0.f, |
| 6902 | 0.f, 1.f, 0.f, |
| 6903 | |
| 6904 | -1.f, 0.f, 0.f, |
| 6905 | -1.f, 0.f, 0.f, |
| 6906 | -1.f, 0.f, 0.f, |
| 6907 | |
| 6908 | -1.f, 0.f, 0.f, |
| 6909 | -1.f, 0.f, 0.f, |
| 6910 | -1.f, 0.f, 0.f |
| 6911 | }; |
| 6912 | glEnableClientState(GL_VERTEX_ARRAY); |
| 6913 | glVertexPointer(3, GL_FLOAT, 0, v); |
| 6914 | glEnableClientState(GL_NORMAL_ARRAY); |
| 6915 | glNormalPointer(GL_FLOAT, 0, n); |
| 6916 | glDrawArrays(GL_TRIANGLES, 0, 36); |
| 6917 | glDisableClientState(GL_VERTEX_ARRAY); |
| 6918 | glDisableClientState(GL_NORMAL_ARRAY); |
| 6919 | } |
| 6920 | |
| 6921 | void Molecule::shaderAtoms(CEnvironment atom,int proba,double radScal){ |
| 6922 | /*! Draws atoms as spheres or as ellipses cubes or icosahedrons. |
| 6923 | * @params atoms list of atoms to be drawn . |
| 6924 | * @params proba ellipsoid probability (currently 10 30 50 70 90 %). |
| 6925 | * |
| 6926 | * Molecule.dratom controls the wireframe style of the resulting atom . |
| 6927 | * |
| 6928 | * Molecule.tubes atom balls is drawn in bondstrength. |
| 6929 | * |
| 6930 | * Molecule.adp atom is drawn as a ellipsoid. |
| 6931 | * |
| 6932 | * Molecule.monoQrom Q-Peaks are drawn in Color Molecule.mQolor . |
| 6933 | * */ |
| 6934 | if (atom.isEmpty())return; |
| 6935 | int myAdp=adp; |
| 6936 | int myStyle=7; |
| 6937 | int pminus=0; |
| 6938 | int wire=0; |
| 6939 | // if (!intern) return; |
| 6940 | Licht=1; |
| 6941 | g_Program->bind(); |
| 6942 | g_Program->setUniformValue(lichtH, 1); |
| 6943 | g_Program->setUniformValue(bgH,fgc[0],fgc[1],fgc[2],fgc[3]); |
| 6944 | |
| 6945 | //glGetUniformiv(g_program,lichtH,&Licht); |
| 6946 | //if (!Licht) { |
| 6947 | // glUseProgram(0); |
| 6948 | // return;//licht geht nicht an |
| 6949 | //} |
| 6950 | program_in_use=true; |
| 6951 | for (int i=0; i<atom.size();i++){ |
| 6952 | if ((!dratom)&&(atom.at(i).hidden)) continue; |
| 6953 | if ((nopm1)&&(atom.at(i).symmGroup)&&(atom.at(i).part<0))continue; |
| 6954 | if ((dratom==2)&&(atom.at(i).part==0))continue; |
| 6955 | if ((dratom==2)&&(atom.at(i).symmGroup)&&(atom.at(i).part<0))continue; |
| 6956 | if ((dratom==2)&&(atom.at(i).hidden))continue; |
| 6957 | if ((dratom==5)&&(atom.at(i).hidden))continue; |
| 6958 | if ((noQPeaksPlease)&&(atom.at(i).an==-1)) continue; |
| 6959 | bool nonPositiveDefinite=false; |
| 6960 | glPushMatrix(); |
| 6961 | glTranslated(atom.at(i).pos.x,atom.at(i).pos.y,atom.at(i).pos.z); |
| 6962 | double rad=(atom.at(i).an==-2)?0.5:qPeakRad; |
| 6963 | bool parthigh=false; |
| 6964 | if (dratom==5){ |
| 6965 | wire=1; |
| 6966 | dratom=0; |
| 6967 | } |
| 6968 | if (dratom==2) { |
| 6969 | dratom=0; |
| 6970 | parthigh=true; |
| 6971 | } |
| 6972 | if (!dratom){ |
| 6973 | if (atom.at(i).an>-1) { |
| 6974 | |
| 6975 | myStyle=AtomStyle[atom.at(i).an]; |
| 6976 | if (atom.at(i).Label.contains("(noADP)")) myStyle|=ATOM_STYLE_NOADP; |
| 6977 | bool isd=((atom.at(i).an==0)&&(atom.at(i).Label[0]=='D')); |
| 6978 | glColor4d(atomColor(atom.at(i).an,isd).redF(), |
| 6979 | atomColor(atom.at(i).an,isd).greenF(), |
| 6980 | atomColor(atom.at(i).an,isd).blueF(), |
| 6981 | (wire)?0.25:1.0);//atomColor(atom.at(i).an].alphaF()); |
| 6982 | rad=arad[atom.at(i).an]; |
| 6983 | if (parthigh) { |
| 6984 | glEnable(GL_BLEND); |
| 6985 | QColor pcolor=PartColor::color(atom.at(i).part); |
| 6986 | if (atom.at(i).part==666) pcolor.setAlpha(70); |
| 6987 | else pcolor.setAlpha(90); |
| 6988 | glColor4d(pcolor.redF(), pcolor.greenF(), pcolor.blueF(), pcolor.alphaF()); |
| 6989 | |
| 6990 | } |
| 6991 | |
| 6992 | if ((highlightEquivalents)&&(!parthigh)&&(atom.at(i).symmGroup)) { |
| 6993 | glColor4d(qMin(1.0,(atomColor(atom.at(i).an,isd).redF()+0.1) * 1.2), |
| 6994 | qMin(1.0,(atomColor(atom.at(i).an,isd).greenF()+0.1) * 1.2), |
| 6995 | qMin(1.0,(atomColor(atom.at(i).an,isd).blueF()+0.1) * 1.2), |
| 6996 | (wire)?0.25:1.0); |
| 6997 | } |
| 6998 | if ((atom.at(i).symmGroup)&&(atom.at(i).part<0)){ |
| 6999 | glColor4d(atomColor(atom.at(i).an,isd).redF(), |
| 7000 | atomColor(atom.at(i).an,isd).greenF(), |
| 7001 | 1.0, |
| 7002 | 0.3); |
| 7003 | pminus=1; |
| 7004 | //myStyle|=ATOM_STYLE_NOADP; |
| 7005 | } |
| 7006 | myAdp=(myStyle&ATOM_STYLE_NOADP)?0:adp; |
| 7007 | } |
| 7008 | if (wire) {myStyle|=ATOM_STYLE_SPHERE;if (myStyle&ATOM_STYLE_SOLID)myStyle-=ATOM_STYLE_SOLID; } |
| 7009 | if (tubes){ |
| 7010 | rad=bondStrength; |
| 7011 | if (atom.at(i).part==666) rad*=4.5; |
| 7012 | myAdp=0; |
| 7013 | nonPositiveDefinite=false; |
| 7014 | } |
| 7015 | if ((atom.at(i).an<0)||(atom.at(i).Label.startsWith('Q',Qt::CaseInsensitive))){ |
| 7016 | glColor4d(1.0 ,0.7, 0.8 ,0.4); |
| 7017 | if (atom.at(i).an==-42) {//belos sit! |
| 7018 | if (beloColorByDefden) Farbverlauf(atom.at(i).sof,lmin,lmax); |
| 7019 | else glColor3d(beloColor.redF(),beloColor.greenF(),beloColor.blueF()); |
| 7020 | //dodecaeder(rad); |
| 7021 | triacontaeder(beloRad); |
| 7022 | } |
| 7023 | else if (atom.at(i).an==-66) {//centroids |
| 7024 | rad*=2; |
| 7025 | glColor4d(0.6,0.3,0.1,0.3); |
| 7026 | dodecaeder(rad); |
| 7027 | }else{ |
| 7028 | if((atom.at(i).an==-1)&&(!monoQrom)) Farbverlauf(atom.at(i).peakHeight, pmin, pmax); |
| 7029 | if (monoQrom) glColor3d(mQolor.redF(),mQolor.greenF(),mQolor.blueF()); |
| 7030 | // if (!wire) |
| 7031 | icosaeder(rad); |
| 7032 | } |
| 7033 | } |
| 7034 | else { |
| 7035 | if (myAdp){ |
| 7036 | V3 ev=V3(0,0,0); |
| 7037 | double *arr=jacobi(atom.at(i).uc,ev); |
| 7038 | if ((ev.x>0)&&(ev.y>0)&&(ev.z>0)){ |
| 7039 | nonPositiveDefinite=false; |
| 7040 | glRotated(Ato4d(arr)); |
| 7041 | double psc=(parthigh)?1.1:1.0; |
| 7042 | if (atom.at(i).part==666) psc*=1.1; |
| 7043 | switch (proba ) { |
| 7044 | case 10 :{ glScaled(0.76*sqrt(ev.x)*psc,0.76*sqrt(ev.y)*psc,0.76*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 10% Wahrscheinlichkeit |
| 7045 | case 30 :{ glScaled(1.19*sqrt(ev.x)*psc,1.19*sqrt(ev.y)*psc,1.19*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 30% Wahrscheinlichkeit |
| 7046 | case 50 :{ glScaled(1.54*sqrt(ev.x)*psc,1.54*sqrt(ev.y)*psc,1.54*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 50% Wahrscheinlichkeit |
| 7047 | case 70 :{ glScaled(1.91*sqrt(ev.x)*psc,1.91*sqrt(ev.y)*psc,1.91*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 70% Wahrscheinlichkeit |
| 7048 | case 90 :{ glScaled(2.50*sqrt(ev.x)*psc,2.50*sqrt(ev.y)*psc,2.50*sqrt(ev.z)*psc);break;} //Hauptachsen der Eliipsoide 90% Wahrscheinlichkeit |
| 7049 | default: ; |
| 7050 | } |
| 7051 | }else {nonPositiveDefinite=true;} |
| 7052 | }else{ |
| 7053 | myStyle&=(ATOM_STYLE_SPHERE|ATOM_STYLE_NOADP); |
| 7054 | myStyle|=ATOM_STYLE_NOADP; |
| 7055 | } |
| 7056 | |
| 7057 | if (parthigh) { |
| 7058 | rad*=1.32; |
| 7059 | if (atom.at(i).part==666) rad*=1.2; |
| 7060 | glEnable(GL_BLEND); |
| 7061 | myStyle&=(ATOM_STYLE_SPHERE|ATOM_STYLE_NOADP); |
| 7062 | myStyle|=ATOM_STYLE_SPHERE; |
| 7063 | myStyle|=ATOM_STYLE_SOLID; |
| 7064 | |
| 7065 | } |
| 7066 | |
| 7067 | /* |
| 7068 | #define ATOM_STYLE_WALLS 1 |
| 7069 | #define ATOM_STYLE_RINGS 2 |
| 7070 | #define ATOM_STYLE_SPHERE 4 |
| 7071 | #define ATOM_STYLE_SOLID 8 |
| 7072 | #define ATOM_STYLE_WHITERING 16 |
| 7073 | #define ATOM_STYLE_NOLABEL 32 |
| 7074 | #define ATOM_STYLE_NOADP 64 |
| 7075 | */ |
| 7076 | |
| 7077 | |
| 7078 | |
| 7079 | |
| 7080 | int walls=((ATOM_STYLE_WALLS&myStyle))?1:0; |
| 7081 | |
| 7082 | //printf("style: %X walls %d %d\n",myStyle,walls,wire); |
| 7083 | if ((!wire)&&(myAdp)&&(walls)&&(!nonPositiveDefinite)) pappe(); |
| 7084 | if (atom.at(i).an>-1) { |
| 7085 | if (myAdp&&intern) { |
| 7086 | if (!nonPositiveDefinite) sphere(myAdp,myStyle); |
| 7087 | else { |
| 7088 | cube(rad); |
| 7089 | } |
| 7090 | |
| 7091 | } |
| 7092 | else if ((!myAdp)||wire||parthigh){ |
| 7093 | rad*=radScal; |
| 7094 | rad=fmax(rad,0.10); |
| 7095 | if (!myAdp) glScaled(rad,rad,rad); |
| 7096 | if (!nonPositiveDefinite) { |
| 7097 | if (wire)dratom =5; |
| 7098 | sphere(myAdp||pminus,myStyle); |
| 7099 | } |
| 7100 | else { |
| 7101 | cube(rad); |
| 7102 | } |
| 7103 | } |
| 7104 | } |
| 7105 | else |
| 7106 | icosaeder(rad); |
| 7107 | } |
| 7108 | } |
| 7109 | else{ |
| 7110 | atom[i].hidden=0; |
| 7111 | if (dratom==76){ |
| 7112 | glEnable(GL_BLEND); |
| 7113 | if (atom.at(i).an>=0) rad=arad[atom.at(i).an]; |
| 7114 | glScaled(rad,rad,rad); |
| 7115 | if (atom.at(i).sg) glColor4d(0.7,0.5,0.2,0.7); |
| 7116 | else glColor4d(0.2,0.5,0.7,0.7); |
| 7117 | sphere(0,myStyle); |
| 7118 | dratom=0; |
| 7119 | glColor4d(qMin(1.0,(atomColor(atom.at(i).an).redF()) + ((atom.at(i).sg)?0.3:-0.3)), |
| 7120 | qMin(1.0,(atomColor(atom.at(i).an).greenF()) ), |
| 7121 | qMin(1.0,(atomColor(atom.at(i).an).blueF()) + ((atom.at(i).sg)?-0.3:0.3)), |
| 7122 | 0.7); |
| 7123 | myStyle&=ATOM_STYLE_NOADP; |
| 7124 | myStyle|=ATOM_STYLE_SPHERE; |
| 7125 | myStyle|=ATOM_STYLE_SOLID; |
| 7126 | if (atom.at(i).an==-42) { |
| 7127 | glColor4d(0.8,0.6,0.1,0.8); |
| 7128 | triacontaeder(2.0); |
| 7129 | }else sphere(0,myStyle); |
| 7130 | dratom=76; |
| 7131 | } else sphere(0,myStyle); |
| 7132 | } |
| 7133 | glPopMatrix(); |
| 7134 | if (parthigh) dratom=2; |
| 7135 | } |
| 7136 | g_Program->release(); |
| 7137 | program_in_use=false; |
| 7138 | } |
| 7139 | |
| 7140 | void Molecule::Farbverlauf (GLfloat wrt,GLfloat min,GLfloat max){ |
| 7141 | if (min+0.001f>=max)max+=0.002f; |
| 7142 | GLclampd ff[4]; |
| 7143 | int lauf=0; |
| 7144 | const GLclampd farbe[6][4]={{1.0,0.0,0.0,1.0}, |
| 7145 | {1.0,1.0,0.0,1.0}, |
| 7146 | {0.0,1.0,0.0,1.0}, |
| 7147 | {0.0,1.0,1.0,1.0}, |
| 7148 | {0.0,0.0,1.0,1.0}, |
| 7149 | {1.0,0.0,1.0,1.0}}; |
| 7150 | GLfloat nwrt = (wrt - min) / (max - min); |
| 7151 | nwrt=(nwrt >= 1.0f)?0.99999f:nwrt; |
| 7152 | nwrt=(nwrt <= 0.0f)?0.00001f:nwrt; |
| 7153 | lauf=(int (nwrt/0.2f)); |
| 7154 | nwrt-=(0.2f*lauf); |
| 7155 | nwrt/=(0.2f); |
| 7156 | |
| 7157 | ff[0]=(1.0-nwrt)*farbe[lauf][0]+farbe[lauf+1][0]*nwrt; |
| 7158 | ff[1]=(1.0-nwrt)*farbe[lauf][1]+farbe[lauf+1][1]*nwrt; |
| 7159 | ff[2]=(1.0-nwrt)*farbe[lauf][2]+farbe[lauf+1][2]*nwrt; |
| 7160 | ff[3]=1.0; |
| 7161 | |
| 7162 | glColor4dv(ff); |
| 7163 | return; |
| 7164 | } |
| 7165 | |
| 7166 | void Molecule::spitze(V3 dir, V3 pos){ |
| 7167 | V3 vec=V3(0,0,1)%dir; |
| 7168 | if (Norm(vec)>0.0001) vec=Normalize(vec); |
| 7169 | else vec=V3(0,1,0); |
| 7170 | glPushMatrix(); |
| 7171 | // glTranslated (mitsav.x,mitsav.y,mitsav.z); |
| 7172 | glTranslated (pos.x,pos.y,pos.z);//Anfangspunkt |
| 7173 | double wink=acos(dir.z/sqrt(Norm(dir)))/M_PI*180.0; |
| 7174 | //printf("Winkel=%g %g (%g %g %g)(%g %g %g)\n",wink,Norm(vec),vec.x,vec.y,vec.z,dir.x,dir.y,dir.z); |
| 7175 | glRotated(wink,vec.x,vec.y,vec.z); // drehen |
| 7176 | glPushMatrix(); |
| 7177 | glScaled(0.07,0.07,0.4); |
| 7178 | myCone(); |
| 7179 | glPopMatrix(); |
| 7180 | glPopMatrix(); |
| 7181 | } |
| 7182 | |
| 7183 | void Molecule::bonds(Connection bond, double radScal){ |
| 7184 | /*! @params bond list of bonds to be drawn |
| 7185 | * draws bonds as cylinders with radius Molecule.bondStrength . |
| 7186 | * Bonds start and stop at the atom surface. |
| 7187 | */ |
| 7188 | if (bond.isEmpty())return; |
| 7189 | GLfloat white[4]={0.2f, 0.2f, 0.3f, 0.0f}; |
| 7190 | GLfloat black[4]={0.0f, 0.0f, 0.0f, 1.0f}; |
| 7191 | glDisable(GL_BLEND); |
| 7192 | glEnable(GL_ALPHA_TEST); |
| 7193 | if (nullptr==hbtex) hbtex = new QOpenGLTexture(QImage(QString(theIconPath+"hbb.png")).mirrored()); |
| 7194 | hbtex->bind(); |
| 7195 | //glBindTexture(GL_TEXTURE_2D, hbtex); |
| 7196 | //printf("Doing Bonds adp=%d proba=%d tubes%d\n",adp,proba,tubes); |
| 7197 | V3 vec,bondir; |
| 7198 | double kurz=0,ara1,ara2; |
| 7199 | double wink; |
| 7200 | bool parthigh=false; |
| 7201 | double psc=1.0; |
| 7202 | if (dratom==2) { |
| 7203 | dratom=0; |
| 7204 | parthigh=true; |
| 7205 | psc=1.32; |
| 7206 | glEnable(GL_BLEND); |
| 7207 | glDisable(GL_ALPHA_TEST); |
| 7208 | // glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); |
| 7209 | }else{glDisable(GL_BLEND);} |
| 7210 | for (int i=0; i<bond.size();i++){ |
| 7211 | if (bond.at(i).ato1->hidden) continue; |
| 7212 | if (bond.at(i).ato2->hidden) continue; |
| 7213 | if ((parthigh)&&((bond.at(i).ato1->part==0)||(bond.at(i).ato2->part==0))) continue; |
| 7214 | if ((parthigh)&&(((bond.at(i).ato1->part<0)&&(bond.at(i).ato1->symmGroup))||((bond.at(i).ato2->part<0)&&(bond.at(i).ato2->symmGroup)))) continue; |
| 7215 | if ((nopm1)&&(bond.at(i).ato1->symmGroup)&&(bond.at(i).ato1->part<0))continue; |
| 7216 | if ((nopm1)&&(bond.at(i).ato2->symmGroup)&&(bond.at(i).ato2->part<0))continue; |
| 7217 | if ((ATOM_STYLE_METAL&AtomStyle[bond.at(i).ato1->an])!=(ATOM_STYLE_METAL&AtomStyle[bond.at(i).ato2->an])){ |
| 7218 | //printf("ATOM_STYLE_METAL an1:%d an2:%d %X %X %x\n",bond.at(i).ato1->an,bond.at(i).ato2->an, |
| 7219 | // AtomStyle[bond.at(i).ato1->an],AtomStyle[bond.at(i).ato2->an],ATOM_STYLE_METAL); |
| 7220 | glEnable(GL_TEXTURE_2D); |
| 7221 | } else glDisable(GL_TEXTURE_2D); |
| 7222 | glColor4d(0.5,0.3,0.3,1.0); |
| 7223 | |
| 7224 | if (adp) { |
| 7225 | V3 hin=Normalize(bond.at(i).ato2->pos-bond.at(i).ato1->pos); |
| 7226 | double r=1; |
| 7227 | switch (proba){ |
| 7228 | case 10:r=0.76;break; |
| 7229 | case 30:r=1.19;break; |
| 7230 | case 50:r=1.54;break; |
| 7231 | case 70:r=1.91;break; |
| 7232 | case 90:r=2.50;break; |
| 7233 | } |
| 7234 | ara1=sqrt((hin*bond.at(i).ato1->uc)*hin); |
| 7235 | ara1*=r; |
| 7236 | ara2=sqrt((hin*bond.at(i).ato2->uc)*hin); |
| 7237 | ara2*=r; |
| 7238 | // printf("%s-%s %f %f %d %f\n",bond.at(i).ato1->Label.toStdString().c_str(),bond.at(i).ato2->Label.toStdString().c_str(),ara1, ara2, proba,r); |
| 7239 | } |
| 7240 | else{ |
| 7241 | ara1=arad[bond.at(i).ato1->an] * radScal; |
| 7242 | ara2=arad[bond.at(i).ato2->an] * radScal; |
| 7243 | } |
| 7244 | if (((bond.at(i).ato1->symmGroup)&&(bond.at(i).ato1->part<0))|| |
| 7245 | (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato1->an])) ara1=arad[bond.at(i).ato1->an]; |
| 7246 | if (((bond.at(i).ato2->symmGroup)&&(bond.at(i).ato2->part<0))|| |
| 7247 | (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato2->an])) ara2=arad[bond.at(i).ato2->an]; |
| 7248 | if (tubes) ara1=ara2=bondStrength; |
| 7249 | if (bond.at(i).ato2->an>-1) { |
| 7250 | bool isd=((bond.at(i).ato2->an==0)&&(bond.at(i).ato2->Label[0]=='D')); |
| 7251 | glColor4d(atomColor(bond.at(i).ato2->an,isd).redF(), |
| 7252 | atomColor(bond.at(i).ato2->an,isd).greenF(), |
| 7253 | atomColor(bond.at(i).ato2->an,isd).blueF(), |
| 7254 | atomColor(bond.at(i).ato2->an,isd).alphaF()); |
| 7255 | }else{ |
| 7256 | if (bond.at(i).ato1->an>-1) { |
| 7257 | bool isd=((bond.at(i).ato1->an==0)&&(bond.at(i).ato1->Label[0]=='D')); |
| 7258 | glColor4d(atomColor(bond.at(i).ato1->an,isd).redF(), |
| 7259 | atomColor(bond.at(i).ato1->an,isd).greenF(), |
| 7260 | atomColor(bond.at(i).ato1->an,isd).blueF(), |
| 7261 | atomColor(bond.at(i).ato1->an,isd).alphaF()); |
| 7262 | } |
| 7263 | } |
| 7264 | |
| 7265 | ara1=qMax(ara1,bondStrength); |
| 7266 | ara2=qMax(ara2,bondStrength); |
| 7267 | |
| 7268 | if ((highlightEquivalents)&&(bond.at(i).ato2->symmGroup|bond.at(i).ato1->symmGroup)) |
| 7269 | glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,white ); |
| 7270 | else glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,black ); |
| 7271 | if ((bond.at(i).ato2->symmGroup|bond.at(i).ato1->symmGroup)&&((bond.at(i).ato2->part<0)||(bond.at(i).ato1->part<0))){ |
| 7272 | // glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,blue ); |
| 7273 | bool isd=((bond.at(i).ato2->an==0)&&(bond.at(i).ato2->Label[0]=='D')); |
| 7274 | glColor4d(atomColor(bond.at(i).ato2->an,isd).redF(), |
| 7275 | atomColor(bond.at(i).ato2->an,isd).greenF(), |
| 7276 | 1.0, |
| 7277 | 0.3); |
| 7278 | glEnable(GL_BLEND); |
| 7279 | } |
| 7280 | vec.x=(bond.at(i).ato2->pos.y-bond.at(i).ato1->pos.y); |
| 7281 | vec.y=(bond.at(i).ato1->pos.x-bond.at(i).ato2->pos.x); |
| 7282 | vec.z=0; |
| 7283 | if (Norm(vec)) vec=Normalize(vec); |
| 7284 | else vec=V3(0,1,0); |
| 7285 | bondir =V3(0,0,0); |
| 7286 | if (bondStrength<ara2) |
| 7287 | bondir= Normalize(bond.at(i).ato1->pos-bond.at(i).ato2->pos)*(0.9*sqrt((ara2*ara2)-bondStrength*bondStrength)); |
| 7288 | kurz=sqrt(Norm(bondir));// */ |
| 7289 | //printf("%s--%s kurz %f len %f ara2 %f\n",bond.at(i).ato1->Label.toStdString().c_str(),bond.at(i).ato2->Label.toStdString().c_str(),kurz,bond.at(i).length,ara2); |
| 7290 | glPushMatrix(); |
| 7291 | // glTranslated (mitsav.x,mitsav.y,mitsav.z); |
| 7292 | glTranslated ( |
| 7293 | bond.at(i).ato2->pos.x+bondir.x, |
| 7294 | bond.at(i).ato2->pos.y+bondir.y, |
| 7295 | bond.at(i).ato2->pos.z+bondir.z);//Anfangspunkt |
| 7296 | wink=acos(((bond.at(i).ato1->pos.z-bond.at(i).ato2->pos.z)/ |
| 7297 | (sqrt((bond.at(i).ato1->pos.x-bond.at(i).ato2->pos.x)*(bond.at(i).ato1->pos.x-bond.at(i).ato2->pos.x)+ |
| 7298 | (bond.at(i).ato1->pos.y-bond.at(i).ato2->pos.y)*(bond.at(i).ato1->pos.y-bond.at(i).ato2->pos.y)+ |
| 7299 | (bond.at(i).ato1->pos.z-bond.at(i).ato2->pos.z)*(bond.at(i).ato1->pos.z-bond.at(i).ato2->pos.z)))))/M_PI*180.0; |
| 7300 | |
| 7301 | glRotated(wink,vec.x,vec.y,vec.z); // drehen |
| 7302 | if (parthigh) { |
| 7303 | glEnable(GL_BLEND); |
| 7304 | QColor pcolor=PartColor::color(bond.at(i).ato1->part); |
| 7305 | pcolor.setAlpha(140); |
| 7306 | glColor4d(pcolor.redF(), |
| 7307 | pcolor.greenF(), |
| 7308 | pcolor.blueF(), |
| 7309 | pcolor.alphaF()); |
| 7310 | |
| 7311 | } |
| 7312 | //if (trans) {glEnable(GL_BLEND);glEnable(GL_CULL_FACE);} |
| 7313 | cylinder(bondStrength*psc, (float)(bond.at(i).length /2.0f -kurz)); |
| 7314 | //if (trans) {glDisable(GL_BLEND);glDisable(GL_CULL_FACE);} |
| 7315 | glPopMatrix(); |
| 7316 | |
| 7317 | if (bond.at(i).ato1->an>-1){ |
| 7318 | bool isd=(bond.at(i).ato1->an==0)&&(bond.at(i).ato1->Label[0]=='D'); |
| 7319 | glColor4d( |
| 7320 | atomColor(bond.at(i).ato1->an,isd).redF(), |
| 7321 | atomColor(bond.at(i).ato1->an,isd).greenF(), |
| 7322 | atomColor(bond.at(i).ato1->an,isd).blueF(), |
| 7323 | atomColor(bond.at(i).ato1->an,isd).alphaF()); |
| 7324 | |
| 7325 | }else { |
| 7326 | if (bond.at(i).ato2->an>-1){ |
| 7327 | bool isd=(bond.at(i).ato2->an==0)&&(bond.at(i).ato2->Label[0]=='D'); |
| 7328 | glColor4d( |
| 7329 | atomColor(bond.at(i).ato2->an,isd).redF(), |
| 7330 | atomColor(bond.at(i).ato2->an,isd).greenF(), |
| 7331 | atomColor(bond.at(i).ato2->an,isd).blueF(), |
| 7332 | atomColor(bond.at(i).ato2->an,isd).alphaF()); |
| 7333 | } |
| 7334 | } |
| 7335 | if ((bond.at(i).ato2->symmGroup|bond.at(i).ato1->symmGroup)&&((bond.at(i).ato2->part<0)||(bond.at(i).ato1->part<0))){ |
| 7336 | // glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION,blue ); |
| 7337 | if (bond.at(i).ato1->an>-1){ |
| 7338 | glColor4d(atomColor(bond.at(i).ato1->an).redF(), |
| 7339 | atomColor(bond.at(i).ato1->an).greenF(), |
| 7340 | 1.0, |
| 7341 | 0.3); |
| 7342 | } |
| 7343 | glEnable(GL_BLEND); |
| 7344 | } |
| 7345 | |
| 7346 | vec.x=(bond.at(i).ato1->pos.y-bond.at(i).ato2->pos.y); |
| 7347 | vec.y=(bond.at(i).ato2->pos.x-bond.at(i).ato1->pos.x); |
| 7348 | vec.z=0; |
| 7349 | if (Norm(vec)) vec=Normalize(vec); |
| 7350 | else vec=V3(0,1,0); |
| 7351 | |
| 7352 | bondir =V3(0,0,0); |
| 7353 | if (bondStrength<ara1) |
| 7354 | bondir= Normalize(bond.at(i).ato2->pos-bond.at(i).ato1->pos)*(0.9*sqrt((ara1*ara1)-bondStrength*bondStrength)); |
| 7355 | kurz=sqrt(Norm(bondir));// */ |
| 7356 | glPushMatrix(); |
| 7357 | // glTranslated (mitsav.x,mitsav.y,mitsav.z); |
| 7358 | glTranslated ( |
| 7359 | bond.at(i).ato1->pos.x+bondir.x, |
| 7360 | bond.at(i).ato1->pos.y+bondir.y, |
| 7361 | bond.at(i).ato1->pos.z+bondir.z);//Anfangspunkt |
| 7362 | wink=acos(((bond.at(i).ato2->pos.z-bond.at(i).ato1->pos.z)/ |
| 7363 | (sqrt((bond.at(i).ato2->pos.x-bond.at(i).ato1->pos.x)*(bond.at(i).ato2->pos.x-bond.at(i).ato1->pos.x)+ |
| 7364 | (bond.at(i).ato2->pos.y-bond.at(i).ato1->pos.y)*(bond.at(i).ato2->pos.y-bond.at(i).ato1->pos.y)+ |
| 7365 | (bond.at(i).ato2->pos.z-bond.at(i).ato1->pos.z)*(bond.at(i).ato2->pos.z-bond.at(i).ato1->pos.z)))))/M_PI*180.0; |
| 7366 | glRotated(wink,vec.x,vec.y,vec.z); // drehen |
| 7367 | //if (trans) {glEnable(GL_BLEND);glEnable(GL_CULL_FACE);} |
| 7368 | if (parthigh) { |
| 7369 | glEnable(GL_BLEND); |
| 7370 | QColor pcolor=PartColor::color(bond.at(i).ato2->part); |
| 7371 | pcolor.setAlpha(140); |
| 7372 | glColor4d(pcolor.redF(), |
| 7373 | pcolor.greenF(), |
| 7374 | pcolor.blueF(), |
| 7375 | pcolor.alphaF()); |
| 7376 | |
| 7377 | } |
| 7378 | cylinder(bondStrength*psc, (float)bond.at(i).length/2.0f-kurz); |
| 7379 | |
| 7380 | glDisable(GL_BLEND); |
| 7381 | glDisable(GL_TEXTURE_2D); |
| 7382 | glPopMatrix(); |
| 7383 | } |
| 7384 | |
| 7385 | } |
| 7386 | |
| 7387 | QString Molecule::h_bonds(Connection bond,CEnvironment atoms) { |
| 7388 | /*! calculates Hydrogen bonds and draws them as stippled cylinders |
| 7389 | * \returns a html table of the found H-bonds |
| 7390 | */ |
| 7391 | if (atoms.isEmpty())return ""; |
| 7392 | if (bond.isEmpty())return ""; |
| 7393 | glDisable(GL_CULL_FACE); |
| 7394 | if (HAMax<0.01)return ""; |
| 7395 | glEnable(GL_ALPHA_TEST); |
| 7396 | if (nullptr==hbtex) hbtex = new QOpenGLTexture(QImage(QString(theIconPath+"hbb.png")).mirrored()); |
| 7397 | hbtex->bind(); |
| 7398 | //glBindTexture(GL_TEXTURE_2D, hbtex); |
| 7399 | glEnable(GL_TEXTURE_2D); |
| 7400 | QString hbonds; |
| 7401 | double gg=0,kk=0,ll=0; |
| 7402 | double kurz=0,ara1,ara2; |
| 7403 | float wink,hb_wink; |
| 7404 | V3 vec,bondir; |
| 7405 | const MyAtom *Hyd,*Acc,*Don;//Wasserstoff Akzeptor und Donor |
| 7406 | hbonds.append("<h2>Hydrogen Bonds</h2><table border=1><tr><th>Donor---Hydrogen...Acceptor</th><th>Don--Hyd [Å]</th><th> Hyd--Acc [Å]</th><th>Don--Acc [Å]</th><th>D--H-----A </th></tr>"); |
| 7407 | for (int i=0;i<bond.size();i++) { |
| 7408 | if (((bond.at(i).ato1->an == 0)&& |
| 7409 | (bond.at(i).ato2->an > 5)&& |
| 7410 | (bond.at(i).ato2->an < 9))|| |
| 7411 | ((bond.at(i).ato2->an == 0)&& |
| 7412 | (bond.at(i).ato1->an > 5)&& |
| 7413 | (bond.at(i).ato1->an < 9))) { |
| 7414 | Hyd=(bond.at(i).ato1->an==0)?bond.at(i).ato1:bond.at(i).ato2; |
| 7415 | Don=(bond.at(i).ato1->an==0)?bond.at(i).ato2:bond.at(i).ato1; |
| 7416 | for (int j=0; j<atoms.size();j++){ |
| 7417 | if ((atoms.at(j).an<6)||(atoms.at(j).an>8)) continue; |
| 7418 | if ((Don->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Don->part)) continue;//acceptor may be in main part |
| 7419 | if ((Hyd->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Hyd->part)) continue; |
| 7420 | |
| 7421 | //printf("%d %d %d\n",bond.at(i).ato1->an,bond.at(i).ato2->an,atoms.at(j).an); |
| 7422 | Acc=&atoms.at(j); |
| 7423 | if (Acc==Don) continue; |
| 7424 | gg=sqrt( Distance(Hyd->pos,atoms.at(j).pos)); |
| 7425 | |
| 7426 | |
| 7427 | if (gg<=HAMax){ |
| 7428 | hb_wink=winkel(Acc->pos-Hyd->pos, Don->pos-Hyd->pos); |
| 7429 | /* printf("%s %s %s %f %f\n",bond.at(i).ato1->Label.toStdString().c_str(), |
| 7430 | bond.at(i).ato2->Label.toStdString().c_str(), |
| 7431 | atoms.at(j).Label.toStdString().c_str(),gg,hb_wink);*/ |
| 7432 | if ((gg>=1.3)&&(fabs(hb_wink)>HAWink)) {//wenn AbstandRichtig |
| 7433 | ll=sqrt(Distance(Acc->pos,Don->pos)); |
| 7434 | kk=sqrt(Distance(Don->pos,Hyd->pos)); |
| 7435 | hbonds.append(QString("<tr><td>%1---%2...%3</td><td>%4</td><td>%5</td><td>%6</td><td>%7°</td></tr>") |
| 7436 | .arg(Don->Label) |
| 7437 | .arg(Hyd->Label) |
| 7438 | .arg(Acc->Label) |
| 7439 | .arg(kk,6,'f',2) |
| 7440 | .arg(gg,6,'f',2) |
| 7441 | .arg(ll,6,'f',3) |
| 7442 | .arg(hb_wink,5,'f',1)); |
| 7443 | glPushMatrix(); |
| 7444 | ara1=arad[0]; |
| 7445 | ara2=arad[Acc->an]; |
| 7446 | if (adp) { |
| 7447 | V3 hin=Normalize(bond.at(i).ato2->pos-bond.at(i).ato1->pos); |
| 7448 | double r=1; |
| 7449 | switch (proba){ |
| 7450 | case 10:r=0.76;break; |
| 7451 | case 30:r=1.19;break; |
| 7452 | case 50:r=1.54;break; |
| 7453 | case 70:r=1.91;break; |
| 7454 | case 90:r=2.50;break; |
| 7455 | } |
| 7456 | ara1=sqrt((hin*bond.at(i).ato1->uc)*hin); |
| 7457 | ara1*=r; |
| 7458 | ara2=sqrt((hin*bond.at(i).ato2->uc)*hin); |
| 7459 | ara2*=r; |
| 7460 | // printf("%s-%s %f %f %d %f\n",bond.at(i).ato1->Label.toStdString().c_str(),bond.at(i).ato2->Label.toStdString().c_str(),ara1, ara2, proba,r); |
| 7461 | } |
| 7462 | if (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato1->an])ara1=arad[0]; |
| 7463 | if (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato2->an])ara2=arad[Acc->an]; |
| 7464 | if (tubes) ara1=ara2=bondStrength; |
| 7465 | bondir =V3(0,0,0); |
| 7466 | if (bondStrength<ara2) |
| 7467 | bondir= Normalize(Hyd->pos-Acc->pos)*(1.2*sqrt((ara2*ara2)-bondStrength*bondStrength)); |
| 7468 | if (bondStrength<ara1) |
| 7469 | kurz=(1.2*sqrt((ara1*ara1)-bondStrength*bondStrength)+1.2*sqrt(ara2*ara2)-bondStrength*bondStrength);// */ |
| 7470 | else kurz=0; |
| 7471 | glTranslated(Acc->pos.x+bondir.x,Acc->pos.y+bondir.y,Acc->pos.z+bondir.z);//z |
| 7472 | vec=kreuzX(Hyd->pos.x-Acc->pos.x, |
| 7473 | Hyd->pos.y-Acc->pos.y, |
| 7474 | Hyd->pos.z-Acc->pos.z, |
| 7475 | 0.0f,0.0f,1.0f); |
| 7476 | wink=acos(((Hyd->pos.z-Acc->pos.z)/ |
| 7477 | (sqrt((Acc->pos.x-Hyd->pos.x)*(Acc->pos.x-Hyd->pos.x)+ |
| 7478 | (Acc->pos.y-Hyd->pos.y)*(Acc->pos.y-Hyd->pos.y)+ |
| 7479 | (Acc->pos.z-Hyd->pos.z)*(Acc->pos.z-Hyd->pos.z)))))/M_PI*180.0; |
| 7480 | //printf("%f %f %f %f\n",wink, vec.x, vec.y, vec.z); |
| 7481 | glRotatef(wink, vec.x, vec.y, vec.z); // drehen |
| 7482 | //if (!adp) |
| 7483 | if (gg>2.0) glColor4f(1.f,0.6f,0.f,1.f); else glColor4f(1.f,1.f,0.f,1.f); |
| 7484 | cylinder(bondStrength*0.85, (float)gg-kurz); |
| 7485 | |
| 7486 | glPopMatrix(); |
| 7487 | } |
| 7488 | } |
| 7489 | } |
| 7490 | } |
| 7491 | } |
| 7492 | //glDisable( GL_BLEND); |
| 7493 | glDisable(GL_ALPHA_TEST); |
| 7494 | |
| 7495 | glDisable(GL_TEXTURE_2D); |
| 7496 | glEnable( GL_CULL_FACE); |
| 7497 | if (hbonds.contains("deg;")) hbonds.append("</table><br>"); |
| 7498 | else hbonds.clear(); |
| 7499 | return hbonds; |
| 7500 | } |
| 7501 | |
| 7502 | void Molecule::h_bonds2(Connection bond,CEnvironment atoms) { |
| 7503 | /*! calculates Hydrogen bonds and draws them as stippled cylinders |
| 7504 | */ |
| 7505 | if (bond.isEmpty())return; |
| 7506 | glDisable(GL_CULL_FACE); |
| 7507 | if (HAMax<0.01)return ; |
| 7508 | glEnable(GL_ALPHA_TEST); |
| 7509 | //glBindTexture(GL_TEXTURE_2D, hbtex); |
| 7510 | hbtex->bind(); |
| 7511 | glEnable(GL_TEXTURE_2D); |
| 7512 | double gg=0;//,kk=0,ll=0; |
| 7513 | double kurz=0,ara1,ara2; |
| 7514 | float wink,hb_wink; |
| 7515 | V3 vec,bondir; |
| 7516 | MyBond hbond; |
| 7517 | theH_Bonds.clear(); |
| 7518 | //printf("h_bonds2\n"); |
| 7519 | const MyAtom *Hyd,*Acc,*Don;//Wasserstoff Akzeptor und Donor |
| 7520 | for (int i=0;i<bond.size();i++) { |
| 7521 | if (((bond.at(i).ato1->an == 0)&&(canbeDonor(bond.at(i).ato2->an)))|| |
| 7522 | ((bond.at(i).ato2->an == 0)&&(canbeDonor(bond.at(i).ato1->an)))) { |
| 7523 | Hyd=(bond.at(i).ato1->an==0)?bond.at(i).ato1:bond.at(i).ato2; |
| 7524 | int iHyd=(bond.at(i).ato1->an==0)?bond.at(i).a1:bond.at(i).a2; |
| 7525 | Don=(bond.at(i).ato1->an==0)?bond.at(i).ato2:bond.at(i).ato1; |
| 7526 | for (int j=0; j<atoms.size();j++){ |
| 7527 | if (!canbeAcceptor(atoms.at(j).an)) continue; |
| 7528 | if ((Don->part!=0)&&(atoms.at(j).part!=0)&&((bindPart.key(Don->part)==atoms.at(j).part)|| |
| 7529 | (bindPart.value(Don->part)==atoms.at(j).part))); |
| 7530 | else if ((Don->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Don->part)) continue;//acceptor may be in main part |
| 7531 | if ((Hyd->part!=0)&&(atoms.at(j).part!=0)&&((bindPart.key(Hyd->part)==atoms.at(j).part)|| |
| 7532 | (bindPart.value(Hyd->part)==atoms.at(j).part))); |
| 7533 | else if ((Hyd->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Hyd->part)) continue; |
| 7534 | |
| 7535 | //printf("%d %d %d\n",bond.at(i).ato1->an,bond.at(i).ato2->an,atoms.at(j).an); |
| 7536 | Acc=&atoms.at(j); |
| 7537 | if (Acc==Don) continue; |
| 7538 | gg=sqrt( Distance(Hyd->pos,atoms.at(j).pos)); |
| 7539 | |
| 7540 | |
| 7541 | if (gg<=HAMax){ |
| 7542 | hb_wink=winkel(Acc->pos-Hyd->pos, Don->pos-Hyd->pos); |
| 7543 | /* printf("%s %s %s %f %f\n",bond.at(i).ato1->Label.toStdString().c_str(), |
| 7544 | bond.at(i).ato2->Label.toStdString().c_str(), |
| 7545 | atoms.at(j).Label.toStdString().c_str(),gg,hb_wink);*/ |
| 7546 | if ((gg>=1.3)&&(fabs(hb_wink)>HAWink)) {//wenn AbstandRichtig |
| 7547 | //ll=sqrt(Distance(Acc->pos,Don->pos)); |
| 7548 | //kk=sqrt(Distance(Don->pos,Hyd->pos)); |
| 7549 | glPushMatrix(); |
| 7550 | ara1=arad[0]; |
| 7551 | ara2=arad[Acc->an]; |
| 7552 | if (adp) { |
| 7553 | V3 hin=Normalize(bond.at(i).ato2->pos-bond.at(i).ato1->pos); |
| 7554 | double r=1; |
| 7555 | switch (proba){ |
| 7556 | case 10:r=0.76;break; |
| 7557 | case 30:r=1.19;break; |
| 7558 | case 50:r=1.54;break; |
| 7559 | case 70:r=1.91;break; |
| 7560 | case 90:r=2.50;break; |
| 7561 | } |
| 7562 | ara1=sqrt((hin*bond.at(i).ato1->uc)*hin); |
| 7563 | ara1*=r; |
| 7564 | ara2=sqrt((hin*bond.at(i).ato2->uc)*hin); |
| 7565 | ara2*=r; |
| 7566 | // printf("%s-%s %f %f %d %f\n",bond.at(i).ato1->Label.toStdString().c_str(),bond.at(i).ato2->Label.toStdString().c_str(),ara1, ara2, proba,r); |
| 7567 | } |
| 7568 | if (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato1->an])ara1=arad[0]; |
| 7569 | if (ATOM_STYLE_NOADP&AtomStyle[bond.at(i).ato2->an])ara2=arad[Acc->an]; |
| 7570 | if (tubes) ara1=ara2=bondStrength; |
| 7571 | bondir =V3(0,0,0); |
| 7572 | if (bondStrength<ara2) |
| 7573 | bondir= Normalize(Hyd->pos-Acc->pos)*(1.2*sqrt((ara2*ara2)-bondStrength*bondStrength)); |
| 7574 | if (bondStrength<ara1) |
| 7575 | kurz=(1.2*sqrt((ara1*ara1)-bondStrength*bondStrength)+1.2*sqrt(ara2*ara2)-bondStrength*bondStrength);// */ |
| 7576 | else kurz=0; |
| 7577 | glTranslated(Acc->pos.x+bondir.x,Acc->pos.y+bondir.y,Acc->pos.z+bondir.z);//z |
| 7578 | vec=kreuzX(Hyd->pos.x-Acc->pos.x, |
| 7579 | Hyd->pos.y-Acc->pos.y, |
| 7580 | Hyd->pos.z-Acc->pos.z, |
| 7581 | 0.0f,0.0f,1.0f); |
| 7582 | wink=acos(((Hyd->pos.z-Acc->pos.z)/ |
| 7583 | (sqrt((Acc->pos.x-Hyd->pos.x)*(Acc->pos.x-Hyd->pos.x)+ |
| 7584 | (Acc->pos.y-Hyd->pos.y)*(Acc->pos.y-Hyd->pos.y)+ |
| 7585 | (Acc->pos.z-Hyd->pos.z)*(Acc->pos.z-Hyd->pos.z)))))/M_PI*180.0; |
| 7586 | //printf("%f %f %f %f\n",wink, vec.x, vec.y, vec.z); |
| 7587 | glRotatef(wink, vec.x, vec.y, vec.z); // drehen |
| 7588 | //if (!adp) |
| 7589 | if (gg>2.0) glColor4f(1.f,0.6f,0.f,1.f); else glColor4f(1.f,1.f,0.f,1.f); |
| 7590 | cylinder(bondStrength*0.85, (float)gg-kurz); |
| 7591 | |
| 7592 | glPopMatrix(); |
| 7593 | |
| 7594 | hbond.a1=iHyd; |
| 7595 | hbond.a2=j; |
| 7596 | hbond.ato1=Hyd; |
| 7597 | hbond.ato2=Acc; |
| 7598 | hbond.length=gg; |
| 7599 | if (!theH_Bonds.contains(hbond)) theH_Bonds.append(hbond); |
| 7600 | } |
| 7601 | } |
| 7602 | } |
| 7603 | } |
| 7604 | } |
| 7605 | //glDisable( GL_BLEND); |
| 7606 | glDisable(GL_ALPHA_TEST); |
| 7607 | |
| 7608 | glDisable(GL_TEXTURE_2D); |
| 7609 | glEnable( GL_CULL_FACE); |
| 7610 | } |
| 7611 | |
| 7612 | void Molecule::h_bonds3(Connection bond,CEnvironment atoms) { |
| 7613 | /*! calculates Hydrogen bonds */ |
| 7614 | if (bond.isEmpty())return; |
| 7615 | if (HAMax<0.01)return ; |
| 7616 | double gg=0;//,kk=0,ll=0; |
| 7617 | float wink,hb_wink; |
| 7618 | MyBond hbond; |
| 7619 | theH_Bonds.clear(); |
| 7620 | const MyAtom *Hyd,*Acc,*Don;//Wasserstoff Akzeptor und Donor |
| 7621 | for (int i=0;i<bond.size();i++) { |
| 7622 | if (((bond.at(i).ato1->an == 0)&&(canbeDonor(bond.at(i).ato2->an)))|| |
| 7623 | ((bond.at(i).ato2->an == 0)&&(canbeDonor(bond.at(i).ato1->an)))) { |
| 7624 | Hyd=(bond.at(i).ato1->an==0)?bond.at(i).ato1:bond.at(i).ato2; |
| 7625 | int iHyd=(bond.at(i).ato1->an==0)?bond.at(i).a1:bond.at(i).a2; |
| 7626 | Don=(bond.at(i).ato1->an==0)?bond.at(i).ato2:bond.at(i).ato1; |
| 7627 | for (int j=0; j<atoms.size();j++){ |
| 7628 | if (!canbeAcceptor(atoms.at(j).an)) continue; |
| 7629 | if ((Don->part!=0)&&(atoms.at(j).part!=0)&&((bindPart.key(Don->part)==atoms.at(j).part)|| |
| 7630 | (bindPart.value(Don->part)==atoms.at(j).part))); |
| 7631 | else if ((Don->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Don->part)) continue;//acceptor may be in main part |
| 7632 | if ((Hyd->part!=0)&&(atoms.at(j).part!=0)&&((bindPart.key(Hyd->part)==atoms.at(j).part)|| |
| 7633 | (bindPart.value(Hyd->part)==atoms.at(j).part))); |
| 7634 | else if ((Hyd->part!=0)&&(atoms.at(j).part!=0)&&(atoms.at(j).part!=Hyd->part)) continue; |
| 7635 | |
| 7636 | Acc=&atoms.at(j); |
| 7637 | if (Acc==Don) continue; |
| 7638 | gg=sqrt( Distance(Hyd->pos,atoms.at(j).pos)); |
| 7639 | |
| 7640 | |
| 7641 | if (gg<=HAMax){ |
| 7642 | hb_wink=winkel(Acc->pos-Hyd->pos, Don->pos-Hyd->pos); |
| 7643 | if ((gg>=1.3)&&(fabs(hb_wink)>HAWink)) {//wenn AbstandRichtig |
| 7644 | hbond.a1=iHyd; |
| 7645 | hbond.a2=j; |
| 7646 | hbond.ato1=Hyd; |
| 7647 | hbond.ato2=Acc; |
| 7648 | hbond.length=gg; |
| 7649 | if (!theH_Bonds.contains(hbond)) theH_Bonds.append(hbond); |
| 7650 | } |
| 7651 | } |
| 7652 | } |
| 7653 | } |
| 7654 | } |
| 7655 | } |
| 7656 | |
| 7657 | void Molecule::hirsh(Connection bond){ |
| 7658 | return; |
| 7659 | V3 hin; |
| 7660 | // double zab,zba; |
| 7661 | for (int i=0; i<bond.size();i++){ |
| 7662 | hin=Normalize(bond.at(i).ato2->pos-bond.at(i).ato1->pos); |
| 7663 | // zab=(hin*bond.at(i).ato1->uc)*hin; |
| 7664 | // zba=(hin*bond.at(i).ato2->uc)*hin; |
| 7665 | /* printf("%-9s = %-9s zab %g zba %g %g\n", |
| 7666 | bond.at(i).ato1->Label.toStdString().c_str(), |
| 7667 | bond.at(i).ato2->Label.toStdString().c_str(), |
| 7668 | zab,zba,fabs(zab-zba)*1000);*/ |
| 7669 | } |
| 7670 | } |
| 7671 | |
| 7672 | void Molecule::lbond(){ |
| 7673 | /*! draws line bonds from lbonds list. |
| 7674 | */ |
| 7675 | if (lbonds.isEmpty())return; |
| 7676 | //glPushMatrix(); |
| 7677 | glLineWidth(q_bondWidth); |
| 7678 | glEnable(GL_BLEND); |
| 7679 | glDisable(GL_LIGHTING); |
| 7680 | glBegin(GL_LINES); |
| 7681 | glColor3f(0.5f,0.3f,0.3f); |
| 7682 | for (int i=0; i<lbonds.size();i++) |
| 7683 | if (lbonds.at(i).ato1->hidden+lbonds.at(i).ato2->hidden==0){ |
| 7684 | glVertex3d(lbonds.at(i).ato1->pos.x,lbonds.at(i).ato1->pos.y,lbonds.at(i).ato1->pos.z); |
| 7685 | glVertex3d(lbonds.at(i).ato2->pos.x,lbonds.at(i).ato2->pos.y,lbonds.at(i).ato2->pos.z); |
| 7686 | } |
| 7687 | glEnd(); |
| 7688 | glEnable(GL_LIGHTING); |
| 7689 | glDisable(GL_BLEND); |
| 7690 | |
| 7691 | glLineWidth(1.0f); |
| 7692 | //glPopMatrix(); |
| 7693 | |
| 7694 | } |
| 7695 | |
| 7696 | void Molecule::dbond(Connection bond,int ccod){ |
| 7697 | /*! draws line bonds from bond list . |
| 7698 | */ |
| 7699 | if (bond.isEmpty())return; |
| 7700 | glEnable(GL_BLEND); |
| 7701 | glDisable(GL_LIGHTING); |
| 7702 | glLineWidth((ccod==76)?6.f:3.f); |
| 7703 | glBegin(GL_LINES); |
| 7704 | glColor3f(0.0,0.0,0.0); |
| 7705 | for (int i=0; i<bond.size();i++) |
| 7706 | if ((bond.at(i).ato1!=NULL)&&(bond.at(i).ato2!=NULL)){ |
| 7707 | if (ccod==76){ |
| 7708 | if (bond.at(i).ato1->sg) glColor4d(0.7,0.5,0.2,0.7); |
| 7709 | else glColor4d(0.2,0.5,0.7,0.7); |
| 7710 | } |
| 7711 | if (bond.at(i).ato1->hidden+bond.at(i).ato2->hidden==0){ |
| 7712 | glVertex3d(bond.at(i).ato1->pos.x,bond.at(i).ato1->pos.y,bond.at(i).ato1->pos.z); |
| 7713 | glVertex3d(bond.at(i).ato2->pos.x,bond.at(i).ato2->pos.y,bond.at(i).ato2->pos.z); |
| 7714 | } |
| 7715 | } |
| 7716 | glEnd(); |
| 7717 | glEnable(GL_LIGHTING); |
| 7718 | glDisable(GL_BLEND); |
| 7719 | glLineWidth(1.0f); |
| 7720 | } |
| 7721 | |
| 7722 | void Molecule::unitCell(){ |
| 7723 | /*!draws a unit cell box |
| 7724 | * |
| 7725 | * */ |
| 7726 | V3 uz0f,uz1f,uz2f,uz3f,uz4f,uz5f,uz6f,uz7f; |
| 7727 | V3 uz0k,uz1k,uz2k,uz3k,uz4k,uz5k,uz6k,uz7k; |
| 7728 | uz0f.x=0.0; uz0f.y=0.0; uz0f.z=0.0; |
| 7729 | uz1f.x=1.0; uz1f.y=0.0; uz1f.z=0.0; |
| 7730 | uz2f.x=0.0; uz2f.y=1.0; uz2f.z=0.0; |
| 7731 | uz3f.x=0.0; uz3f.y=0.0; uz3f.z=1.0; |
| 7732 | uz4f.x=1.0; uz4f.y=1.0; uz4f.z=0.0; |
| 7733 | uz5f.x=1.0; uz5f.y=0.0; uz5f.z=1.0; |
| 7734 | uz6f.x=0.0; uz6f.y=1.0; uz6f.z=1.0; |
| 7735 | uz7f.x=1.0; uz7f.y=1.0; uz7f.z=1.0; |
| 7736 | frac2kart(uz0f,uz0k); |
| 7737 | frac2kart(uz1f,uz1k); |
| 7738 | frac2kart(uz2f,uz2k); |
| 7739 | frac2kart(uz3f,uz3k); |
| 7740 | frac2kart(uz4f,uz4k); |
| 7741 | frac2kart(uz5f,uz5k); |
| 7742 | frac2kart(uz6f,uz6k); |
| 7743 | frac2kart(uz7f,uz7k); |
| 7744 | glEnable(GL_BLEND); |
| 7745 | glDisable(GL_LIGHTING); |
| 7746 | glLineWidth(2); |
| 7747 | //glPushMatrix(); |
| 7748 | glBegin(GL_LINES); |
| 7749 | glColor4f(1.0f,0.0f,0.0f,1.0); |
| 7750 | glVertex3d(uz0k.x,uz0k.y,uz0k.z); |
| 7751 | glVertex3d(uz1k.x,uz1k.y,uz1k.z); |
| 7752 | |
| 7753 | glColor4f(0.0f,1.0f,0.0f,1.0); |
| 7754 | glVertex3d(uz0k.x,uz0k.y,uz0k.z); |
| 7755 | glVertex3d(uz2k.x,uz2k.y,uz2k.z); |
| 7756 | |
| 7757 | glColor4f(0.0f,0.0f,1.0f,1.0); |
| 7758 | glVertex3d(uz0k.x,uz0k.y,uz0k.z); |
| 7759 | glVertex3d(uz3k.x,uz3k.y,uz3k.z); |
| 7760 | |
| 7761 | glColor4f(0.6f,0.6f,0.8f,1.0); |
| 7762 | glVertex3d(uz1k.x,uz1k.y,uz1k.z); |
| 7763 | glVertex3d(uz4k.x,uz4k.y,uz4k.z); |
| 7764 | |
| 7765 | glVertex3d(uz1k.x,uz1k.y,uz1k.z); |
| 7766 | glVertex3d(uz5k.x,uz5k.y,uz5k.z); |
| 7767 | |
| 7768 | glVertex3d(uz2k.x,uz2k.y,uz2k.z); |
| 7769 | glVertex3d(uz4k.x,uz4k.y,uz4k.z); |
| 7770 | |
| 7771 | glVertex3d(uz2k.x,uz2k.y,uz2k.z); |
| 7772 | glVertex3d(uz6k.x,uz6k.y,uz6k.z); |
| 7773 | |
| 7774 | glVertex3d(uz3k.x,uz3k.y,uz3k.z); |
| 7775 | glVertex3d(uz5k.x,uz5k.y,uz5k.z); |
| 7776 | |
| 7777 | glVertex3d(uz3k.x,uz3k.y,uz3k.z); |
| 7778 | glVertex3d(uz6k.x,uz6k.y,uz6k.z); |
| 7779 | |
| 7780 | glVertex3d(uz7k.x,uz7k.y,uz7k.z); |
| 7781 | glVertex3d(uz5k.x,uz5k.y,uz5k.z); |
| 7782 | |
| 7783 | glVertex3d(uz7k.x,uz7k.y,uz7k.z); |
| 7784 | glVertex3d(uz4k.x,uz4k.y,uz4k.z); |
| 7785 | |
| 7786 | glVertex3d(uz7k.x,uz7k.y,uz7k.z); |
| 7787 | glVertex3d(uz6k.x,uz6k.y,uz6k.z); |
| 7788 | |
| 7789 | glEnd(); |
| 7790 | //glPopMatrix(); |
| 7791 | glLineWidth(1); |
| 7792 | glEnable(GL_LIGHTING); |
| 7793 | glDisable(GL_BLEND); |
| 7794 | } |
| 7795 | |
| 7796 | void Molecule::Uf2Uo(const Matrix x, Matrix & y) { |
| 7797 | /*! Turns fractional Uij's into cartesinan based Uij's. |
| 7798 | * @param[in] x fractional Uij matrix. |
| 7799 | * @param[out] y cartesinan Uij matrix. |
| 7800 | */ |
| 7801 | Matrix o,a,w; /*Cholesky decomposition of the real space Metric tensor |
| 7802 | Wird fuer die Umrechnung von fraktionellen in kartesischen Korrdinaten benoetigt.*/ |
| 7803 | a.m11 =cell.as; |
| 7804 | a.m12 = 0; |
| 7805 | a.m13 = 0; |
| 7806 | a.m21 = 0; |
| 7807 | a.m22 = cell.bs; |
| 7808 | a.m23 = 0; |
| 7809 | a.m31 = 0; |
| 7810 | a.m32 = 0; |
| 7811 | a.m33 = cell.cs; |
| 7812 | w=(a*x)*a; |
| 7813 | o.m11 =cell.a; |
| 7814 | o.m12 = 0.0; |
| 7815 | o.m13 = 0.0; |
| 7816 | o.m21 = cell.b*cell.cosga; |
| 7817 | o.m22 = cell.b*cell.singa; |
| 7818 | o.m23 = 0.0; |
| 7819 | o.m31 = cell.c* cell.cosbe; |
| 7820 | o.m32 = cell.tau; |
| 7821 | o.m33 = cell.c* cell.phi / cell.singa ; |
| 7822 | // Matrix to=; |
| 7823 | y=(o*w)*transponse(o); |
| 7824 | /* printf("%f %f %f %f %f %f %f %f %f\n%f %f %f %f %f %f %f %f %f\n%f %f %f %f %f %f %f %f %f\n%f %f %f %f %f %f %f %f %f\n", |
| 7825 | o.m11,o.m12,o.m13,o.m21,o.m22,o.m23,o.m31,o.m32,o.m33, |
| 7826 | to.m11,to.m21,to.m31,to.m12,to.m22,to.m32,to.m13,to.m23,to.m33, |
| 7827 | x.m11,x.m12,x.m13,x.m21,x.m22,x.m23,x.m31,x.m32,x.m33, |
| 7828 | w.m11,w.m12,w.m13,w.m21,w.m22,w.m23,w.m31,w.m32,w.m33 |
| 7829 | );*/ |
| 7830 | // printf("%f %f %f %f %f %f\n",y.m11*10000,y.m22*10000,y.m33*10000,y.m12*10000,y.m13*10000,y.m23*10000);// */ |
| 7831 | } |
| 7832 | |
| 7833 | void Molecule::Usym (Matrix x,Matrix sym, Matrix & y){ |
| 7834 | /*! Applies the symmetry matrix sym to Uij's |
| 7835 | * @param[in] x Uij matrix. |
| 7836 | * @param[in] sym symmtry matrix. |
| 7837 | * @param[out] y resulting Uij matrix. |
| 7838 | */ |
| 7839 | //y=(transponse(sym)*x)*sym; |
| 7840 | y=(sym*x)*transponse(sym); |
| 7841 | } |
| 7842 | |
| 7843 | void Molecule::USymCode(Matrix x,int scod, Matrix & y){ |
| 7844 | int s = scod / 1000; |
| 7845 | y=(cell.symmops.at(s)*x)*transponse(cell.symmops.at(s)); |
| 7846 | } |
| 7847 | |
| 7848 | //void Molecule:: |
| 7849 | |
| 7850 | #define ROTATE(a,i,j,k,l) g=a[i][j];h=a[k][l];a[i][j]=g-s*(h+g*tau); a[k][l]=h+s*(g-h*tau); |
| 7851 | //NumericalRecepies.... |
| 7852 | double * Molecule::jacobi(const Matrix &uij, V3 &ev) { |
| 7853 | int j,iq,ip,i,n=3,nrot; |
| 7854 | double tresh=0,theta,tau,t,sm,s,h,g,c; |
| 7855 | double a[3][3],b[3],z[3],v[3][3],d[3]; |
| 7856 | a[0][0]=uij.m11; |
| 7857 | a[0][1]=uij.m12; |
| 7858 | a[0][2]=uij.m13; |
| 7859 | a[1][0]=uij.m21; |
| 7860 | a[1][1]=uij.m22; |
| 7861 | a[1][2]=uij.m23; |
| 7862 | a[2][0]=uij.m31; |
| 7863 | a[2][1]=uij.m32; |
| 7864 | a[2][2]=uij.m33; |
| 7865 | /* printf("%12.6f %12.6f %12.6f\n%12.6f %12.6f %12.6f\n%12.6f %12.6f %12.6f\n" |
| 7866 | ,a[0][0],a[1][0],a[2][0] |
| 7867 | ,a[0][1],a[1][1],a[2][1] |
| 7868 | ,a[0][2],a[1][2],a[2][2]);*/ |
| 7869 | static double erg[4]={0.0,1.0,0.0,0.0}; |
| 7870 | for (ip=1;ip<=n;ip++) { |
| 7871 | for (iq=1;iq<=n;iq++) v[ip-1][iq-1]=0.0; |
| 7872 | v[ip-1][ip-1]=1.0; |
| 7873 | } |
| 7874 | for (ip=1;ip<=n;ip++) { |
| 7875 | b[ip-1]=d[ip-1]=a[ip-1][ip-1]; |
| 7876 | z[ip-1]=0.0; |
| 7877 | } |
| 7878 | nrot=0; |
| 7879 | for (i=1;i<=150;i++) { |
| 7880 | sm=0.0; |
| 7881 | for (ip=1;ip<=n-1;ip++) { |
| 7882 | for (iq=ip+1;iq<=n;iq++) |
| 7883 | sm += fabs(a[ip-1][iq-1]); |
| 7884 | } |
| 7885 | |
| 7886 | //printf("sm =%20.19f\n",sm); |
| 7887 | |
| 7888 | if (float(sm) < tresh) { |
| 7889 | if ((v[0][0]+v[1][1]+v[2][2])!=3.0) { |
| 7890 | erg[0]=acos((v[0][0]+v[1][1]+v[2][2]-1.0)/2.0); |
| 7891 | erg[1]=(v[2][1]-v[1][2])/(2.0*sin(erg[0])); |
| 7892 | erg[2]=(v[0][2]-v[2][0])/(2.0*sin(erg[0])); |
| 7893 | erg[3]=(v[1][0]-v[0][1])/(2.0*sin(erg[0])); |
| 7894 | erg[0]*=180.0/M_PI;} |
| 7895 | else {erg[0]=0.0;erg[1]=1.0;erg[2]=0.0;erg[3]=0.0; } |
| 7896 | //printf("%d??ERG:%f %f %f %f\n",i,Ato4d(erg)); |
| 7897 | /* |
| 7898 | printf("=%d======================================\n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f\n========================================\n",i, |
| 7899 | d[0],d[1],d[2],v[0][0],v[0][1],v[0][2] |
| 7900 | ,v[1][0],v[1][1],v[1][2] |
| 7901 | ,v[2][0],v[2][1],v[2][2] |
| 7902 | );*/ |
| 7903 | ev=V3(d[0],d[1],d[2]); |
| 7904 | /* printf("\n%12.6f %12.6f %12.6f\n%12.6f %12.6f %12.6f\n%12.6f %12.6f %12.6f\n" |
| 7905 | ,v[0][0],v[1][0],v[2][0] |
| 7906 | ,v[0][1],v[1][1],v[2][1] |
| 7907 | ,v[0][2],v[1][2],v[2][2]); |
| 7908 | if ((ev.x>0)&&(ev.y>0)&&(ev.z>0)){;}else{ |
| 7909 | printf("NPD: %g %g %g \n",d[0],d[1],d[2]); |
| 7910 | }*/ |
| 7911 | return (double*) erg; |
| 7912 | } |
| 7913 | if (i < 4) tresh=0.00001; |
| 7914 | else tresh=0.0001; |
| 7915 | for (ip=1;ip<=n-1;ip++) { |
| 7916 | for (iq=ip+1;iq<=n;iq++) { |
| 7917 | //printf("\np:%i q:%i i:%i nrot:%i\n",ip,iq,i,nrot); |
| 7918 | g=100.0*fabs(a[ip-1][iq-1]); |
| 7919 | if ((i > 4) && ((fabs(d[ip-1])+g) == fabs(d[ip-1])) && ((fabs(d[iq-1])+g) == fabs(d[iq-1]))) {a[ip-1][iq-1]=0.0;} |
| 7920 | else if (fabs(a[ip-1][iq-1]) >= tresh) { |
| 7921 | h=d[iq-1]-d[ip-1]; |
| 7922 | if ((fabs(h)+g) == fabs(h)) {t=(a[ip-1][iq-1])/h; } |
| 7923 | else { theta=0.5*h/(a[ip-1][iq-1]); |
| 7924 | t=1.0/(fabs(theta)+sqrt(1.0+theta*theta)); |
| 7925 | if (theta < 0.0) {t = -1.0*t;} |
| 7926 | } |
| 7927 | c=1.0/sqrt(1+t*t); |
| 7928 | s=t*c; |
| 7929 | tau=s/(1.0+c); |
| 7930 | h=t*a[ip-1][iq-1]; |
| 7931 | z[ip-1] -= h; |
| 7932 | z[iq-1] += h; |
| 7933 | d[ip-1] -= h; |
| 7934 | d[iq-1] += h; |
| 7935 | a[ip-1][iq-1]=0.0; |
| 7936 | for (j=1;j<=ip-1;j++) { |
| 7937 | ROTATE(a,j-1,ip-1,j-1,iq-1) |
| 7938 | //printf("%i %i %i %i",j,ip,j,iq); |
| 7939 | } |
| 7940 | for (j=ip+1;j<=iq-1;j++) { |
| 7941 | ROTATE(a,ip-1,j-1,j-1,iq-1) |
| 7942 | //printf("%i %i %i %i ",ip,j,j,iq); |
| 7943 | } |
| 7944 | for (j=iq+1;j<=n;j++) { |
| 7945 | ROTATE(a,ip-1,j-1,iq-1,j-1) |
| 7946 | //printf("%i %i %i %i",ip,j,iq,j); |
| 7947 | } |
| 7948 | for (j=1;j<=n;j++) { |
| 7949 | ROTATE(v,j-1,ip-1,j-1,iq-1) |
| 7950 | } |
| 7951 | ++(nrot); |
| 7952 | // printf("U|\n%f %f %f \n%f %f %f\n%f %f %f\nV|\n%f %f %f \n%f %f %f\n%f %f %f\n\n",a[0][0],a[1][0],a[2][0],a[0][1],a[1][1],a[2][1],a[0][2],a[1][2],a[2][2],v[0][0],v[1][0],v[2][0],v[0][1],v[1][1],v[2][1],v[0][2],v[1][2],v[2][2]); |
| 7953 | } //else ;//printf("nix:%f p%i q%i",fabs(a[ip-1][iq-1]),ip,iq); |
| 7954 | } |
| 7955 | } |
| 7956 | for (ip=1;ip<=n;ip++) { |
| 7957 | b[ip-1] += z[ip-1]; |
| 7958 | d[ip-1] =b[ip-1]; |
| 7959 | z[ip-1] =0.0; |
| 7960 | } |
| 7961 | } |
| 7962 | erg[0]=acos((v[0][0]+v[1][1]+v[2][2]-1.0)/2.0); |
| 7963 | if (erg[0]==0) { |
| 7964 | erg[1]=1.0; |
| 7965 | erg[2]=0.0; |
| 7966 | erg[3]=0.0; |
| 7967 | }else{ |
| 7968 | erg[1]=(v[2][1]-v[1][2])/(2.0*sin(erg[0])); |
| 7969 | erg[2]=(v[0][2]-v[2][0])/(2.0*sin(erg[0])); |
| 7970 | erg[3]=(v[1][0]-v[0][1])/(2.0*sin(erg[0])); |
| 7971 | erg[0]*=180.0/M_PI; |
| 7972 | } |
| 7973 | /*printf("=%d=======================================\n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f \n%8.5f %8.5f %8.5f\n========================================\n",i, |
| 7974 | d[0],d[1],d[2],v[0][0],v[0][1],v[0][2] |
| 7975 | ,v[1][0],v[1][1],v[1][2] |
| 7976 | ,v[2][0],v[2][1],v[2][2] |
| 7977 | |
| 7978 | );*/ |
| 7979 | ev=V3(d[0],d[1],d[2]); |
| 7980 | /* if ((ev.x>0)&&(ev.y>0)&&(ev.z>0)){;}else{ |
| 7981 | printf("NPD: %g %g %g \n",d[0],d[1],d[2]); |
| 7982 | }*/ |
| 7983 | return (double*)erg; |
| 7984 | } |
| 7985 | |
| 7986 | void Molecule::fuse(){ |
| 7987 | /*! reduces the showatoms list to the asymmetric unit. |
| 7988 | * */ |
| 7989 | HumanSymmetry=QString("Used Symmetry:<br>%1").arg(symmcode2human(QStringList())); |
| 7990 | usedSymmetry.clear(); |
| 7991 | //printf("FUSE\n"); |
| 7992 | showatoms.clear(); |
| 7993 | for (int i=0; i<asymm.size();i++){ |
| 7994 | showatoms.append(asymm[i]); |
| 7995 | showatoms[i].molindex=asymm[i].molindex; |
| 7996 | //printf("%d %d %d %s\n",asymm[i].an,i,asymm[i].hidden,asymm[i].Label.toStdString().c_str()); |
| 7997 | } |
| 7998 | showbonds.clear(); |
| 7999 | showbonds=connecting(showatoms); |
| 8000 | } |
| 8001 | |
| 8002 | void Molecule::grow(){ |
| 8003 | /*! completes covalent bound molecule fragments. |
| 8004 | * |
| 8005 | * */ |
| 8006 | printf("mole -> grow\n"); |
| 8007 | showatoms.clear(); |
| 8008 | for (int i=0; i<asymm.size();i++){ |
| 8009 | showatoms.append(asymm[i]); |
| 8010 | showatoms[i].molindex=asymm[i].molindex; |
| 8011 | } |
| 8012 | showbonds.clear(); |
| 8013 | QStringList brauchSymm; |
| 8014 | QString bs; |
| 8015 | brauchSymm.clear(); |
| 8016 | V3 prime,dp,D,floorD; |
| 8017 | double dk,dddd; |
| 8018 | for (int k =0; k<sdm.size();k++){ |
| 8019 | if ((sdm.at(k).covalent)||(growQPeak)){ |
| 8020 | if (!(growQPeak)&&(asymm[sdm.at(k).a1].molindex<1)) continue; |
| 8021 | for (int n=0;n<cell.symmops.size(); n++){ |
| 8022 | if (((asymm[sdm.at(k).a1].part!=0)&&(asymm[sdm.at(k).a2].part!=0)&&(asymm[sdm.at(k).a1].part!=asymm[sdm.at(k).a2].part)))continue; |
| 8023 | if ((asymm[sdm.at(k).a1].an==asymm[sdm.at(k).a2].an)&&(asymm[sdm.at(k).a1].an==0)) continue; |
| 8024 | prime=cell.symmops.at(n) * asymm[sdm.at(k).a1].frac + cell.trans.at(n); |
| 8025 | D=prime - asymm[sdm.at(k).a2].frac+ V3(0.5,0.5,0.5) ; |
| 8026 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8027 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 8028 | if ((n==0)&&(V3(0,0,0)==floorD)) continue; |
| 8029 | dk=fl(dp.x,dp.y,dp.z); |
| 8030 | //printf ("%f n%d\n",dk,n); |
| 8031 | dddd=(sdm.at(k).covalent)?(sdm.at(k).d+0.2):0; |
| 8032 | // an<0 means hydrogen atom (this is a hydrogen contact): |
| 8033 | if ((asymm[sdm.at(k).a1].an<0)&&(asymm[sdm.at(k).a2].an<0)) dddd=1.8;//|| |
| 8034 | if ( (dk>0.001)&&(dddd>=dk)) { |
| 8035 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm[sdm.at(k).a1].molindex); |
| 8036 | // printf("%s %s %g %g\n",asymm[sdm.at(k).a1].Label.toStdString().c_str(),asymm[sdm.at(k).a2].Label.toStdString().c_str(),sdm.at(k).d,dddd); |
| 8037 | // printf("(grow)%s\n",bs.toStdString().c_str()); |
| 8038 | if ((!brauchSymm.contains(bs))) { |
| 8039 | brauchSymm.append(bs); |
| 8040 | } |
| 8041 | } |
| 8042 | } |
| 8043 | } |
| 8044 | } |
| 8045 | for (int i=0; i<bindatoms.size(); i++){ |
| 8046 | MyAtom a1, a2; |
| 8047 | bool bo=false; |
| 8048 | int sy1=-1,sy2=-1; |
| 8049 | if (bindatoms.at(i).Lab1.contains("_$"))sy1=bindatoms.at(i).Lab1.section("_$",1,1).toInt(&bo); |
| 8050 | if (bindatoms.at(i).Lab2.contains("_$"))sy2=bindatoms.at(i).Lab2.section("_$",1,1).toInt(&bo); |
| 8051 | bo=false; |
| 8052 | if (bindatoms.at(i).Lab1.contains('_'))a1.resiNr=bindatoms.at(i).Lab1.section('_',1,1).toInt(&bo); |
| 8053 | if (!bo) a1.resiNr=-1; |
| 8054 | if (bindatoms.at(i).Lab2.contains('_'))a2.resiNr=bindatoms.at(i).Lab2.section('_',1,1).toInt(&bo); |
| 8055 | if (!bo)a2.resiNr=-1; |
| 8056 | a1.Label = bindatoms.at(i).Lab1.section('_',0,0); |
| 8057 | a2.Label = bindatoms.at(i).Lab2.section('_',0,0); |
| 8058 | int frag1=0,frag2=0; |
| 8059 | for (int ii=0; ii<asymm.size();ii++){ |
| 8060 | if ((a1.resiNr>-1)&& (asymm[ii].resiNr!=a1.resiNr)) continue; |
| 8061 | if ((a2.resiNr>-1)&& (asymm[ii].resiNr!=a2.resiNr)) continue; |
| 8062 | if (asymm[ii].Label.section('_',0,0).toUpper() == a1.Label.toUpper()){ |
| 8063 | frag1=asymm[ii].molindex; |
| 8064 | } |
| 8065 | if (asymm[ii].Label.section('_',0,0).toUpper() == a2.Label.toUpper()){ |
| 8066 | frag2=asymm[ii].molindex; |
| 8067 | } |
| 8068 | } |
| 8069 | QString ss; |
| 8070 | QList<Matrix> smm; |
| 8071 | QList<V3> tmm; |
| 8072 | int syy1=-1; |
| 8073 | if (sy1>-1) syy1=labelEQIV.indexOf(QString("$%1").arg(sy1)); |
| 8074 | if (syy1>-1) { |
| 8075 | smm.append(symmopsEQIV.at(syy1)); |
| 8076 | tmm.append(transEQIV.at(syy1)); |
| 8077 | } |
| 8078 | int syy2=-1; |
| 8079 | if (sy2>-1) syy2=labelEQIV.indexOf(QString("$%1").arg(sy2)); |
| 8080 | if (syy2>-1) { |
| 8081 | smm.append(symmopsEQIV.at(syy2)); |
| 8082 | tmm.append(transEQIV.at(syy2)); |
| 8083 | } |
| 8084 | for (int ui=0; ui<smm.size(); ui++){ |
| 8085 | if (cell.symmops.contains(smm.at(ui))) { |
| 8086 | V3 r; |
| 8087 | r.x=fmod(tmm.at(ui).x+10,1.0); |
| 8088 | r.y=fmod(tmm.at(ui).y+10,1.0); |
| 8089 | r.z=fmod(tmm.at(ui).z+10,1.0); |
| 8090 | |
| 8091 | for (int is=0; is<cell.symmops.size();is++){ |
| 8092 | if ((cell.symmops.at(is)==smm.at(ui))&&(cell.trans.at(is)==r)) |
| 8093 | for (int yi=1; yi<=5; yi++){ |
| 8094 | ss=QString("%1_%2%3%4:%5,") |
| 8095 | .arg(is+1) |
| 8096 | .arg((int)(tmm.at(ui).x-r.x) +5) |
| 8097 | .arg((int)(tmm.at(ui).y-r.y) +5) |
| 8098 | .arg((int)(tmm.at(ui).z-r.z) +5) |
| 8099 | .arg(((sy1>-1)&&(!ui))?frag1:frag2); |
| 8100 | if (!brauchSymm.contains(ss)) { |
| 8101 | brauchSymm.append(ss); |
| 8102 | eqivMap[labelEQIV.at(((sy1>-1)&&(!ui))?sy1-1:sy2-1)]=brauchSymm.size(); |
| 8103 | // printf("%d ==> %d %s\n",sy2-1, brauchSymm.size(),labelEQIV.at(((sy1>-1)&&(!ui))?sy1-1:sy2-1).toStdString().c_str()); |
| 8104 | } |
| 8105 | } |
| 8106 | } |
| 8107 | } |
| 8108 | } |
| 8109 | } |
| 8110 | |
| 8111 | /* for (int i=0; i<sdm.size();i++){ |
| 8112 | if ((sdm.at(i).sn==0)&&(V3(0,0,0)==sdm.at(i).floorD)) continue; |
| 8113 | double dddd=((Kovalenz_Radien[asymm[sdm.at(i).a1].an]+ Kovalenz_Radien[asymm[sdm.at(i).a2].an])*0.01+0.5); |
| 8114 | if (dddd>sdm.at(i).d){ |
| 8115 | bs=QString("%1_%2%3%4:%5,").arg(sdm.at(i).sn+1).arg(5-(int)sdm.at(i).floorD.x).arg(5-(int)sdm.at(i).floorD.y).arg(5-(int)sdm.at(i).floorD.z).arg(asymm[sdm.at(i).a1].molindex); |
| 8116 | / * printf("%s %f %s %s\n",bs.toStdString().c_str(),sdm.at(i).d, |
| 8117 | asymm[sdm.at(i).a1].Label.toStdString().c_str(), |
| 8118 | asymm[sdm.at(i).a2].Label.toStdString().c_str()); |
| 8119 | * / |
| 8120 | if (!brauchSymm.contains(bs)) { |
| 8121 | brauchSymm.append(bs); |
| 8122 | } |
| 8123 | } |
| 8124 | } */ |
| 8125 | //packer(brauchSymm); |
| 8126 | usedSymmetry+=brauchSymm; |
| 8127 | //complete(); |
| 8128 | // printf("GROW\n"); |
| 8129 | packer(brauchSymm); |
| 8130 | showbonds.clear(); |
| 8131 | showbonds=connecting(showatoms); |
| 8132 | } |
| 8133 | |
| 8134 | void Molecule::grow_plus(){ |
| 8135 | /*! completes covalent bound molecule fragments. |
| 8136 | * |
| 8137 | * */ |
| 8138 | showatoms.clear(); |
| 8139 | for (int i=0; i<asymm.size();i++){ |
| 8140 | showatoms.append(asymm[i]); |
| 8141 | showatoms[i].molindex=asymm[i].molindex; |
| 8142 | } |
| 8143 | showbonds.clear(); |
| 8144 | QStringList brauchSymm; |
| 8145 | QString bs; |
| 8146 | brauchSymm.clear(); |
| 8147 | V3 prime,dp,D,floorD; |
| 8148 | double dk,dddd; |
| 8149 | for (int k =0; k<sdm.size();k++){ |
| 8150 | if ((sdm.at(k).covalent)||(growQPeak)){ |
| 8151 | if (!(growQPeak)&&(asymm[sdm.at(k).a1].molindex<1)) continue; |
| 8152 | for (int n=0;n<cell.symmops.size(); n++){ |
| 8153 | if (((asymm[sdm.at(k).a1].part!=0)&&(asymm[sdm.at(k).a2].part!=0)&&(asymm[sdm.at(k).a1].part!=asymm[sdm.at(k).a2].part)))continue; |
| 8154 | if ((asymm[sdm.at(k).a1].an==asymm[sdm.at(k).a2].an)&&(asymm[sdm.at(k).a1].an==0)) continue; |
| 8155 | prime=cell.symmops.at(n) * asymm[sdm.at(k).a1].frac + cell.trans.at(n); |
| 8156 | D=prime - asymm[sdm.at(k).a2].frac+ V3(0.5,0.5,0.5) ; |
| 8157 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8158 | dp=D - floorD - V3(0.5,0.5,0.5); |
| 8159 | if ((n==0)&&(V3(0,0,0)==floorD)) continue; |
| 8160 | dk=fl(dp.x,dp.y,dp.z); |
| 8161 | //printf ("%f n%d\n",dk,n); |
| 8162 | dddd=(sdm.at(k).covalent)?(sdm.at(k).d+0.2):0; |
| 8163 | if ((asymm[sdm.at(k).a1].an<0)&&(asymm[sdm.at(k).a2].an<0)) dddd=1.8;//|| |
| 8164 | if ( (dk>0.001)&&(dddd>=dk)) { |
| 8165 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm[sdm.at(k).a1].molindex); |
| 8166 | // printf("%s %s %g %g\n",asymm[sdm.at(k).a1].Label.toStdString().c_str(),asymm[sdm.at(k).a2].Label.toStdString().c_str(),sdm.at(k).d,dddd); |
| 8167 | // printf("(grow)%s\n",bs.toStdString().c_str()); |
| 8168 | if ((!brauchSymm.contains(bs))) { |
| 8169 | brauchSymm.append(bs); |
| 8170 | } |
| 8171 | } |
| 8172 | } |
| 8173 | } |
| 8174 | } |
| 8175 | for (int i=0; i<bindatoms.size(); i++){ |
| 8176 | MyAtom a1, a2; |
| 8177 | bool bo=false; |
| 8178 | int sy1=-1,sy2=-1; |
| 8179 | if (bindatoms.at(i).Lab1.contains("_$"))sy1=bindatoms.at(i).Lab1.section("_$",1,1).toInt(&bo); |
| 8180 | if (bindatoms.at(i).Lab2.contains("_$"))sy2=bindatoms.at(i).Lab2.section("_$",1,1).toInt(&bo); |
| 8181 | bo=false; |
| 8182 | if (bindatoms.at(i).Lab1.contains('_'))a1.resiNr=bindatoms.at(i).Lab1.section('_',1,1).toInt(&bo); |
| 8183 | if (!bo) a1.resiNr=-1; |
| 8184 | if (bindatoms.at(i).Lab2.contains('_'))a2.resiNr=bindatoms.at(i).Lab2.section('_',1,1).toInt(&bo); |
| 8185 | if (!bo)a2.resiNr=-1; |
| 8186 | a1.Label = bindatoms.at(i).Lab1.section('_',0,0); |
| 8187 | a2.Label = bindatoms.at(i).Lab2.section('_',0,0); |
| 8188 | int frag1=0,frag2=0; |
| 8189 | for (int ii=0; ii<asymm.size();ii++){ |
| 8190 | if ((a1.resiNr>-1)&& (asymm[ii].resiNr!=a1.resiNr)) continue; |
| 8191 | if ((a2.resiNr>-1)&& (asymm[ii].resiNr!=a2.resiNr)) continue; |
| 8192 | if (asymm[ii].Label.section('_',0,0).toUpper() == a1.Label.toUpper()){ |
| 8193 | frag1=asymm[ii].molindex; |
| 8194 | } |
| 8195 | if (asymm[ii].Label.section('_',0,0).toUpper() == a2.Label.toUpper()){ |
| 8196 | frag2=asymm[ii].molindex; |
| 8197 | } |
| 8198 | } |
| 8199 | QString ss; |
| 8200 | QList<Matrix> smm; |
| 8201 | QList<V3> tmm; |
| 8202 | int syy1=-1; |
| 8203 | if (sy1>-1) syy1=labelEQIV.indexOf(QString("$%1").arg(sy1)); |
| 8204 | if (syy1>-1) { |
| 8205 | smm.append(symmopsEQIV.at(syy1)); |
| 8206 | tmm.append(transEQIV.at(syy1)); |
| 8207 | } |
| 8208 | int syy2=-1; |
| 8209 | if (sy2>-1) syy2=labelEQIV.indexOf(QString("$%1").arg(sy2)); |
| 8210 | if (syy2>-1) { |
| 8211 | smm.append(symmopsEQIV.at(syy2)); |
| 8212 | tmm.append(transEQIV.at(syy2)); |
| 8213 | } |
| 8214 | for (int ui=0; ui<smm.size(); ui++) |
| 8215 | if (cell.symmops.contains(smm.at(ui))) { |
| 8216 | V3 r; |
| 8217 | r.x=fmod(tmm.at(ui).x+10,1.0); |
| 8218 | r.y=fmod(tmm.at(ui).y+10,1.0); |
| 8219 | r.z=fmod(tmm.at(ui).z+10,1.0); |
| 8220 | |
| 8221 | for (int is=0; is<cell.symmops.size();is++){ |
| 8222 | if ((cell.symmops.at(is)==smm.at(ui))&&(cell.trans.at(is)==r)) |
| 8223 | for (int yi=1; yi<=5; yi++){ |
| 8224 | ss=QString("%1_%2%3%4:%5,") |
| 8225 | .arg(is+1) |
| 8226 | .arg((int)(tmm.at(ui).x-r.x) +5) |
| 8227 | .arg((int)(tmm.at(ui).y-r.y) +5) |
| 8228 | .arg((int)(tmm.at(ui).z-r.z) +5) |
| 8229 | .arg(((sy1>-1)&&(!ui))?frag1:frag2); |
| 8230 | if (!brauchSymm.contains(ss)) { |
| 8231 | brauchSymm.append(ss); |
| 8232 | // printf("### %d = %d\n",((sy1>-1)&&(!ui))?sy1:sy2,brauchSymm.size()); |
| 8233 | eqivMap[labelEQIV.at(((sy1>-1)&&(!ui))?sy1-1:sy2-1)]=brauchSymm.size(); |
| 8234 | // qDebug()<<ss; |
| 8235 | } |
| 8236 | } |
| 8237 | } |
| 8238 | } |
| 8239 | } |
| 8240 | |
| 8241 | /* for (int i=0; i<sdm.size();i++){ |
| 8242 | if ((sdm.at(i).sn==0)&&(V3(0,0,0)==sdm.at(i).floorD)) continue; |
| 8243 | double dddd=((Kovalenz_Radien[asymm[sdm.at(i).a1].an]+ Kovalenz_Radien[asymm[sdm.at(i).a2].an])*0.01+0.5); |
| 8244 | if (dddd>sdm.at(i).d){ |
| 8245 | bs=QString("%1_%2%3%4:%5,").arg(sdm.at(i).sn+1).arg(5-(int)sdm.at(i).floorD.x).arg(5-(int)sdm.at(i).floorD.y).arg(5-(int)sdm.at(i).floorD.z).arg(asymm[sdm.at(i).a1].molindex); |
| 8246 | / * printf("%s %f %s %s\n",bs.toStdString().c_str(),sdm.at(i).d, |
| 8247 | asymm[sdm.at(i).a1].Label.toStdString().c_str(), |
| 8248 | asymm[sdm.at(i).a2].Label.toStdString().c_str()); |
| 8249 | * / |
| 8250 | if (!brauchSymm.contains(bs)) { |
| 8251 | brauchSymm.append(bs); |
| 8252 | } |
| 8253 | } |
| 8254 | } */ |
| 8255 | //packer(brauchSymm); |
| 8256 | usedSymmetry+=brauchSymm; |
| 8257 | complete(); |
| 8258 | showbonds.clear(); |
| 8259 | showbonds=connecting(showatoms); |
| 8260 | } |
| 8261 | |
| 8262 | void Molecule::packPoint(const V3 &prime, QList<V3> &wearein){//!< Pack inside cell |
| 8263 | //wearein.clear(); |
| 8264 | V3 p; |
| 8265 | double dawars=1000.0,dl; |
| 8266 | const double ami = 0.0, ama = 1.0, bmi = 0.0, bma = 1.0, cmi = 0.0, cma = 1.0; |
| 8267 | dawars=1000.0; |
| 8268 | for (int g=0; g<wearein.size();g++){ |
| 8269 | dl=fl(prime.x-wearein.at(g).x, prime.y-wearein.at(g).y, prime.z-wearein.at(g).z); |
| 8270 | dawars=(dl<dawars)?dl:dawars; |
| 8271 | } |
| 8272 | //int hh=0,kk=0,ll=0; |
| 8273 | if (dawars>0.01){ |
| 8274 | for (int hh=-11; hh<12; hh++){ |
| 8275 | for (int kk=-11; kk<12; kk++){ |
| 8276 | for (int ll=-11; ll<12; ll++){ |
| 8277 | if ((prime.x+hh)<ami) continue; |
| 8278 | if ((prime.y+kk)<bmi) continue; |
| 8279 | if ((prime.z+ll)<cmi) continue; |
| 8280 | if ((prime.x+hh)>ama) continue; |
| 8281 | if ((prime.y+kk)>bma) continue; |
| 8282 | if ((prime.z+ll)>cma) continue; |
| 8283 | p=prime+V3(static_cast<double>(hh),static_cast<double>(kk),static_cast<double>(ll)); |
| 8284 | //printf("=>%g %g %g \n",p.x,p.y,p.z); |
| 8285 | wearein.append(p); |
| 8286 | }//ll |
| 8287 | }//kk |
| 8288 | }//hh |
| 8289 | } |
| 8290 | } |
| 8291 | |
| 8292 | void Molecule::packLine(const V3 &p1,const V3 &p2, QList<V3> &wearein, int c, QList<int> &dc){//!< Pack inside cell |
| 8293 | V3 prime,dprime,pA,pB; |
| 8294 | //wearein.clear(); |
| 8295 | //double dawars=1000.0,dawars2=1000.0,dl; |
| 8296 | const double ami = -0.001, ama = 1.001, bmi = -0.001, bma = 1.001, cmi = -0.001, cma = 1.001; |
| 8297 | //for (int n=0; n<cell.symmops.size();n++){ |
| 8298 | {int n=0; |
| 8299 | prime=cell.symmops.at(n) * p1 + cell.trans.at(n); |
| 8300 | dprime=cell.symmops.at(n) * p2 + cell.trans.at(n); |
| 8301 | //V3 donotrot=cell.symmops.at(n)*vec; |
| 8302 | //printf("donotrot %g\n",fabs(donotrot*vec)); |
| 8303 | //V3 r1=V3( prime.x*vec.x, prime.y*vec.y, prime.z*vec.z); |
| 8304 | //V3 r2=V3(dprime.x*vec.x,dprime.y*vec.y,dprime.z*vec.z); |
| 8305 | //prime+=r1; |
| 8306 | //dprime+=r1; |
| 8307 | /*printf("?? %g %g %g ? %g %g %g\n", |
| 8308 | prime.x,prime.y,prime.z, |
| 8309 | dprime.x,dprime.y,dprime.z);*/ |
| 8310 | //if (fabs(donotrot*vec) <0.9) continue; |
| 8311 | //printf("%d\n",__LINE__); |
| 8312 | //floorD=V3(floor(prime.x),floor(prime.y),floor(prime.z)); |
| 8313 | //prime=prime -floorD; |
| 8314 | /*dawars2=dawars=1000.0; |
| 8315 | for (int g=0; g<wearein.size();g++){ |
| 8316 | dl=fl(prime.x-wearein.at(g).x, prime.y-wearein.at(g).y, prime.z-wearein.at(g).z); |
| 8317 | dawars=(dl<dawars)?dl:dawars; |
| 8318 | g++; |
| 8319 | dl=fl(dprime.x-wearein.at(g).x, dprime.y-wearein.at(g).y, dprime.z-wearein.at(g).z); |
| 8320 | dawars2=(dl<dawars2)?dl:dawars2; |
| 8321 | } //*/ |
| 8322 | //printf("!! %g %g %g %d %g %g %g %g %g\n", prime.x,prime.y,prime.z,n,dprime.x,dprime.y,dprime.z,dawars,dawars2); |
| 8323 | // if ((dawars<0.01)&&(dawars2<0.01)) continue; |
| 8324 | for (int hh=-11; hh<12; hh++){ |
| 8325 | for (int kk=-11; kk<12; kk++){ |
| 8326 | for (int ll=-11; ll<12; ll++){ |
| 8327 | if ((prime.x+hh)<ami) continue; |
| 8328 | if ((prime.y+kk)<bmi) continue; |
| 8329 | if ((prime.z+ll)<cmi) continue; |
| 8330 | if ((prime.x+hh)>ama) continue; |
| 8331 | if ((prime.y+kk)>bma) continue; |
| 8332 | if ((prime.z+ll)>cma) continue; |
| 8333 | |
| 8334 | if ((dprime.x+hh)<ami) continue; |
| 8335 | if ((dprime.y+kk)<bmi) continue; |
| 8336 | if ((dprime.z+ll)<cmi) continue; |
| 8337 | if ((dprime.x+hh)>ama) continue; |
| 8338 | if ((dprime.y+kk)>bma) continue; |
| 8339 | if ((dprime.z+ll)>cma) continue; |
| 8340 | pA=prime+V3(static_cast<double>(hh),static_cast<double>(kk),static_cast<double>(ll)); |
| 8341 | pB=dprime+V3(static_cast<double>(hh),static_cast<double>(kk),static_cast<double>(ll)); |
| 8342 | int bi=-1, ai = wearein.indexOf(pA); |
| 8343 | if (ai>-1) bi = wearein.indexOf(pB); |
| 8344 | if (fabs(0.0+ai-bi)!=1.0){ |
| 8345 | //printf("we are in %d %d %g\n",wearein.indexOf(pA),wearein.indexOf(pB),fabs(0.0+ai-bi)); |
| 8346 | //printf("a=>%g %g %g %d:%d%d%d\n",pA.x, pA.y, pA.z, n+1,5+hh,5+kk,5+ll); |
| 8347 | //printf("b=>%g %g %g %d:%d%d%d\n",pB.x, pB.y, pB.z, n+1,5+hh,5+kk,5+ll); |
| 8348 | wearein.append(pA); |
| 8349 | dc.append(c); |
| 8350 | wearein.append(pB); |
| 8351 | dc.append(c); |
| 8352 | } |
| 8353 | }//ll |
| 8354 | }//kk |
| 8355 | }//hh |
| 8356 | }//n++ |
| 8357 | } |
| 8358 | |
| 8359 | void Molecule::packInLimits(double ami, double ama, double bmi, double bma, double cmi, double cma){//!< Pack inside given limits (eg multiple unit cells) |
| 8360 | |
| 8361 | MyAtom newAtom; |
| 8362 | newAtom.hidden=0; |
| 8363 | V3 prime,floorD; |
| 8364 | double dawars=1000.0,dl; |
| 8365 | for (int n=0; n<cell.symmops.size();n++){ |
| 8366 | for (int i=0; i<asymm.size();i++){ |
| 8367 | //if ((asymm.at(i).an>-1)&&(asymm.at(i).molindex>0)) |
| 8368 | { |
| 8369 | prime=cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n); |
| 8370 | floorD=V3(floor(prime.x),floor(prime.y),floor(prime.z)); |
| 8371 | //prime=prime -floorD; |
| 8372 | dawars=1000.0; |
| 8373 | for (int g=0; g<showatoms.size();g++){ |
| 8374 | if ((asymm[i].an*showatoms[g].an<0)) continue; |
| 8375 | dl=fl(prime.x-showatoms[g].frac.x, prime.y-showatoms[g].frac.y, prime.z-showatoms[g].frac.z); |
| 8376 | dawars=(dl<dawars)?dl:dawars; |
| 8377 | } |
| 8378 | if (dawars<0.01) continue; |
| 8379 | for (int hh=-11; hh<12; hh++) |
| 8380 | for (int kk=-11; kk<12; kk++) |
| 8381 | for (int ll=-11; ll<12; ll++){ |
| 8382 | if ((prime.x+hh)<ami) continue; |
| 8383 | if ((prime.y+kk)<bmi) continue; |
| 8384 | if ((prime.z+ll)<cmi) continue; |
| 8385 | if ((prime.x+hh)>ama) continue; |
| 8386 | if ((prime.y+kk)>bma) continue; |
| 8387 | if ((prime.z+ll)>cma) continue; |
| 8388 | newAtom.part=asymm[i].part; |
| 8389 | newAtom.frac=prime+V3((double)hh,(double)kk,(double)ll); |
| 8390 | frac2kart(newAtom.frac,newAtom.pos); |
| 8391 | newAtom.an=asymm[i].an; |
| 8392 | newAtom.molindex=asymm[i].molindex; |
| 8393 | newAtom.peakHeight=asymm[i].peakHeight; |
| 8394 | newAtom.resiNr=asymm[i].resiNr; |
| 8395 | |
| 8396 | newAtom.sof=asymm[i].sof; |
| 8397 | newAtom.Label=asymm[i].Label; |
| 8398 | newAtom.isIso=asymm[i].isIso; |
| 8399 | newAtom.ufiso_org=asymm[i].ufiso_org; |
| 8400 | |
| 8401 | newAtom.sof_org=asymm[i].sof_org; |
| 8402 | newAtom.symmGroup=1; |
| 8403 | newAtom.sg=n; |
| 8404 | // printf("A%d %d %d %d %g %g %g\n", n, hh, kk, ll, floorD.x, floorD.y, floorD.z); |
| 8405 | newAtom.scod = genSymCode(n,hh,kk,ll);//genSymCode(n,(int)(hh+floorD.x),(int)(kk+floorD.x),(int)(ll+floorD.x));//genSymCode(n,hh,kk,ll); |
| 8406 | newAtom.auidx = i; |
| 8407 | if ((asymm[i].uc.m12==0.0)&&(asymm[i].uc.m23==0.0)&&(asymm[i].uc.m13==0.0)){ |
| 8408 | newAtom.uf.m11=newAtom.uc.m11=newAtom.uc.m22=newAtom.uc.m33=asymm[i].uf.m11; |
| 8409 | newAtom.uc.m12=newAtom.uc.m13=newAtom.uc.m23=newAtom.uc.m21=newAtom.uc.m31=newAtom.uc.m32=0.0; |
| 8410 | } |
| 8411 | else { |
| 8412 | Usym(asymm[i].uf,cell.symmops[n],newAtom.uf); |
| 8413 | Uf2Uo(newAtom.uf,newAtom.uc); |
| 8414 | } |
| 8415 | showatoms.append(newAtom); |
| 8416 | }//ll |
| 8417 | }//packable |
| 8418 | // else if ((asymm.at(i).an<0)&&(n==0)) showatoms.append(asymm[i]);//non atoms BCPs, Dummys, etc. |
| 8419 | }//i++ |
| 8420 | }//n++ |
| 8421 | showbonds.clear(); |
| 8422 | showbonds=connecting(showatoms); |
| 8423 | |
| 8424 | } |
| 8425 | |
| 8426 | CEnvironment Molecule::packInLimits(CEnvironment &au, double ami, double ama, double bmi, double bma, double cmi, double cma){//!< Pack inside given limits (eg multiple unit cells) |
| 8427 | MyAtom newAtom; |
| 8428 | CEnvironment sa; |
| 8429 | newAtom.hidden=0; |
| 8430 | V3 prime,floorD; |
| 8431 | //double dawars=1000.0,dl; |
| 8432 | for (int n=0; n<cell.symmops.size();n++){ |
| 8433 | for (int i=0; i<au.size();i++){ |
| 8434 | prime=cell.symmops.at(n) * au.at(i).frac + cell.trans.at(n); |
| 8435 | floorD=V3(floor(prime.x),floor(prime.y),floor(prime.z)); |
| 8436 | prime=prime -floorD; |
| 8437 | /*dawars=1000.0; |
| 8438 | for (int g=0; g<sa.size();g++){ |
| 8439 | dl=fl(prime.x-sa[g].frac.x, prime.y-sa[g].frac.y, prime.z-sa[g].frac.z); |
| 8440 | dawars=(dl<dawars)?dl:dawars; |
| 8441 | } |
| 8442 | if (dawars<0.01) continue;*/ |
| 8443 | for (int hh=-11; hh<12; hh++) |
| 8444 | for (int kk=-11; kk<12; kk++) |
| 8445 | for (int ll=-11; ll<12; ll++){ |
| 8446 | if ((prime.x+hh)<ami) continue; |
| 8447 | if ((prime.y+kk)<bmi) continue; |
| 8448 | if ((prime.z+ll)<cmi) continue; |
| 8449 | if ((prime.x+hh)>ama) continue; |
| 8450 | if ((prime.y+kk)>bma) continue; |
| 8451 | if ((prime.z+ll)>cma) continue; |
| 8452 | newAtom.frac=prime+V3((double)hh, (double)kk, (double)ll); |
| 8453 | frac2kart(newAtom.frac,newAtom.pos); |
| 8454 | newAtom.an=au[i].an; |
| 8455 | newAtom.peakHeight=au[i].peakHeight; |
| 8456 | newAtom.sof=au[i].sof; |
| 8457 | newAtom.Label=au[i].Label; |
| 8458 | newAtom.isIso=au[i].isIso; |
| 8459 | newAtom.ufiso_org=au[i].ufiso_org; |
| 8460 | newAtom.sof_org=au[i].sof_org; |
| 8461 | newAtom.symmGroup=1; |
| 8462 | newAtom.sg=n; |
| 8463 | newAtom.scod = genSymCode(n,hh,kk,ll); |
| 8464 | // printf("B%d %d %d %d %g %g %g\n", n, hh, kk, ll, floorD.x, floorD.y, floorD.z); |
| 8465 | //newAtom.scod = genSymCode(n,(int)(hh-floorD.x),(int)(kk-floorD.x),(int)(ll-floorD.x)); |
| 8466 | newAtom.auidx = i; |
| 8467 | Usym(au[i].uf,cell.symmops[n],newAtom.uf); |
| 8468 | sa.append(newAtom); |
| 8469 | }//ll |
| 8470 | }//i++ |
| 8471 | }//n++ |
| 8472 | return sa; |
| 8473 | } |
| 8474 | |
| 8475 | void Molecule::fillCell(){ |
| 8476 | /*! Fills the unit cell with molecules. |
| 8477 | * |
| 8478 | * */ |
| 8479 | // packInLimits(0.0, 1.0, 0.0, 1.0, 0.0, 1.0); |
| 8480 | // return; |
| 8481 | |
| 8482 | showatoms.clear(); |
| 8483 | for (int i=0; i<asymm.size();i++){ |
| 8484 | showatoms.append(asymm[i]); |
| 8485 | showatoms[i].molindex=asymm[i].molindex; |
| 8486 | } |
| 8487 | showbonds.clear(); |
| 8488 | QStringList brauchSymm; |
| 8489 | QString bs; |
| 8490 | brauchSymm.clear(); |
| 8491 | V3 prime,dp,D,floorD; |
| 8492 | for (int k =0; k<sdm.size();k++){ |
| 8493 | if (sdm.at(k).covalent){ |
| 8494 | if (asymm[sdm.at(k).a1].molindex<1) continue; |
| 8495 | for (int n=0;n<cell.symmops.size(); n++){ |
| 8496 | D=prime=cell.symmops.at(n) * asymm[sdm.at(k).a1].frac + cell.trans.at(n); |
| 8497 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8498 | if ((n==0)&&(V3(0,0,0)==floorD)) continue; |
| 8499 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm[sdm.at(k).a1].molindex); |
| 8500 | if (!brauchSymm.contains(bs)) { |
| 8501 | brauchSymm.append(bs); |
| 8502 | } |
| 8503 | } |
| 8504 | } |
| 8505 | } |
| 8506 | packer(brauchSymm); |
| 8507 | showbonds.clear(); |
| 8508 | showbonds=connecting(showatoms); |
| 8509 | } |
| 8510 | |
| 8511 | void Molecule::expandAll(){ |
| 8512 | /*! like Molecule.expandAt but this searches vor neighboring molecules arround every atom of the asymmetric unit and adds them to the showatoms list. |
| 8513 | */ |
| 8514 | //if (index>=showatoms.size()) return; |
| 8515 | // V3 expander= showatoms.at(index).frac; |
| 8516 | V3 prime,floorD,D; |
| 8517 | double SUCHRAD=3.2; |
| 8518 | for (int i=0; i<asymm.size();i++){//Rapunzel lass dein H herunter |
| 8519 | if (asymm.at(i).an==0) { |
| 8520 | SUCHRAD-=0.7; |
| 8521 | break; |
| 8522 | } |
| 8523 | } |
| 8524 | // printf(" Rapunzels H ist %f lang\n",SUCHRAD); |
| 8525 | QStringList brauchSymm; |
| 8526 | QString bs; |
| 8527 | brauchSymm.clear(); |
| 8528 | // brauchSymm+=(usedSymmetry); |
| 8529 | double dk; |
| 8530 | for (int j=0; j<asymm.size();j++){ |
| 8531 | if (asymm.at(j).an<0) continue; |
| 8532 | for (int n=0; n<cell.symmops.size();n++){ |
| 8533 | for (int i=0; i<asymm.size();i++){ |
| 8534 | if (asymm.at(i).an<0) continue; |
| 8535 | prime=cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n); |
| 8536 | D=prime - asymm.at(j).frac + V3(0.5,0.5,0.5) ; |
| 8537 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8538 | if ((n==0)&&(floorD==V3(0,0,0))) {continue;} |
| 8539 | D=D - floorD - V3(0.5,0.5,0.5); |
| 8540 | dk=fl(D.x,D.y,D.z); |
| 8541 | if (dk<SUCHRAD){ |
| 8542 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm.at(i).molindex); |
| 8543 | if ((!brauchSymm.contains(bs))&&(asymm.at(i).molindex>0)) { |
| 8544 | brauchSymm.append(bs); |
| 8545 | } |
| 8546 | } |
| 8547 | } |
| 8548 | } |
| 8549 | } |
| 8550 | showatoms.clear(); |
| 8551 | for (int i=0; i<asymm.size();i++){ |
| 8552 | showatoms.append(asymm[i]); |
| 8553 | showatoms[i].molindex=asymm[i].molindex; |
| 8554 | } |
| 8555 | packer(brauchSymm); |
| 8556 | showbonds.clear(); |
| 8557 | showbonds=connecting(showatoms); |
| 8558 | } |
| 8559 | |
| 8560 | void Molecule::complete(){ |
| 8561 | /*! If the current visible atoms are covalently bound to symmetry equivalents the latter are added to the showatoms list. |
| 8562 | * */ |
| 8563 | //if (index>=showatoms.size()) return; |
| 8564 | // V3 expander= showatoms.at(index).frac; |
| 8565 | V3 prime,floorD,D; |
| 8566 | QStringList brauchSymm; |
| 8567 | QString bs; |
| 8568 | // brauchSymm.clear(); |
| 8569 | if (usedSymmetry.isEmpty()){ |
| 8570 | QList<int> scods; |
| 8571 | for (int i=0; i<showatoms.size(); i++){ |
| 8572 | int scs = showatoms.at(i).scod; |
| 8573 | if (!scods.contains(scs)) { |
| 8574 | scods.append(scs); |
| 8575 | int ss,hh,kk,ll; |
| 8576 | ll = scs%10; |
| 8577 | kk = (scs-ll)%100/10; |
| 8578 | hh = (scs-ll-10*kk)%1000/100; |
| 8579 | ss = scs/1000; |
| 8580 | //printf("scod = %d %d %d %d %d : %d\n",scs,ss,hh,kk,ll, showatoms.at(i).molindex ); |
| 8581 | usedSymmetry.append(QString("%1_%2%3%4:%5,") |
| 8582 | .arg(ss+1) |
| 8583 | .arg(hh) |
| 8584 | .arg(kk) |
| 8585 | .arg(ll) |
| 8586 | .arg(showatoms.at(i).molindex)); |
| 8587 | } |
| 8588 | } |
| 8589 | } |
| 8590 | brauchSymm+=(usedSymmetry); |
| 8591 | double dk; |
| 8592 | int s,h,k,l,symmgroup; |
| 8593 | V3 pos0; |
| 8594 | for (int sy=0; sy<usedSymmetry.size(); sy++){ |
| 8595 | sscanf(usedSymmetry.at(sy).toLatin1(),"%d_%1d%1d%1d:%d",&s,&h,&k,&l,&symmgroup); |
| 8596 | h-=5; |
| 8597 | k-=5; |
| 8598 | l-=5; |
| 8599 | s--; |
| 8600 | for (int j=0; j<asymm.size();j++){ |
| 8601 | if (asymm.at(j).an<0) continue; |
| 8602 | for (int n=0; n<cell.symmops.size();n++){ |
| 8603 | for (int i=0; i<asymm.size();i++){ |
| 8604 | if (asymm.at(i).an<1) continue; |
| 8605 | if (asymm[i].molindex!=symmgroup) continue; |
| 8606 | pos0=cell.symmops.at(s)*asymm.at(i).frac+cell.trans.at(s)+V3(h,k,l); |
| 8607 | prime=cell.symmops.at(n) * asymm.at(j).frac + cell.trans.at(n); |
| 8608 | D=prime - pos0 + V3(0.5,0.5,0.5) ; |
| 8609 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8610 | if ((n==0)&&(floorD==V3(0,0,0))) {continue;} |
| 8611 | D=D - floorD - V3(0.5,0.5,0.5); |
| 8612 | dk=fl(D.x,D.y,D.z); |
| 8613 | double dddd=qMin(1.7,(Kovalenz_Radien[asymm.at(i).an]+ Kovalenz_Radien[asymm.at(j).an])*0.012); |
| 8614 | if (dk<dddd){ |
| 8615 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm.at(i).molindex); |
| 8616 | if ((!brauchSymm.contains(bs))&&(asymm.at(i).molindex>0)) { |
| 8617 | brauchSymm.append(bs); |
| 8618 | } |
| 8619 | } |
| 8620 | } |
| 8621 | } |
| 8622 | } |
| 8623 | } |
| 8624 | showatoms.clear(); |
| 8625 | for (int i=0; i<asymm.size();i++){ |
| 8626 | showatoms.append(asymm[i]); |
| 8627 | showatoms[i].molindex=asymm[i].molindex; |
| 8628 | } |
| 8629 | packer(brauchSymm); |
| 8630 | showbonds.clear(); |
| 8631 | showbonds=connecting(showatoms); |
| 8632 | } |
| 8633 | |
| 8634 | void Molecule::expandAt(int index){ |
| 8635 | /*! searches SUCHRAD=3.2 A around the given atom for symmetry equivalent molecules and adds them to the showatoms list. |
| 8636 | * if Hydrogens are inside the structure the SUCHRAD is reduced about 0.7 A. |
| 8637 | * @param index index of the specified atom from the current showatoms list. |
| 8638 | */ |
| 8639 | if (index>=showatoms.size()) return; |
| 8640 | V3 expander= showatoms.at(index).frac; |
| 8641 | V3 prime,floorD,D; |
| 8642 | double SUCHRAD=3.2; |
| 8643 | for (int i=0; i<asymm.size();i++){//Rapunzel lass dein H herunter |
| 8644 | if (asymm.at(i).an==0) {//haha if there are H atoms th search radius is reduced by 0.7 A |
| 8645 | SUCHRAD-=0.7; |
| 8646 | break; |
| 8647 | } |
| 8648 | } |
| 8649 | //printf(" Rapunzels H ist %f lang\n",SUCHRAD); |
| 8650 | QStringList brauchSymm; |
| 8651 | QString bs; |
| 8652 | brauchSymm.clear(); |
| 8653 | brauchSymm+=(usedSymmetry); |
| 8654 | double dk; |
| 8655 | for (int n=0; n<cell.symmops.size();n++){ |
| 8656 | for (int i=0; i<asymm.size();i++){ |
| 8657 | prime=cell.symmops.at(n) * asymm.at(i).frac + cell.trans.at(n); |
| 8658 | D=prime - expander + V3(0.5,0.5,0.5) ; |
| 8659 | floorD=V3(floor(D.x),floor(D.y),floor(D.z)); |
| 8660 | if ((n==0)&&(floorD==V3(0,0,0))) {continue;} |
| 8661 | D=D - floorD - V3(0.5,0.5,0.5); |
| 8662 | dk=fl(D.x,D.y,D.z); |
| 8663 | if (dk<SUCHRAD){ |
| 8664 | bs=QString("%1_%2%3%4:%5,").arg(n+1).arg(5-(int)floorD.x).arg(5-(int)floorD.y).arg(5-(int)floorD.z).arg(asymm.at(i).molindex); |
| 8665 | if ((!brauchSymm.contains(bs))&&(asymm.at(i).molindex>0)) { |
| 8666 | brauchSymm.append(bs); |
| 8667 | } |
| 8668 | } |
| 8669 | } |
| 8670 | } |
| 8671 | showatoms.clear(); |
| 8672 | for (int i=0; i<asymm.size();i++){ |
| 8673 | showatoms.append(asymm[i]); |
| 8674 | showatoms[i].molindex=asymm[i].molindex; |
| 8675 | } |
| 8676 | packer(brauchSymm); |
| 8677 | showbonds.clear(); |
| 8678 | showbonds=connecting(showatoms); |
| 8679 | } |
| 8680 | |
| 8681 | void Molecule::packer(QStringList brauchSymm){ |
| 8682 | /*! Packs symmetry equivalent atoms according to the given list of internal symmetry codes and adds them to the showatoms list |
| 8683 | * HumanSymmetry is feeeded with a human readalble list of used symmetry. |
| 8684 | * @param brauchSymm list of internal symmetry codes. |
| 8685 | */ |
| 8686 | // printf("MOEBEL? packer\n"); |
| 8687 | usedSymmetry.clear(); |
| 8688 | usedSymmetry+=(brauchSymm); |
| 8689 | MyAtom newAtom; |
| 8690 | newAtom.hidden=0; |
| 8691 | int s,h,k,l,gibscho=0,symmgroup; |
| 8692 | // balken->setMinimum(0); |
| 8693 | // balken->setMaximum(brauchSymm.size()); |
| 8694 | // balken->show(); |
| 8695 | HumanSymmetry=QString("Used Symmetry:<br>%1").arg(symmcode2human(brauchSymm)); |
| 8696 | QString pre,suff; |
| 8697 | for (int j=0;j<brauchSymm.size();j++){ |
| 8698 | // balken->setValue(j); |
| 8699 | |
| 8700 | sscanf(brauchSymm.at(j).toLatin1(),"%d_%1d%1d%1d:%d",&s,&h,&k,&l,&symmgroup); |
| 8701 | //printf("BS:!%s! %d h%d k%d l%d sg%d\n",brauchSymm.at(j).toStdString().c_str(),s,h,k,l,symmgroup); |
| 8702 | h-=5; |
| 8703 | k-=5; |
| 8704 | l-=5; |
| 8705 | s--; |
| 8706 | for (int i=0;i<asymm.size();i++){ |
| 8707 | // if (asymm[i].molindex) printf ("doch %d %d %s\n",asymm[i].an,asymm[i].molindex,asymm.at(i).Label.toStdString().c_str()); |
| 8708 | if ((asymm[i].molindex==symmgroup)&&(asymm[i].an>-1)){ |
| 8709 | newAtom.frac=cell.symmops.at(s)*asymm[i].frac+cell.trans.at(s)+V3(h,k,l); |
| 8710 | newAtom.part=asymm[i].part; |
| 8711 | frac2kart(newAtom.frac,newAtom.pos); |
| 8712 | newAtom.Label=QString("%1%2%3") |
| 8713 | .arg(asymm.at(i).Label) |
| 8714 | .arg(QString::fromUtf8("»")) |
| 8715 | .arg(j+1);// */ |
| 8716 | newAtom.an=asymm[i].an; |
| 8717 | newAtom.symmGroup=j+1; |
| 8718 | newAtom.sg=s; |
| 8719 | newAtom.scod = genSymCode(s,h,k,l); |
| 8720 | newAtom.auidx = i; |
| 8721 | //printf("scod=%d %d %d %d %d\n",newAtom.scod, s,h+5,k+5,l+5); |
| 8722 | newAtom.sof_org=asymm[i].sof_org; |
| 8723 | newAtom.isIso=asymm[i].isIso; |
| 8724 | newAtom.ufiso_org=asymm[i].ufiso_org; |
| 8725 | newAtom.molindex=asymm[i].molindex; |
| 8726 | newAtom.ResiClass=asymm[i].ResiClass; |
| 8727 | newAtom.resiNr=asymm[i].resiNr; |
| 8728 | if ((asymm[i].uc.m12==0.0 )&&(asymm[i].uc.m23==0.0)&&(asymm[i].uc.m13==0.0)){ |
| 8729 | newAtom.uc.m11=newAtom.uc.m22=newAtom.uc.m33=asymm[i].uf.m11; |
| 8730 | newAtom.uc.m12=newAtom.uc.m13=newAtom.uc.m23=newAtom.uc.m21=newAtom.uc.m31=newAtom.uc.m32=0.0; |
| 8731 | newAtom.uf=asymm[i].uf; |
| 8732 | } |
| 8733 | else { |
| 8734 | Usym(asymm[i].uf,cell.symmops[s],newAtom.uf); |
| 8735 | Uf2Uo(newAtom.uf,newAtom.uc); |
| 8736 | } |
| 8737 | gibscho=0; |
| 8738 | if (newAtom.part>=0){ |
| 8739 | for(int gbt=0;gbt<showatoms.size();gbt++){ |
| 8740 | if (showatoms.at(gbt).an<0) continue; |
| 8741 | if (showatoms.at(gbt).part!=newAtom.part)continue; |
| 8742 | if (fl(newAtom.frac.x-showatoms[gbt].frac.x, |
| 8743 | newAtom.frac.y-showatoms[gbt].frac.y, |
| 8744 | newAtom.frac.z-showatoms[gbt].frac.z)<0.2) gibscho=1; |
| 8745 | } |
| 8746 | } |
| 8747 | if (!gibscho) { |
| 8748 | showatoms.append(newAtom); |
| 8749 | } |
| 8750 | }// /* |
| 8751 | else if ((growQPeak)&&(asymm[i].an==-1)&&(asymm[i].molindex==symmgroup)){ |
| 8752 | newAtom.frac=cell.symmops.at(s)*asymm[i].frac+cell.trans.at(s)+V3(h,k,l); |
| 8753 | newAtom.part=asymm[i].part; |
| 8754 | newAtom.isIso=asymm[i].isIso; |
| 8755 | frac2kart(newAtom.frac,newAtom.pos); |
| 8756 | newAtom.Label=asymm.at(i).Label; |
| 8757 | newAtom.an=asymm[i].an; |
| 8758 | newAtom.symmGroup=j+1; |
| 8759 | newAtom.sg=s; |
| 8760 | newAtom.scod = genSymCode(s,h,k,l); |
| 8761 | newAtom.auidx = i; |
| 8762 | newAtom.sof_org=asymm[i].sof_org; |
| 8763 | newAtom.sof=asymm[i].sof; |
| 8764 | newAtom.ufiso_org=asymm[i].ufiso_org; |
| 8765 | newAtom.molindex=asymm[i].molindex; |
| 8766 | newAtom.ResiClass=asymm[i].ResiClass; |
| 8767 | newAtom.resiNr=asymm[i].resiNr; |
| 8768 | newAtom.peakHeight=asymm[i].peakHeight; |
| 8769 | newAtom.orginalLine= asymm[i].orginalLine; |
| 8770 | gibscho=0; |
| 8771 | if (newAtom.part>=0){ |
| 8772 | for(int gbt=0;gbt<showatoms.size();gbt++){ |
| 8773 | if (fl(newAtom.frac.x-showatoms[gbt].frac.x, |
| 8774 | newAtom.frac.y-showatoms[gbt].frac.y, |
| 8775 | newAtom.frac.z-showatoms[gbt].frac.z)<0.1) gibscho=1; |
| 8776 | } |
| 8777 | } |
| 8778 | if (!gibscho) { |
| 8779 | showatoms.append(newAtom); |
| 8780 | } |
| 8781 | }// */ |
| 8782 | } |
| 8783 | } |
| 8784 | //statusBar()->showMessage(tr("Neighbor search is finished")); |
| 8785 | } |
| 8786 | |
| 8787 | bool Molecule::checkExtensions(){ |
| 8788 | bool gut=true; |
| 8789 | int glmajor=0,glminor=0; |
| 8790 | float vv=0.0; |
| 8791 | |
| 8792 | const char *extensionString =(const char *) glGetString(GL_EXTENSIONS); |
| 8793 | //printf("%s \n",extensionString); |
| 8794 | const char *verstring=(char*)glGetString(GL_VERSION); |
| 8795 | if ((verstring==NULL)||(sscanf(verstring,"%d.%d",&glmajor,&glminor)!=2)) glminor=glmajor=0; |
| 8796 | //printf("!!%s \n",verstring); |
| 8797 | if (glmajor<2) return false; |
| 8798 | verstring=(char*)glGetString(GL_SHADING_LANGUAGE_VERSION); |
| 8799 | if ((verstring==NULL)||(sscanf(verstring,"%f",&vv)!=1)) vv=0.0; |
| 8800 | //qDebug()<<vv<<glminor<<glmajor<<verstring; |
| 8801 | if (vv<1.2) return false; |
| 8802 | /* |
| 8803 | printf("%d\n",__LINE__); |
| 8804 | QString pth=QDir::homePath()+"/GL-Extensions.txt"; |
| 8805 | FILE *extf=fopen(pth.toStdString().c_str(),"wt"); |
| 8806 | if (extf) { |
| 8807 | fwrite(extensionString,sizeof(char),strlen(extensionString)+1,extf); |
| 8808 | fclose(extf); |
| 8809 | } |
| 8810 | printf("%d\n",__LINE__); |
| 8811 | */ |
| 8812 | if (NULL==strstr(extensionString, "GL_ARB_vertex_shader"))gut=false; |
| 8813 | if (NULL==strstr(extensionString, "GL_ARB_fragment_shader")) gut=false; |
| 8814 | //printf("extensions are ok %d\n",gut); |
| 8815 | return gut; |
| 8816 | } |
| 8817 | |
| 8818 | int Molecule::installShader(){ |
| 8819 | //printf("%p ? installShader()\n",g_Program); |
| 8820 | if (!checkExtensions()) { |
| 8821 | //printf("insallShader::missing Extensions!\n"); |
| 8822 | return 0; |
| 8823 | } |
| 8824 | QFile logshad(QDir::homePath()+"/shaderlog.txt"); |
| 8825 | bool canwrite = logshad.open(QFile::Append|QFile::Text); |
| 8826 | if (canwrite)logshad.write(QDateTime::currentDateTime().toString().toLatin1()); |
| 8827 | |
| 8828 | // /* create program object and attach shaders * / |
| 8829 | |
| 8830 | g_Program->addShaderFromSourceFile(QOpenGLShader::Vertex,":/shaders/old.vert.glsl"); |
| 8831 | if (canwrite) logshad.write(g_Program->log().toLatin1()); |
| 8832 | if (canwrite) logshad.write(g_Program->shaders().last()->log().toLatin1()); |
| 8833 | |
| 8834 | g_Program->addShaderFromSourceFile(QOpenGLShader::Fragment,":/shaders/old.frag.glsl"); |
| 8835 | if (canwrite) logshad.write(g_Program->log().toLatin1()); |
| 8836 | if (canwrite) logshad.write(g_Program->shaders().last()->log().toLatin1()); |
| 8837 | g_Program->link(); |
| 8838 | if (canwrite) logshad.write(g_Program->log().toLatin1()); |
| 8839 | if (canwrite) logshad.write(g_Program->log().toLatin1()); |
| 8840 | logshad.close(); |
| 8841 | g_Program->bind(); |
| 8842 | wallH = g_Program->uniformLocation( "wall"); |
| 8843 | ringH = g_Program->uniformLocation( "ring"); |
| 8844 | ballH = g_Program->uniformLocation( "ball"); |
| 8845 | openH = g_Program->uniformLocation( "open"); |
| 8846 | adpsH = g_Program->uniformLocation( "eli"); |
| 8847 | fogH = g_Program->uniformLocation( "fog"); |
| 8848 | fograngeH = g_Program->uniformLocation( "fogrange"); |
| 8849 | bgH = g_Program->uniformLocation("fogColor"); |
| 8850 | whiteringH = g_Program->uniformLocation( "whitering"); |
| 8851 | lichtH = g_Program->uniformLocation( "lighting"); |
| 8852 | lodH = g_Program->uniformLocation( "LOD"); |
| 8853 | shaders_work=true; |
| 8854 | g_Program->release(); |
| 8855 | return g_Program->programId(); |
| 8856 | } |
| 8857 | |
| 8858 | Matrix Molecule::b2u(const Matrix u){ |
| 8859 | const double twopi2=2.0*M_PI*M_PI; |
| 8860 | Matrix erg; |
| 8861 | /* |
| 8862 | * 99 Atoms(ii)%Bij(1)=2*Pisqr*Atoms(ii)%Uij(1)*(rcell(1)*rcell(1)) |
| 8863 | * 100 Atoms(ii)%Bij(2)=2*Pisqr*Atoms(ii)%Uij(2)*(rcell(2)*rcell(2)) |
| 8864 | * 101 Atoms(ii)%Bij(3)=2*Pisqr*Atoms(ii)%Uij(3)*(rcell(3)*rcell(3)) |
| 8865 | * 102 Atoms(ii)%Bij(4)=2*Pisqr*Atoms(ii)%Uij(4)*(rcell(1)*rcell(2)) |
| 8866 | * 103 Atoms(ii)%Bij(5)=2*Pisqr*Atoms(ii)%Uij(5)*(rcell(1)*rcell(3)) |
| 8867 | * 104 Atoms(ii)%Bij(6)=2*Pisqr*Atoms(ii)%Uij(6)*(rcell(2)*rcell(3)) |
| 8868 | * */ |
| 8869 | erg.m11 = u.m11 /( twopi2 * cell.as*cell.as); |
| 8870 | erg.m22 = u.m22 /( twopi2 * cell.bs*cell.bs); |
| 8871 | erg.m33 = u.m33 /( twopi2 * cell.cs*cell.cs); |
| 8872 | erg.m12 = erg.m21 =u.m12 /( twopi2 * cell.as*cell.bs); |
| 8873 | erg.m13 = erg.m31 =u.m13 /( twopi2 * cell.as*cell.cs); |
| 8874 | erg.m23 = erg.m32 =u.m23 /( twopi2 * cell.bs*cell.cs); |
| 8875 | |
| 8876 | // printf("Uij: %9.6f%9.6f%9.6f%9.6f%9.6f%9.6f\n",u.m11,u.m22,u.m33,u.m12,u.m13,u.m23); |
| 8877 | // printf("Bij: %9.6f%9.6f%9.6f%9.6f%9.6f%9.6f\n",erg.m11,erg.m22,erg.m33,erg.m12,erg.m13,erg.m23); |
| 8878 | //printf("erg:\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n",erg.m11,erg.m12,erg.m13,erg.m12,erg.m22,erg.m23,erg.m13,erg.m23,erg.m33); |
| 8879 | //printf("erg2:\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n",erg2.m11,erg2.m12,erg2.m13,erg2.m12,erg2.m22,erg2.m23,erg2.m13,erg2.m23,erg2.m33); |
| 8880 | return erg; |
| 8881 | |
| 8882 | } |
| 8883 | |
| 8884 | Matrix Molecule::u2b(const Matrix u){ |
| 8885 | const double twopi2=2.0*M_PI*M_PI; |
| 8886 | Matrix erg; |
| 8887 | /* |
| 8888 | * 99 Atoms(ii)%Bij(1)=2*Pisqr*Atoms(ii)%Uij(1)*(rcell(1)*rcell(1)) |
| 8889 | * 100 Atoms(ii)%Bij(2)=2*Pisqr*Atoms(ii)%Uij(2)*(rcell(2)*rcell(2)) |
| 8890 | * 101 Atoms(ii)%Bij(3)=2*Pisqr*Atoms(ii)%Uij(3)*(rcell(3)*rcell(3)) |
| 8891 | * 102 Atoms(ii)%Bij(4)=2*Pisqr*Atoms(ii)%Uij(4)*(rcell(1)*rcell(2)) |
| 8892 | * 103 Atoms(ii)%Bij(5)=2*Pisqr*Atoms(ii)%Uij(5)*(rcell(1)*rcell(3)) |
| 8893 | * 104 Atoms(ii)%Bij(6)=2*Pisqr*Atoms(ii)%Uij(6)*(rcell(2)*rcell(3)) |
| 8894 | * */ |
| 8895 | erg.m11 = u.m11 * twopi2 * cell.as*cell.as; |
| 8896 | erg.m22 = u.m22 * twopi2 * cell.bs*cell.bs; |
| 8897 | erg.m33 = u.m33 * twopi2 * cell.cs*cell.cs; |
| 8898 | erg.m12 = erg.m21 =u.m12 * twopi2 * cell.as*cell.bs; |
| 8899 | erg.m13 = erg.m31 =u.m13 * twopi2 * cell.as*cell.cs; |
| 8900 | erg.m23 = erg.m32 =u.m23 * twopi2 * cell.bs*cell.cs; |
| 8901 | |
| 8902 | // printf("Uij: %9.6f%9.6f%9.6f%9.6f%9.6f%9.6f\n",u.m11,u.m22,u.m33,u.m12,u.m13,u.m23); |
| 8903 | // printf("Bij: %9.6f%9.6f%9.6f%9.6f%9.6f%9.6f\n",erg.m11,erg.m22,erg.m33,erg.m12,erg.m13,erg.m23); |
| 8904 | //printf("erg:\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n",erg.m11,erg.m12,erg.m13,erg.m12,erg.m22,erg.m23,erg.m13,erg.m23,erg.m33); |
| 8905 | //printf("erg2:\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n%9.5f %9.5f %9.5f\n",erg2.m11,erg2.m12,erg2.m13,erg2.m12,erg2.m22,erg2.m23,erg2.m13,erg2.m23,erg2.m33); |
| 8906 | return erg; |
| 8907 | |
| 8908 | } |
| 8909 | |
| 8910 | int Molecule::genSymCode(int s, int h, int k, int l){//!< creates a platon style symmetry code as an integer (s555) |
| 8911 | return s*1000+(h+5)*100+(k+5)*10+(l+5); |
| 8912 | } |
| 8913 | |
| 8914 | V3 Molecule::applySymCode(const V3 &frac, int scode){;//!< applies a platon style symmetry code as an integer (s555) |
| 8915 | int s, h, k, l; |
| 8916 | s = scode / 1000; |
| 8917 | if (s >= cell.symmops.size())return frac;// silent error handling |
| 8918 | l = (scode % 10) - 5 ; |
| 8919 | k = ((scode % 100) / 10) - 5; |
| 8920 | h = ((scode % 1000) / 100) - 5; |
| 8921 | return cell.symmops.at(s) * frac + cell.trans.at(s) + V3(h, k, l); |
| 8922 | } |
| 8923 | |
| 8924 | |
| 8925 | int Molecule::rankMySymmOp(Matrix m, V3 t){ |
| 8926 | V3 tv(0.27353,0.03537,0.15373); |
| 8927 | V3 a=V3(0,0,0),b=tv; |
| 8928 | int rank=0; |
| 8929 | while (!(a==tv)){ |
| 8930 | a=m*b+t; |
| 8931 | //b=a; |
| 8932 | //V3 flo=V3(floor(fabs(a.x)),floor(fabs(a.y)),floor(fabs(a.z)));//V3(floor(a.x+0.5), floor(a.y+0.5), floor(a.z+0.5)); |
| 8933 | //b=b-flo;//+V3(0.5,0.5,0.5); |
| 8934 | |
| 8935 | a.x=(a.x>1.0)?a.x-1:(a.x<0.000001)?a.x+1:a.x; |
| 8936 | a.y=(a.y>1.0)?a.y-1:(a.y<0.000001)?a.y+1:a.y; |
| 8937 | a.z=(a.z>1.0)?a.z-1:(a.z<0.000001)?a.z+1:a.z; |
| 8938 | /*printf("%g %g %g | %g %g %g | %g %g %g {} %g %g\n", |
| 8939 | b.x,b.y,b.z, |
| 8940 | a.x,a.y,a.z, |
| 8941 | flo.x,flo.y,flo.z,Distance(a,tv),Distance(b,tv));// */ |
| 8942 | b=a; |
| 8943 | rank++; |
| 8944 | if (rank>=16) break; |
| 8945 | } |
| 8946 | return rank; |
| 8947 | } |
| 8948 | |
| 8949 | V3 Molecule::intersectPoint(V3 rayVector, V3 rayPoint, V3 planeNormal, V3 planePoint,bool &ok) { |
| 8950 | V3 diff = rayPoint - planePoint; |
| 8951 | ok=true; |
| 8952 | double prod1 = diff * planeNormal; |
| 8953 | double prod2 = (rayVector * planeNormal)/(sqrt(Norm(rayVector))*sqrt(Norm(planeNormal)));//cosine |
| 8954 | //printf("diff %g %g %g A%g B%g\n",diff.x,diff.y,diff.z,prod1,prod2); |
| 8955 | if (fabs(prod2)<0.000001) {ok=false;return V3(0,0,0);} |
| 8956 | double p3 = prod1 / prod2; |
| 8957 | V3 erg =rayPoint - (Normalize(rayVector) * p3); |
| 8958 | ok= (erg.x>=-0.001)&&(erg.x<=1.001)&&(erg.y>=-0.001)&&(erg.y<=1.001)&&(erg.z>=-0.001)&&(erg.z<=1.001); |
| 8959 | erg.x=(erg.x<0.0)?0.0:erg.x; |
| 8960 | erg.y=(erg.y<0.0)?0.0:erg.y; |
| 8961 | erg.z=(erg.z<0.0)?0.0:erg.z; |
| 8962 | //if (!ok) printf("ich bin nicht ok (%g %g %g)\n",erg.x,erg.y,erg.z); |
| 8963 | //else printf("ich bin ok (%g %g %g)\n",erg.x,erg.y,erg.z); |
| 8964 | //printf("ich bin null = %g p1 %g p2 %g p3 %g (%g %g %g)\n",(erg-planePoint)* planeNormal,prod1,prod2,p3,erg.x,erg.y,erg.z); |
| 8965 | return erg; |
| 8966 | } |
| 8967 | |
| 8968 | void Molecule:: specialPts(const Matrix &mat, const V3 &trans, QList<V3> &points){ |
| 8969 | int nmax=9; |
| 8970 | double stp=1.0/(nmax-1.0); |
| 8971 | //double vstp=1.0/(3*nmax); |
| 8972 | int fold=3; |
| 8973 | V3 axis; |
| 8974 | QString sname=nameSymmOp(mat,fold,axis); |
| 8975 | axis=Normalize(axis); |
| 8976 | //Matrix mat_=mat; |
| 8977 | //if (fold<-2) mat_=mat*Matrix(-1,0,0,0,-1,0,0,0,-1); |
| 8978 | int end=0; |
| 8979 | V3 pts[1331]; |
| 8980 | V3 pp[12],p; |
| 8981 | for (int h=0; h<nmax; h++){ |
| 8982 | for (int k=0; k<nmax; k++){ |
| 8983 | for (int l=0; l<nmax; l++){ |
| 8984 | pts[end] = V3(stp*h, stp*k, stp*l); |
| 8985 | //val[i] = vstp*l; |
| 8986 | end++; |
| 8987 | } |
| 8988 | } |
| 8989 | } |
| 8990 | for (int i=0; i<end; i++){ |
| 8991 | p=pts[i]; |
| 8992 | pp[0] = mat * p + trans; |
| 8993 | pp[0].x = pp[0].x - floor(pp[0].x+0.00001); |
| 8994 | pp[0].y = pp[0].y - floor(pp[0].y+0.00001); |
| 8995 | pp[0].z = pp[0].z - floor(pp[0].z+0.00001); |
| 8996 | double screwy = (fold==-2)?0.0:fabs((pp[0]-p)*(axis)); |
| 8997 | screwy = (fold==-1)?0.0:screwy; |
| 8998 | V3 screw = screwy*axis; |
| 8999 | //printf(" screw %g %g %g %g\n",screwy,screw.x,screw.y,screw.z); |
| 9000 | V3 glide= V3(0,0,0); |
| 9001 | if (fold==-2){ |
| 9002 | //V3 p1= mat * p + trans; |
| 9003 | V3 pg=(pp[0]+p)*0.5; |
| 9004 | pg.x = pg.x - floor(pg.x+0.00001); |
| 9005 | pg.y = pg.y - floor(pg.y+0.00001); |
| 9006 | pg.z = pg.z - floor(pg.z+0.00001); |
| 9007 | glide=findGlide(axis,pg,mat,trans); |
| 9008 | //V3(0.0, 0, 0.5); |
| 9009 | } |
| 9010 | int afld=rankMySymmOp(mat,trans); |
| 9011 | for (int j=0; j<afld; j++){ |
| 9012 | pp[j] = mat * p + trans - screw - glide; |
| 9013 | pp[j].x = pp[j].x - floor(pp[j].x+0.00001); |
| 9014 | pp[j].y = pp[j].y - floor(pp[j].y+0.00001); |
| 9015 | pp[j].z = pp[j].z - floor(pp[j].z+0.00001); |
| 9016 | p=pp[j]; |
| 9017 | } |
| 9018 | p=V3(0,0,0); |
| 9019 | for (int j=0; j<afld; j++)p+=pp[j]; |
| 9020 | p*=1.0/afld; |
| 9021 | p.x = p.x - floor(p.x+0.000001); |
| 9022 | p.y = p.y - floor(p.y+0.000001); |
| 9023 | p.z = p.z - floor(p.z+0.000001); |
| 9024 | V3 test = mat * p + trans - screw - glide; |
| 9025 | test.x = test.x - floor(test.x+0.000001); |
| 9026 | test.y = test.y - floor(test.y+0.000001); |
| 9027 | test.z = test.z - floor(test.z+0.000001); |
| 9028 | V3 test2 = mat * p + trans - screw + glide; |
| 9029 | test2.x = test2.x - floor(test2.x+0.000001); |
| 9030 | test2.y = test2.y - floor(test2.y+0.000001); |
| 9031 | test2.z = test2.z - floor(test2.z+0.000001); |
| 9032 | double d= Distance(test, p); |
| 9033 | double d2= Distance(test2, p); |
| 9034 | if ((d<0.01)||(fabs(d-1)<0.01)||(d2<0.01)||(fabs(d2-1)<0.01)){ |
| 9035 | if (!points.contains(p)) points.append(p); |
| 9036 | if (p.x<0.0001) {p+=V3(1,0,0); if (!points.contains(p)) points.append(p);} |
| 9037 | if (p.y<0.0001) {p+=V3(0,1,0); if (!points.contains(p)) points.append(p);} |
| 9038 | if (p.z<0.0001) {p+=V3(0,0,1); if (!points.contains(p)) points.append(p);} |
| 9039 | //}else{ |
| 9040 | /* |
| 9041 | printf("C%-3d 1 %8.6f %8.6f %8.6f 11.0000 0.05 !%f!%g %g\n"// \nREM %g %g %g =>%g\n %g %g %g\n %g %g %g\n %g %g %g\n %g %g %g\n" |
| 9042 | //REM %g %g %g %g %g %g %g %g %g %g %g %g %g\n" |
| 9043 | , i+1, p.x, p.y, p.z, (screwy>0.1)?1.0:0.0,d2,d |
| 9044 | ); // */ |
| 9045 | } |
| 9046 | } |
| 9047 | |
| 9048 | } |
| 9049 | |
| 9050 | V3 Molecule::findGlide(V3 normal, V3 test, int n){ |
| 9051 | Matrix mat=cell.symmops.at(n); |
| 9052 | V3 trans=cell.trans.at(n); |
| 9053 | V3 axis; |
| 9054 | return findGlide(normal,test,mat,trans); |
| 9055 | } |
| 9056 | |
| 9057 | V3 Molecule::findGlide(V3 normal, V3 test, Matrix mat, V3 trans){ |
| 9058 | V3 glide=V3(-6,-6,-6); |
| 9059 | V3 p=V3(0,0,0); |
| 9060 | QList<V3> tg; |
| 9061 | tg |
| 9062 | <<V3(0.5,0,0) |
| 9063 | <<V3(0,0.5,0) |
| 9064 | <<V3(0,0,0.5) |
| 9065 | <<V3(0.0,0.5,0.5) |
| 9066 | <<V3(0.5,0,0.5) |
| 9067 | <<V3(0.5,0.5,0) |
| 9068 | <<V3(0,0.25,0.25) |
| 9069 | <<V3(0.25,0.25,0) |
| 9070 | <<V3(0.25,0,0.25) |
| 9071 | <<V3(0,0,0); |
| 9072 | p = mat * test + trans; |
| 9073 | /*p.x = p.x - floor(p.x+0.000001); |
| 9074 | p.y = p.y - floor(p.y+0.000001); |
| 9075 | p.z = p.z - floor(p.z+0.000001);*/ |
| 9076 | double td=100.0; |
| 9077 | for (int i=0; i<tg.size(); i++){ |
| 9078 | for (int hh=-1; hh<2; hh++){ |
| 9079 | for (int kk=-1; kk<2; kk++){ |
| 9080 | for (int ll=-1; ll<2; ll++){ |
| 9081 | V3 t=V3(hh,kk,ll)+tg.at(i); |
| 9082 | //if ((t.x>1.1)||(t.y>1.1)||(t.z>1.1)||(t.x<-1.1)||(t.y<-1.1)||(t.z<-1.1)) continue; |
| 9083 | V3 v=p-t; |
| 9084 | v.x = v.x - floor(v.x+0.000001); |
| 9085 | v.y = v.y - floor(v.y+0.000001); |
| 9086 | v.z = v.z - floor(v.z+0.000001); |
| 9087 | V3 v2=test; |
| 9088 | v2.x = v2.x - floor(v2.x+0.000001); |
| 9089 | v2.y = v2.y - floor(v2.y+0.000001); |
| 9090 | v2.z = v2.z - floor(v2.z+0.000001); |
| 9091 | double d=Norm(t); |
| 9092 | double ang=winkel(normal,t); |
| 9093 | ang+=720; |
| 9094 | int ia=static_cast<int>(round(ang)); |
| 9095 | ia%=360; |
| 9096 | if (((ia==90)||(ia==270))&&(Distance(v,v2)<0.001)&&(d<=td)) { |
| 9097 | glide=(t); |
| 9098 | td=d; |
| 9099 | } |
| 9100 | } |
| 9101 | } |
| 9102 | } |
| 9103 | } |
| 9104 | bool hasfract=false; |
| 9105 | hasfract=hasfract||((glide.x-floor(glide.x))>0.01); |
| 9106 | hasfract=hasfract||((glide.y-floor(glide.y))>0.01); |
| 9107 | hasfract=hasfract||((glide.z-floor(glide.z))>0.01); |
| 9108 | if (hasfract) return glide; |
| 9109 | else return V3(0,0,0); |
| 9110 | } |
| 9111 | |
| 9112 | void Molecule::findSymmElements(){ |
| 9113 | axvecs.clear(); |
| 9114 | ptriangles.clear(); |
| 9115 | axcols.clear(); |
| 9116 | axoprs.clear(); |
| 9117 | dontshowSel.clear(); |
| 9118 | dontshowSop.clear(); |
| 9119 | invoprs.clear(); |
| 9120 | invvecs.clear(); |
| 9121 | QList<V3> points; |
| 9122 | for (int n=1; n<cell.symmops.size(); n++){ |
| 9123 | int fold=0; |
| 9124 | V3 axis; |
| 9125 | QString sname=nameSymmOp(cell.symmops.at(n),fold,axis); |
| 9126 | axis=Normalize(axis); |
| 9127 | printf("This Symmop #%d is a %s. %d %g %g %g\n",n,sname.toStdString().c_str(),fold,axis.x,axis.y,axis.z); |
| 9128 | if (cell.symmops.at(n)==Matrix(1,0,0,0,1,0,0,0,1)) { |
| 9129 | //printf("das wars %s\n",symmcode2human(n).toStdString().c_str()); |
| 9130 | continue; |
| 9131 | //break; |
| 9132 | } |
| 9133 | if (cell.symmops.at(n)==Matrix(-1,0,0,0,-1,0,0,0,-1)) { |
| 9134 | printf("inversion %s\n",symmcode2human(n).toStdString().c_str()); |
| 9135 | //continue; |
| 9136 | } |
| 9137 | points.clear(); |
| 9138 | specialPts(cell.symmops.at(n),cell.trans.at(n), points); |
| 9139 | //printf("points size = %lld\n",points.size()); |
| 9140 | if (fold==-1){ |
| 9141 | QList<V3> drin; |
| 9142 | for (int i=0; i< points.size(); i++){ |
| 9143 | packPoint(points.at(i),drin); |
| 9144 | //printf("%d -- %d\n",i,drin.size()); |
| 9145 | } |
| 9146 | for (int i=0; i< drin.size(); i++){ |
| 9147 | V3 pos; |
| 9148 | frac2kart(drin.at(i),pos); |
| 9149 | invoprs.append(n); |
| 9150 | invvecs.append(pos); |
| 9151 | } |
| 9152 | //printf("INVERSION CENTERS %d %d\n",invoprs.size(),invvecs.size()); |
| 9153 | }else |
| 9154 | if (fold==-2){ |
| 9155 | for (int g=0; g<points.size(); g++){ |
| 9156 | V3 glide = //V3(0,0,0); |
| 9157 | findGlide(axis,points.at(g),n); |
| 9158 | bool isglide=(Norm(glide)>0.01); |
| 9159 | //if (n==6)printf("#@#@ isglide? %d (%g %g %g)\n",isglide,glide.x,glide.y,glide.z); |
| 9160 | int colori=abs(fold)-1; |
| 9161 | colori+=(fold<0)?5:0; |
| 9162 | colori+=fold==6?-1:0; |
| 9163 | colori+=(fold==-6)?-1:0; |
| 9164 | colori+=(isglide)?9:0; |
| 9165 | colori+=((isglide)&&(fold<0))?-1:0; |
| 9166 | //frac2kart(V3(glide.x*T.x,glide.y*T.y,glide.z*T.z),glide); |
| 9167 | make1Plane(axis,points.at(g),glide,colori,n); |
| 9168 | } |
| 9169 | }else{ |
| 9170 | // may be a axis |
| 9171 | QList<V3> drin; |
| 9172 | QList<int> dc; |
| 9173 | for (int g=0; g<points.size();g++){ |
| 9174 | V3 tt2=points.at(g); |
| 9175 | |
| 9176 | //printf("COLORI %d<%d\n",colori,symmColors.size()); |
| 9177 | //printf("%g %g %g || %g %g %g \n",ax1.x,ax1.y,ax1.z,cell.trans.at(n).x,cell.trans.at(n).y,cell.trans.at(n).z); |
| 9178 | bool ok; |
| 9179 | V3 inp; |
| 9180 | QList<V3> sects; |
| 9181 | inp=intersectPoint(-1.0*axis,tt2,V3(0,0,1),V3(0,0,0),ok); |
| 9182 | if (ok){ |
| 9183 | if (!sects.contains(inp)) sects.append(inp); |
| 9184 | } |
| 9185 | inp=intersectPoint(-1.0*axis,tt2,V3(0,0,1),V3(0,0,1),ok); |
| 9186 | if (ok){ |
| 9187 | if (!sects.contains(inp)) sects.append(inp); |
| 9188 | } |
| 9189 | inp=intersectPoint(-1.0*axis,tt2,V3(0,1,0),V3(0,0,0),ok); |
| 9190 | if ((ok)){ |
| 9191 | if (!sects.contains(inp)) sects.append(inp); |
| 9192 | } |
| 9193 | inp=intersectPoint(-1.0*axis,tt2,V3(0,1,0),V3(0,1,0),ok); |
| 9194 | if ((ok)){ |
| 9195 | if (!sects.contains(inp)) sects.append(inp); |
| 9196 | } |
| 9197 | inp=intersectPoint(-1.0*axis,tt2,V3(1,0,0),V3(0,0,0),ok); |
| 9198 | if ((ok)){ |
| 9199 | if (!sects.contains(inp)) sects.append(inp); |
| 9200 | } |
| 9201 | inp=intersectPoint(-1.0*axis,tt2,V3(1,0,0),V3(1,0,0),ok); |
| 9202 | if ((ok)){ |
| 9203 | if (!sects.contains(inp)) sects.append(inp); |
| 9204 | } |
| 9205 | if (sects.size()>1){ |
| 9206 | V3 pp0 = 0.5*(sects.at(0)+sects.at(1)); |
| 9207 | V3 pp = cell.symmops.at(n) * pp0 + cell.trans.at(n); |
| 9208 | pp.x = pp.x - floor(pp.x+0.000001); |
| 9209 | pp.y = pp.y - floor(pp.y+0.000001); |
| 9210 | pp.z = pp.z - floor(pp.z+0.000001); |
| 9211 | double screwy = (fold==-2)?0.0:sqrt(Norm(pp-pp0)); |
| 9212 | //printf("%g %g %g ||%g %g %g \n",pp.x,pp.y,pp.z,pp0.x,pp0.y,pp0.z); |
| 9213 | //V3 ta=(pp-pp0); |
| 9214 | V3 screw = screwy * axis; |
| 9215 | screw.x = screw.x - floor(screw.x+0.000001); |
| 9216 | screw.y = screw.y - floor(screw.y+0.000001); |
| 9217 | screw.z = screw.z - floor(screw.z+0.000001); |
| 9218 | /*printf("Screw: %g >> (%g %g %g) (%g %g %g) (%g %g %g) (%g %g %g)\n", Norm(screw), screw.x, screw.y, screw.z,tt2.x,tt2.y,tt2.z, |
| 9219 | axis.x,axis.y,axis.z, |
| 9220 | dif.x,dif.y,dif.z |
| 9221 | );*/ |
| 9222 | bool isscrew=Norm(screw)>0.01; |
| 9223 | //frac2kart(screw,scc); |
| 9224 | int colori=abs(fold)-1; |
| 9225 | colori+=(fold<0)?5:0; |
| 9226 | colori+=(fold==6)?-1:0; |
| 9227 | colori+=(fold==-6)?-1:0; |
| 9228 | colori+=(isscrew)?9:0; |
| 9229 | colori+=((isscrew)&&(fold<0))?-1:0; |
| 9230 | //int ds=drin.size(); |
| 9231 | packLine(sects.at(0),sects.at(1),drin,colori,dc); |
| 9232 | /*if (ds!=drin.size())printf("drinsize %d colori %d screw(%g):( %g %g %g) (%g %g %g) (%g %g %g)\n",drin.size(),colori,screwy,screw.x,screw.y,screw.z |
| 9233 | ,ta.x,ta.y,ta.z,axis.x,axis.y,axis.z);// */ |
| 9234 | } |
| 9235 | //printf("drinn %d %d \n",drin.size(),sects.size()); |
| 9236 | for (int g=0; g<drin.size(); g++){ |
| 9237 | V3 ax; |
| 9238 | frac2kart(drin.at(g),ax); |
| 9239 | if (!axvecs.contains(ax)){ |
| 9240 | axvecs.append(ax); |
| 9241 | axcols.append(dc.at(g)); |
| 9242 | axoprs.append(n); |
| 9243 | }else { |
| 9244 | int exist=axvecs.lastIndexOf(ax); |
| 9245 | if (axcols.at(exist)!=dc.at(g)){ |
| 9246 | axvecs.append(ax); |
| 9247 | axcols.append(dc.at(g)); |
| 9248 | axoprs.append(n); |
| 9249 | } |
| 9250 | } |
| 9251 | } |
| 9252 | } |
| 9253 | } |
| 9254 | if (n==-6) {// for debugging |
| 9255 | printf("XXXX\n"); |
| 9256 | for (int i=0; i< points.size(); i++){ |
| 9257 | MyAtom atm; |
| 9258 | atm.an=-1; |
| 9259 | atm.Label=QString("Sym%1").arg(i); |
| 9260 | atm.peakHeight=(i*1.0)/points.size(); |
| 9261 | atm.frac=points.at(i); |
| 9262 | atm.an=-1; |
| 9263 | atm.part=0; |
| 9264 | atm.resiNr=0; |
| 9265 | atm.hidden=0; |
| 9266 | atm.resiNr=0; |
| 9267 | atm.part=0; |
| 9268 | atm.style=1; |
| 9269 | atm.symmGroup=0; |
| 9270 | atm.sg=0; |
| 9271 | atm.scod=555;//the identity |
| 9272 | atm.auidx=-1; |
| 9273 | atm.uc.m12=atm.uc.m23=atm.uc.m13=0.0; |
| 9274 | atm.uc.m21=atm.uc.m32=atm.uc.m31=0.0; |
| 9275 | atm.uf.m12=atm.uf.m23=atm.uf.m13=0.0; |
| 9276 | atm.uf.m21=atm.uf.m32=atm.uf.m31=0.0; |
| 9277 | atm.uf.m11=0.05; |
| 9278 | atm.isIso=true; |
| 9279 | atm.uc.m11=atm.uc.m22=atm.uc.m33=atm.uf.m11; |
| 9280 | frac2kart(atm.frac,atm.pos); |
| 9281 | printf("Sym%d %f %f %f <=> %f %f %f\n",i,atm.frac.x,atm.frac.y,atm.frac.z,atm.pos.x,atm.pos.y,atm.pos.z); |
| 9282 | showatoms.append(atm); |
| 9283 | } |
| 9284 | } |
| 9285 | } |
| 9286 | } |
| 9287 | |
| 9288 | void Molecule::make1Plane(V3 planeNormal, V3 pointOnPlane,V3 glide, int ac, int n){ |
| 9289 | //if (n==11) printf("normal %g %g %g\n",planeNormal.x,planeNormal.y,planeNormal.z); |
| 9290 | QList<V3> pop;//point on plane |
| 9291 | int np=0; |
| 9292 | bool already=false; |
| 9293 | for (int h=0; h<2; h++){ |
| 9294 | for (int k=0; k<2; k++){ |
| 9295 | for (int l=0; l<2; l++){ |
| 9296 | bool ok; |
| 9297 | V3 inp=intersectPoint(V3(0,0,1),V3(h,k,l),planeNormal,pointOnPlane,ok); |
| 9298 | if (ok) { |
| 9299 | if (!pop.contains(inp)){ |
| 9300 | np++; |
| 9301 | pop.append(inp); |
| 9302 | } |
| 9303 | |
| 9304 | } |
| 9305 | inp=intersectPoint(V3(0,1,0),V3(h,k,l),planeNormal,pointOnPlane,ok); |
| 9306 | if (ok) { |
| 9307 | if (!pop.contains(inp)){ |
| 9308 | np++; |
| 9309 | pop.append(inp); |
| 9310 | } |
| 9311 | } |
| 9312 | inp=intersectPoint(V3(1,0,0),V3(h,k,l),planeNormal,pointOnPlane,ok); |
| 9313 | if (ok) { |
| 9314 | if (!pop.contains(inp)){ |
| 9315 | np++; |
| 9316 | pop.append(inp); |
| 9317 | } |
| 9318 | } |
| 9319 | } |
| 9320 | } |
| 9321 | } |
| 9322 | if (pop.size()>2){ |
| 9323 | PPoly tri; |
| 9324 | tri.nor=planeNormal; |
| 9325 | tri.mid=V3(0,0,0); |
| 9326 | for(int i=0; i<pop.size();i++){ |
| 9327 | tri.mid+=pop.at(i); |
| 9328 | } |
| 9329 | tri.mid*=1.0/pop.size(); |
| 9330 | tri.verts0=pop.at(0); |
| 9331 | tri.verts1=pop.at(1); |
| 9332 | tri.colr=ac; |
| 9333 | tri.n=n; |
| 9334 | //tri.glide=glide; |
| 9335 | frac2kart(glide,tri.glide); |
| 9336 | QList<int> order; |
| 9337 | order.append(0); |
| 9338 | int j=0,jj=0,aj=0; |
| 9339 | for (int k=1; k<pop.size();k++){ |
| 9340 | double mdi=10000.0; |
| 9341 | for (int i=1; i<pop.size();i++){ |
| 9342 | if ((i==j)||(order.contains(i))) continue; |
| 9343 | double d=Distance(pop.at(j),pop.at(i)); |
| 9344 | double dd=Distance(pop.at(aj),pop.at(i)); |
| 9345 | if ((d<=dd)&&(d<mdi)){ |
| 9346 | mdi=d; |
| 9347 | jj=i; |
| 9348 | } |
| 9349 | } |
| 9350 | aj=j; |
| 9351 | j=jj; |
| 9352 | order.append(j); |
| 9353 | } |
| 9354 | //V3 mf=tri.mid; |
| 9355 | frac2kart(tri.mid,tri.mid); |
| 9356 | for(int i=0; i<ptriangles.size();i++){ |
| 9357 | if ((n==ptriangles.at(i).n)&&(ptriangles.at(i).nor==planeNormal)&&(ptriangles.at(i).mid==tri.mid)){ |
| 9358 | already=true; |
| 9359 | break; |
| 9360 | } |
| 9361 | } |
| 9362 | if (!already)for(int i=0; i<order.size();i++){ |
| 9363 | frac2kart(pop.at(order.at(i)),tri.verts0); |
| 9364 | frac2kart(pop.at(order.at((i+1)%order.size())),tri.verts1); |
| 9365 | ptriangles.append(tri); |
| 9366 | //printf("#### %d %g %g %g %g %g %g %d\n",n,glide.x,glide.y,glide.z,mf.x,mf.y,mf.z,pop.size()); |
| 9367 | } |
| 9368 | } |
| 9369 | } |
| 9370 | |
| 9371 | bool Molecule::is2Dissordered4H(const MyAtom &atom){ |
| 9372 | if (!HFixSuitableAtomsOnly) return false; |
| 9373 | double avu=averageUeq(); |
| 9374 | V3 ev; |
| 9375 | double ue=ueq(atom.uf); |
| 9376 | if (ue<0.0) return true;//NPD is not good! |
| 9377 | jacobi(atom.uc,ev); |
| 9378 | double mi,ma,ratio; |
| 9379 | mi=(ev.x > ev.y)?(ev.y > ev.z)?ev.z:ev.y:(ev.x > ev.z)?ev.z:ev.x; |
| 9380 | ma=(ev.x < ev.y)?(ev.y < ev.z)?ev.z:ev.y:(ev.x < ev.z)?ev.z:ev.x; |
| 9381 | if (mi<0.01) return true; |
| 9382 | if (ue<avu*1.2) return false; //small enough to be a H-horse ;-) |
| 9383 | ratio=fabs(ma/mi); |
| 9384 | printf("%s is this a missshaped ADP min %f max %f ratio %f iso %f avg %f %f?\n",atom.Label.toStdString().c_str(),mi,ma,ratio,ue,avu,ue/avu); |
| 9385 | if (ratio>8) return true; |
| 9386 | if ((ue/avu) >3.0) return true; |
| 9387 | return false; |
| 9388 | } |
| 9389 | |
| 9390 | double Molecule::averageUeq(){ |
| 9391 | double uav=0.0; |
| 9392 | int iok=0; |
| 9393 | Matrix ucc; |
| 9394 | for (int i=0; i<asymm.size();i++){ |
| 9395 | if (asymm.at(i).an<0) continue; |
| 9396 | double u=ueq(asymm.at(i).uf); |
| 9397 | if (u>0.0) { |
| 9398 | iok++; |
| 9399 | uav+=u; |
| 9400 | } |
| 9401 | } |
| 9402 | uav/=iok; |
| 9403 | return uav; |
| 9404 | } |
| 9405 | |
| 9406 | double Molecule::ueq(const Matrix m){ |
| 9407 | double erg=0; |
| 9408 | Matrix ucc; |
| 9409 | Uf2Uo(m,ucc); |
| 9410 | erg=1/3.0*(ucc.m11+ucc.m22+ucc.m33); |
| 9411 | return erg; |
| 9412 | } |
| 9413 | |
| 9414 | MyAtom Molecule::fromAtomString(const QString &s){ |
| 9415 | MyAtom a; |
| 9416 | a.an=-81; |
| 9417 | QStringList sl = s.split('!'); |
| 9418 | if (sl.size()<45) return a; |
| 9419 | a.Label = sl.at(0); |
| 9420 | a.ResiClass = sl.at(1); |
| 9421 | a.orginalLine = sl.at(2); |
| 9422 | a.molindex = sl.at(3).toInt(); |
| 9423 | a.fixFlag = sl.at(4).toInt(); |
| 9424 | a.symmGroup = sl.at(5).toInt(); |
| 9425 | a.sg = sl.at(6).toInt(); |
| 9426 | a.scod = sl.at(7).toInt(); |
| 9427 | a.auidx = sl.at(8).toInt(); |
| 9428 | a.hidden = sl.at(9).toInt(); |
| 9429 | a.sof_org = sl.at(10).toDouble(); |
| 9430 | a.sof = sl.at(11).toDouble(); |
| 9431 | a.isIso = sl.at(12).toInt(); |
| 9432 | a.ufiso_org = sl.at(13); |
| 9433 | a.uf.m11 = sl.at(14).toDouble(); |
| 9434 | a.uf.m12 = sl.at(15).toDouble(); |
| 9435 | a.uf.m13 = sl.at(16).toDouble(); |
| 9436 | a.uf.m21 = sl.at(17).toDouble(); |
| 9437 | a.uf.m22 = sl.at(18).toDouble(); |
| 9438 | a.uf.m23 = sl.at(19).toDouble(); |
| 9439 | a.uf.m31 = sl.at(20).toDouble(); |
| 9440 | a.uf.m32 = sl.at(21).toDouble(); |
| 9441 | a.uf.m33 = sl.at(22).toDouble(); |
| 9442 | a.uc.m11 = sl.at(23).toDouble(); |
| 9443 | a.uc.m12 = sl.at(24).toDouble(); |
| 9444 | a.uc.m13 = sl.at(25).toDouble(); |
| 9445 | a.uc.m21 = sl.at(26).toDouble(); |
| 9446 | a.uc.m22 = sl.at(27).toDouble(); |
| 9447 | a.uc.m23 = sl.at(28).toDouble(); |
| 9448 | a.uc.m31 = sl.at(29).toDouble(); |
| 9449 | a.uc.m32 = sl.at(30).toDouble(); |
| 9450 | a.uc.m33 = sl.at(31).toDouble(); |
| 9451 | a.pos.x = sl.at(32).toDouble(); |
| 9452 | a.pos.y = sl.at(33).toDouble(); |
| 9453 | a.pos.z = sl.at(34).toDouble(); |
| 9454 | a.frac.x = sl.at(35).toDouble(); |
| 9455 | a.frac.y = sl.at(36).toDouble(); |
| 9456 | a.frac.z = sl.at(37).toDouble(); |
| 9457 | a.peakHeight = sl.at(38).toDouble(); |
| 9458 | a.resiNr = sl.at(39).toInt(); |
| 9459 | a.an = sl.at(40).toInt(); |
| 9460 | a.part = sl.at(41).toInt(); |
| 9461 | a.style = sl.at(42).toInt(); |
| 9462 | a.afixParent = sl.at(43).toInt(); |
| 9463 | a.afix = sl.at(44).toInt(); |
| 9464 | return a; |
| 9465 | } |