| 16 |
|
|
| 17 |
|
struct linked_xyz{ |
| 18 |
|
struct coords *r; |
| 19 |
+ |
double boxX, boxY, boxZ; |
| 20 |
|
struct linked_xyz *next; |
| 21 |
|
}; |
| 22 |
|
|
| 24 |
|
int draw_bonds = 0; /* boolean to draw bonds or not */ |
| 25 |
|
int draw_hydrogens = 0; /*boolean to draw hydrogens */ |
| 26 |
|
int draw_atoms = 0; /*boolean to draw atoms */ |
| 27 |
+ |
int draw_box = 0; // boolean to draw the periodic Box |
| 28 |
|
int regenerateBonds = 0; // boolean to regenearate bonds each frame |
| 29 |
|
|
| 30 |
|
void usage(void); |
| 68 |
|
int nZeroes; |
| 69 |
|
double count; |
| 70 |
|
|
| 71 |
+ |
int startFrame = 1; |
| 72 |
+ |
int endFrame; |
| 73 |
+ |
int span = 0; |
| 74 |
+ |
int currentCount = 0; |
| 75 |
+ |
int haveEnd = 0; |
| 76 |
+ |
|
| 77 |
|
struct linked_xyz *current_frame; |
| 78 |
|
struct linked_xyz *temp_frame; |
| 79 |
|
|
| 80 |
|
unsigned int n_interpolate = 0; /* number of frames to interpolate */ |
| 81 |
|
double dx, dy, dz; /* temp variables for interpolating distances */ |
| 82 |
+ |
|
| 83 |
|
|
| 84 |
|
char pov_dir[500]; /* the pov_dir */ |
| 85 |
|
|
| 130 |
|
done = 1; |
| 131 |
|
break; |
| 132 |
|
|
| 133 |
+ |
case 'f': |
| 134 |
+ |
// -f <#> => frame to render |
| 135 |
+ |
|
| 136 |
+ |
i++; |
| 137 |
+ |
startFrame = atoi( argv[i] ); |
| 138 |
+ |
endFrame = startFrame; |
| 139 |
+ |
haveEnd = 1; |
| 140 |
+ |
done = 1; |
| 141 |
+ |
break; |
| 142 |
+ |
|
| 143 |
+ |
case 's': |
| 144 |
+ |
// -s <#> => frame to start |
| 145 |
+ |
|
| 146 |
+ |
i++; |
| 147 |
+ |
startFrame = atoi( argv[i] ); |
| 148 |
+ |
done = 1; |
| 149 |
+ |
break; |
| 150 |
+ |
|
| 151 |
+ |
case 'e': |
| 152 |
+ |
// -e <#> => frame to end |
| 153 |
+ |
|
| 154 |
+ |
i++; |
| 155 |
+ |
endFrame = atoi( argv[i] ); |
| 156 |
+ |
haveEnd = 1; |
| 157 |
+ |
done = 1; |
| 158 |
+ |
break; |
| 159 |
+ |
|
| 160 |
|
case 'H': |
| 161 |
|
// -h => generate a pov-ray Header |
| 162 |
|
|
| 185 |
|
// -r => regenerate bonds |
| 186 |
|
|
| 187 |
|
regenerateBonds = 1; |
| 188 |
+ |
break; |
| 189 |
+ |
|
| 190 |
+ |
case 'p': |
| 191 |
+ |
// -r => draw periodic box |
| 192 |
+ |
|
| 193 |
+ |
draw_box = 1; |
| 194 |
|
break; |
| 195 |
|
|
| 196 |
|
default: |
| 280 |
|
current_frame->next = NULL; |
| 281 |
|
|
| 282 |
|
|
| 283 |
< |
while(eof_test != NULL){ |
| 283 |
> |
if( haveEnd ) span = endFrame - startFrame; |
| 284 |
> |
done = 0; |
| 285 |
> |
if( span < 0 ) done = 1; |
| 286 |
> |
while( (eof_test != NULL) && !done ){ |
| 287 |
|
|
| 288 |
|
(void)sscanf(read_buffer, "%d", &n_atoms); |
| 289 |
|
current_frame->r = |
| 295 |
|
if(eof_test == NULL){ |
| 296 |
|
printf("error in reading file\n"); |
| 297 |
|
exit(8); |
| 298 |
+ |
} |
| 299 |
+ |
|
| 300 |
+ |
// unless we need to get the box size |
| 301 |
+ |
|
| 302 |
+ |
if( draw_box ){ |
| 303 |
+ |
foo = strtok(read_buffer, " ,;\t"); |
| 304 |
+ |
if(foo == NULL){ |
| 305 |
+ |
printf("error in reading file\n"); |
| 306 |
+ |
exit(8); |
| 307 |
+ |
} |
| 308 |
+ |
|
| 309 |
+ |
foo = strtok(NULL, " ,;\t"); |
| 310 |
+ |
if(foo == NULL){ |
| 311 |
+ |
printf("error in reading file\n"); |
| 312 |
+ |
exit(8); |
| 313 |
+ |
} |
| 314 |
+ |
current_frame->boxX = atof( foo ); |
| 315 |
+ |
|
| 316 |
+ |
foo = strtok(NULL, " ,;\t"); |
| 317 |
+ |
if(foo == NULL){ |
| 318 |
+ |
printf("error in reading file\n"); |
| 319 |
+ |
exit(8); |
| 320 |
+ |
} |
| 321 |
+ |
current_frame->boxY = atof( foo ); |
| 322 |
+ |
|
| 323 |
+ |
foo = strtok(NULL, " ,;\t"); |
| 324 |
+ |
if(foo == NULL){ |
| 325 |
+ |
printf("error in reading file\n"); |
| 326 |
+ |
exit(8); |
| 327 |
+ |
} |
| 328 |
+ |
current_frame->boxZ = atof( foo ); |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
for( i=0; i < n_atoms; i++){ |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
foo = strtok(read_buffer, " ,;\t"); |
| 340 |
+ |
if(foo == NULL){ |
| 341 |
+ |
printf("error in reading file\n"); |
| 342 |
+ |
exit(8); |
| 343 |
+ |
} |
| 344 |
|
(void)strcpy(current_frame->r[i].name, foo); /*copy the atom name */ |
| 345 |
|
|
| 346 |
|
/* next we grab the positions */ |
| 375 |
|
if(current_frame->r[i].z < small_z) small_z = current_frame->r[i].z; |
| 376 |
|
|
| 377 |
|
} |
| 378 |
+ |
currentCount++; |
| 379 |
|
|
| 380 |
< |
if(n_interpolate && current_frame->next != NULL){ |
| 381 |
< |
|
| 382 |
< |
temp_frame = current_frame->next; |
| 302 |
< |
|
| 303 |
< |
for(i = 0; i < n_interpolate; i++){ |
| 380 |
> |
|
| 381 |
> |
if( currentCount >= startFrame ){ |
| 382 |
> |
if(n_interpolate && current_frame->next != NULL){ |
| 383 |
|
|
| 384 |
< |
/* open the new output file */ |
| 384 |
> |
temp_frame = current_frame->next; |
| 385 |
|
|
| 386 |
< |
sprintf(out_name, out_format, n_out ); |
| 387 |
< |
out_file = fopen(out_name, "w"); |
| 388 |
< |
n_out++; |
| 389 |
< |
if(out_file == NULL){ |
| 390 |
< |
printf("error opening output file: %s\n", out_name); |
| 391 |
< |
exit(8); |
| 392 |
< |
} |
| 393 |
< |
(void)fprintf(out_file, |
| 394 |
< |
"// The following script was automatically generated by:\n" |
| 395 |
< |
"// xyz2pov Copyright 2001 by MATTHEW A. MEINEKE\n" |
| 396 |
< |
"\n" |
| 397 |
< |
"#include \"pov_header.pov\"\n" |
| 398 |
< |
"\n"); |
| 399 |
< |
|
| 400 |
< |
out_coords = |
| 401 |
< |
(struct coords *)calloc(n_atoms, sizeof(struct coords)); |
| 402 |
< |
|
| 403 |
< |
for(j=0; j < n_atoms; j++){ |
| 404 |
< |
dx = current_frame->r[j].x - temp_frame->r[j].x; |
| 405 |
< |
dy = current_frame->r[j].y - temp_frame->r[j].y; |
| 406 |
< |
dz = current_frame->r[j].z - temp_frame->r[j].z; |
| 407 |
< |
|
| 408 |
< |
dx /= (double)(n_interpolate + 1); |
| 409 |
< |
dy /= (double)(n_interpolate + 1); |
| 410 |
< |
dz /= (double)(n_interpolate + 1); |
| 411 |
< |
|
| 412 |
< |
strcpy(out_coords[j].name, temp_frame->r[j].name); |
| 413 |
< |
out_coords[j].x = temp_frame->r[j].x + dx * (i+1); |
| 414 |
< |
out_coords[j].y = temp_frame->r[j].y + dy * (i+1); |
| 415 |
< |
out_coords[j].z = temp_frame->r[j].z + dz * (i+1); |
| 386 |
> |
for(i = 0; i < n_interpolate; i++){ |
| 387 |
> |
|
| 388 |
> |
/* open the new output file */ |
| 389 |
> |
|
| 390 |
> |
sprintf(out_name, out_format, currentCount ); |
| 391 |
> |
out_file = fopen(out_name, "w"); |
| 392 |
> |
currentCount++; |
| 393 |
> |
if(out_file == NULL){ |
| 394 |
> |
printf("error opening output file: %s\n", out_name); |
| 395 |
> |
exit(8); |
| 396 |
> |
} |
| 397 |
> |
(void)fprintf(out_file, |
| 398 |
> |
"// The following script was automatically generated by:\n" |
| 399 |
> |
"// xyz2pov Copyright 2001 by MATTHEW A. MEINEKE\n" |
| 400 |
> |
"\n" |
| 401 |
> |
"#include \"pov_header.pov\"\n" |
| 402 |
> |
"\n"); |
| 403 |
> |
if( draw_box ){ |
| 404 |
> |
dx = current_frame->boxX - temp_frame->boxX; |
| 405 |
> |
dy = current_frame->boxY - temp_frame->boxY; |
| 406 |
> |
dz = current_frame->boxZ - temp_frame->boxZ; |
| 407 |
> |
|
| 408 |
> |
dx /= (double)(n_interpolate + 1); |
| 409 |
> |
dy /= (double)(n_interpolate + 1); |
| 410 |
> |
dz /= (double)(n_interpolate + 1); |
| 411 |
> |
|
| 412 |
> |
fprintf( out_file, |
| 413 |
> |
"makePeriodicBox( %lf, %lf, %lf )\n" |
| 414 |
> |
"\n", |
| 415 |
> |
temp_frame->boxX + dx * (i+1), |
| 416 |
> |
temp_frame->boxZ + dz * (i+1), |
| 417 |
> |
temp_frame->boxY + dy * (i+1) ); |
| 418 |
> |
} |
| 419 |
> |
|
| 420 |
> |
|
| 421 |
> |
out_coords = |
| 422 |
> |
(struct coords *)calloc(n_atoms, sizeof(struct coords)); |
| 423 |
> |
|
| 424 |
> |
for(j=0; j < n_atoms; j++){ |
| 425 |
> |
dx = current_frame->r[j].x - temp_frame->r[j].x; |
| 426 |
> |
dy = current_frame->r[j].y - temp_frame->r[j].y; |
| 427 |
> |
dz = current_frame->r[j].z - temp_frame->r[j].z; |
| 428 |
> |
|
| 429 |
> |
dx /= (double)(n_interpolate + 1); |
| 430 |
> |
dy /= (double)(n_interpolate + 1); |
| 431 |
> |
dz /= (double)(n_interpolate + 1); |
| 432 |
> |
|
| 433 |
> |
strcpy(out_coords[j].name, temp_frame->r[j].name); |
| 434 |
> |
out_coords[j].x = temp_frame->r[j].x + dx * (i+1); |
| 435 |
> |
out_coords[j].y = temp_frame->r[j].y + dy * (i+1); |
| 436 |
> |
out_coords[j].z = temp_frame->r[j].z + dz * (i+1); |
| 437 |
> |
} |
| 438 |
> |
|
| 439 |
> |
pov_write(out_file, out_coords, n_atoms, draw_hydrogens, draw_bonds, |
| 440 |
> |
draw_atoms); |
| 441 |
> |
free(out_coords); |
| 442 |
> |
(void)fclose(out_file); |
| 443 |
|
} |
| 444 |
+ |
} |
| 445 |
+ |
|
| 446 |
+ |
/* open the new output file */ |
| 447 |
+ |
|
| 448 |
+ |
sprintf(out_name, out_format, currentCount ); |
| 449 |
+ |
out_file = fopen(out_name, "w"); |
| 450 |
+ |
if(out_file == NULL){ |
| 451 |
+ |
printf("error opening output file: %s\n", out_name); |
| 452 |
+ |
exit(8); |
| 453 |
+ |
} |
| 454 |
+ |
(void)fprintf(out_file, |
| 455 |
+ |
"// The following script was automatically generated by:\n" |
| 456 |
+ |
"// xyz2pov Copyright 2001 by MATTHEW A. MEINEKE\n" |
| 457 |
+ |
"\n" |
| 458 |
+ |
"#include \"pov_header.pov\"\n" |
| 459 |
+ |
"\n"); |
| 460 |
+ |
|
| 461 |
+ |
if( draw_box ){ |
| 462 |
|
|
| 463 |
< |
pov_write(out_file, out_coords, n_atoms, draw_hydrogens, draw_bonds, |
| 464 |
< |
draw_atoms); |
| 465 |
< |
free(out_coords); |
| 466 |
< |
(void)fclose(out_file); |
| 463 |
> |
fprintf( out_file, |
| 464 |
> |
"makePeriodicBox( %lf, %lf, %lf )\n" |
| 465 |
> |
"\n", |
| 466 |
> |
current_frame->boxX, |
| 467 |
> |
current_frame->boxZ, |
| 468 |
> |
current_frame->boxY ); |
| 469 |
|
} |
| 470 |
+ |
|
| 471 |
+ |
|
| 472 |
+ |
|
| 473 |
+ |
out_coords = |
| 474 |
+ |
(struct coords *)calloc(n_atoms, sizeof(struct coords)); |
| 475 |
+ |
|
| 476 |
+ |
for(i = 0; i < n_atoms; i++){ |
| 477 |
+ |
strcpy(out_coords[i].name, current_frame->r[i].name); |
| 478 |
+ |
out_coords[i].x = current_frame->r[i].x; |
| 479 |
+ |
out_coords[i].y = current_frame->r[i].y; |
| 480 |
+ |
out_coords[i].z = current_frame->r[i].z; |
| 481 |
+ |
} |
| 482 |
+ |
pov_write(out_file, out_coords, n_atoms, draw_hydrogens, draw_bonds, |
| 483 |
+ |
draw_atoms); |
| 484 |
+ |
free(out_coords); |
| 485 |
+ |
|
| 486 |
+ |
(void)fclose(out_file); |
| 487 |
|
} |
| 345 |
– |
|
| 346 |
– |
/* open the new output file */ |
| 488 |
|
|
| 348 |
– |
sprintf(out_name, out_format, n_out ); |
| 349 |
– |
out_file = fopen(out_name, "w"); |
| 350 |
– |
n_out++; |
| 351 |
– |
if(out_file == NULL){ |
| 352 |
– |
printf("error opening output file: %s\n", out_name); |
| 353 |
– |
exit(8); |
| 354 |
– |
} |
| 355 |
– |
(void)fprintf(out_file, |
| 356 |
– |
"// The following script was automatically generated by:\n" |
| 357 |
– |
"// xyz2pov Copyright 2001 by MATTHEW A. MEINEKE\n" |
| 358 |
– |
"\n" |
| 359 |
– |
"#include \"pov_header.pov\"\n" |
| 360 |
– |
"\n"); |
| 361 |
– |
|
| 362 |
– |
out_coords = |
| 363 |
– |
(struct coords *)calloc(n_atoms, sizeof(struct coords)); |
| 364 |
– |
|
| 365 |
– |
for(i = 0; i < n_atoms; i++){ |
| 366 |
– |
strcpy(out_coords[i].name, current_frame->r[i].name); |
| 367 |
– |
out_coords[i].x = current_frame->r[i].x; |
| 368 |
– |
out_coords[i].y = current_frame->r[i].y; |
| 369 |
– |
out_coords[i].z = current_frame->r[i].z; |
| 370 |
– |
} |
| 371 |
– |
pov_write(out_file, out_coords, n_atoms, draw_hydrogens, draw_bonds, |
| 372 |
– |
draw_atoms); |
| 373 |
– |
free(out_coords); |
| 374 |
– |
|
| 375 |
– |
(void)fclose(out_file); |
| 376 |
– |
|
| 489 |
|
/*free up memory */ |
| 490 |
|
|
| 491 |
|
temp_frame = current_frame->next; |
| 505 |
|
|
| 506 |
|
eof_test = fgets(read_buffer, sizeof(read_buffer), in_file); |
| 507 |
|
|
| 508 |
+ |
if( haveEnd ){ |
| 509 |
+ |
if( currentCount >= (endFrame + n_interpolate * span) ) done = 1; |
| 510 |
+ |
} |
| 511 |
|
} |
| 512 |
|
|
| 513 |
|
(void)fclose(in_file); |
| 523 |
|
diagonal = sqrt(rsqr); |
| 524 |
|
diagonal *= 0.5; |
| 525 |
|
|
| 526 |
+ |
// calculate the center |
| 527 |
+ |
|
| 528 |
+ |
dx = big_x + small_x; |
| 529 |
+ |
dy = big_y + small_y; |
| 530 |
+ |
dz = big_z + small_z; |
| 531 |
+ |
|
| 532 |
|
dx /= 2.0; |
| 533 |
|
dy /= 2.0; |
| 534 |
|
dz /= 2.0; |
| 535 |
< |
|
| 415 |
< |
dx += small_x; |
| 416 |
< |
dy += small_y; |
| 417 |
< |
dz += small_z; |
| 418 |
< |
|
| 535 |
> |
|
| 536 |
|
|
| 537 |
|
/*note the y and z axis is exchanged for the different coordinate |
| 538 |
|
system in pov-ray*/ |
| 563 |
|
"#declare Height = 480.0;\n" |
| 564 |
|
"#declare Ratio = Width / Height;\n" |
| 565 |
|
"\n" |
| 449 |
– |
"#declare zoom = %lf;\n" |
| 450 |
– |
"\n" |
| 566 |
|
"#declare ATOM_SPHERE_FACTOR = 0.2;\n" |
| 567 |
|
"#declare BOND_RADIUS = 0.1;\n" |
| 568 |
|
"\n" |
| 569 |
< |
"camera{\n" |
| 570 |
< |
" location < %lf, %lf, %lf - zoom>\n" |
| 571 |
< |
" right < Ratio , 0, 0>\n" |
| 572 |
< |
" look_at < %lf, %lf, %lf >\n" |
| 573 |
< |
"}\n" |
| 569 |
> |
"// declare camera, light, and system variables\n" |
| 570 |
> |
"\n" |
| 571 |
> |
"#declare sysCenterX = %lf;\n" |
| 572 |
> |
"#declare sysCenterY = %lf;\n" |
| 573 |
> |
"#declare sysCenterZ = %lf;\n" |
| 574 |
> |
"\n" |
| 575 |
> |
"#declare zoom = %lf;\n" |
| 576 |
|
"\n", |
| 460 |
– |
diagonal, |
| 577 |
|
dx, dz, dy, |
| 578 |
< |
dx, dz, dy); |
| 579 |
< |
|
| 578 |
> |
diagonal ); |
| 579 |
> |
|
| 580 |
|
fprintf(out_file, |
| 581 |
+ |
"#declare cameraLookX = sysCenterX;\n" |
| 582 |
+ |
"#declare cameraLookY = sysCenterY;\n" |
| 583 |
+ |
"#declare cameraLookZ = sysCenterZ;\n" |
| 584 |
+ |
"\n" |
| 585 |
+ |
"#declare cameraX = cameraLookX;\n" |
| 586 |
+ |
"#declare cameraY = cameraLookY;\n" |
| 587 |
+ |
"#declare cameraZ = cameraLookZ - zoom;\n" |
| 588 |
+ |
"\n" |
| 589 |
+ |
"#declare lightAx = cameraX;\n" |
| 590 |
+ |
"#declare lightAy = cameraY;\n" |
| 591 |
+ |
"#declare lightAz = cameraZ;\n" |
| 592 |
+ |
"\n" |
| 593 |
+ |
"#declare lightBx = cameraX - zoom;\n" |
| 594 |
+ |
"#declare lightBy = cameraY + zoom;\n" |
| 595 |
+ |
"#declare lightBz = cameraZ;\n" |
| 596 |
+ |
"\n" |
| 597 |
+ |
"#declare boxCenterX = cameraLookX;\n" |
| 598 |
+ |
"#declare boxCenterY = cameraLookY;\n" |
| 599 |
+ |
"#declare boxCenterZ = cameraLookZ;\n" |
| 600 |
+ |
"\n" |
| 601 |
+ |
"// declare the cameras and the light sources\n" |
| 602 |
+ |
"\n" |
| 603 |
+ |
"camera{\n" |
| 604 |
+ |
" location < cameraX, cameraY, cameraZ>\n" |
| 605 |
+ |
" right < Ratio , 0, 0>\n" |
| 606 |
+ |
" look_at < cameraLookX, cameraLookY, cameraLookZ >\n" |
| 607 |
+ |
"}\n" |
| 608 |
+ |
"\n" |
| 609 |
|
"light_source{\n" |
| 610 |
< |
" < %lf, %lf, %lf - zoom >\n" |
| 611 |
< |
" rgb < 1.0, 1.0, 1.0 > }\n", |
| 612 |
< |
dx, dz, dy); |
| 469 |
< |
|
| 470 |
< |
fprintf(out_file, |
| 610 |
> |
" < lightAx, lightAy, lightAz >\n" |
| 611 |
> |
" rgb < 1.0, 1.0, 1.0 > }\n" |
| 612 |
> |
"\n" |
| 613 |
|
"light_source{\n" |
| 614 |
< |
" < %lf - zoom , %lf + zoom, %lf - zoom >\n" |
| 614 |
> |
" < lightBx, lightBy, lightBz >\n" |
| 615 |
|
" rgb < 1.0, 1.0, 1.0 > }\n" |
| 616 |
|
"\n" |
| 617 |
< |
"\n", |
| 476 |
< |
dx, dz, dy); |
| 477 |
< |
|
| 478 |
< |
fprintf(out_file, |
| 617 |
> |
"\n" |
| 618 |
|
"//************************************************************\n" |
| 619 |
|
"// Set whether or not to rotate the system.\n" |
| 620 |
|
"//\n" |
| 645 |
|
" #declare A33 = cos(theta_r);\n" |
| 646 |
|
"\n" |
| 647 |
|
"#end\n" |
| 648 |
+ |
"\n" |
| 649 |
+ |
"\n" |
| 650 |
+ |
"//************************************************************\n" |
| 651 |
+ |
"// declare the periodic box macro\n" |
| 652 |
+ |
"//************************************************************\n" |
| 653 |
+ |
"\n" |
| 654 |
+ |
"#macro makePeriodicBox( lengthX, lengthY, lengthZ )\n" |
| 655 |
+ |
"\n" |
| 656 |
+ |
" #local addX = lengthX / 2.0;\n" |
| 657 |
+ |
" #local addY = lengthY / 2.0;\n" |
| 658 |
+ |
" #local addZ = lengthZ / 2.0;\n" |
| 659 |
+ |
"\n" |
| 660 |
+ |
" #local colorR = 0.90;\n" |
| 661 |
+ |
" #local colorG = 0.91;\n" |
| 662 |
+ |
" #local colorB = 0.98;\n" |
| 663 |
+ |
"\n" |
| 664 |
+ |
" #local pipeWidth = 0.4;\n" |
| 665 |
+ |
"\n" |
| 666 |
+ |
" // 1\n" |
| 667 |
+ |
" cylinder{\n" |
| 668 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 669 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 670 |
+ |
" pipeWidth\n" |
| 671 |
+ |
" texture{\n" |
| 672 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 673 |
+ |
" finish{\n" |
| 674 |
+ |
" ambient .2\n" |
| 675 |
+ |
" diffuse .6\n" |
| 676 |
+ |
" specular 1\n" |
| 677 |
+ |
" roughness .001\n" |
| 678 |
+ |
" metallic\n" |
| 679 |
+ |
" }\n" |
| 680 |
+ |
" }\n" |
| 681 |
+ |
" }\n" |
| 682 |
+ |
"\n" |
| 683 |
+ |
" // 2\n" |
| 684 |
+ |
" cylinder{\n" |
| 685 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 686 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 687 |
+ |
" pipeWidth\n" |
| 688 |
+ |
" texture{\n" |
| 689 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 690 |
+ |
" finish{\n" |
| 691 |
+ |
" ambient .2\n" |
| 692 |
+ |
" diffuse .6\n" |
| 693 |
+ |
" specular 1\n" |
| 694 |
+ |
" roughness .001\n" |
| 695 |
+ |
" metallic\n" |
| 696 |
+ |
" }\n" |
| 697 |
+ |
" }\n" |
| 698 |
+ |
" }\n" |
| 699 |
+ |
"\n" |
| 700 |
+ |
" // 3\n" |
| 701 |
+ |
" cylinder{\n" |
| 702 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 703 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 704 |
+ |
" pipeWidth\n" |
| 705 |
+ |
" texture{\n" |
| 706 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 707 |
+ |
" finish{\n" |
| 708 |
+ |
" ambient .2\n" |
| 709 |
+ |
" diffuse .6\n" |
| 710 |
+ |
" specular 1\n" |
| 711 |
+ |
" roughness .001\n" |
| 712 |
+ |
" metallic\n" |
| 713 |
+ |
" }\n" |
| 714 |
+ |
" }\n" |
| 715 |
+ |
" }\n" |
| 716 |
+ |
"\n" |
| 717 |
+ |
" // 4\n" |
| 718 |
+ |
" cylinder{\n" |
| 719 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 720 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 721 |
+ |
" pipeWidth\n" |
| 722 |
+ |
" texture{\n" |
| 723 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 724 |
+ |
" finish{\n" |
| 725 |
+ |
" ambient .2\n" |
| 726 |
+ |
" diffuse .6\n" |
| 727 |
+ |
" specular 1\n" |
| 728 |
+ |
" roughness .001\n" |
| 729 |
+ |
" metallic\n" |
| 730 |
+ |
" }\n" |
| 731 |
+ |
" }\n" |
| 732 |
+ |
" }\n" |
| 733 |
+ |
"\n" |
| 734 |
+ |
" // 5\n" |
| 735 |
+ |
" cylinder{\n" |
| 736 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 737 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 738 |
+ |
" pipeWidth\n" |
| 739 |
+ |
" texture{\n" |
| 740 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 741 |
+ |
" finish{\n" |
| 742 |
+ |
" ambient .2\n" |
| 743 |
+ |
" diffuse .6\n" |
| 744 |
+ |
" specular 1\n" |
| 745 |
+ |
" roughness .001\n" |
| 746 |
+ |
" metallic\n" |
| 747 |
+ |
" }\n" |
| 748 |
+ |
" }\n" |
| 749 |
+ |
" }\n" |
| 750 |
+ |
"\n" |
| 751 |
+ |
" // 6\n" |
| 752 |
+ |
" cylinder{\n" |
| 753 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 754 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 755 |
+ |
" pipeWidth\n" |
| 756 |
+ |
" texture{\n" |
| 757 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 758 |
+ |
" finish{\n" |
| 759 |
+ |
" ambient .2\n" |
| 760 |
+ |
" diffuse .6\n" |
| 761 |
+ |
" specular 1\n" |
| 762 |
+ |
" roughness .001\n" |
| 763 |
+ |
" metallic\n" |
| 764 |
+ |
" }\n" |
| 765 |
+ |
" }\n" |
| 766 |
+ |
" }\n" |
| 767 |
+ |
"\n" |
| 768 |
+ |
" // 7\n" |
| 769 |
+ |
" cylinder{\n" |
| 770 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ+addZ >,\n" |
| 771 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 772 |
+ |
" pipeWidth\n" |
| 773 |
+ |
" texture{\n" |
| 774 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 775 |
+ |
" finish{\n" |
| 776 |
+ |
" ambient .2\n" |
| 777 |
+ |
" diffuse .6\n" |
| 778 |
+ |
" specular 1\n" |
| 779 |
+ |
" roughness .001\n" |
| 780 |
+ |
" metallic\n" |
| 781 |
+ |
" }\n" |
| 782 |
+ |
" }\n" |
| 783 |
+ |
" }\n" |
| 784 |
+ |
"\n" |
| 785 |
+ |
" // 8\n" |
| 786 |
+ |
" cylinder{\n" |
| 787 |
+ |
" < boxCenterX+addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 788 |
+ |
" < boxCenterX-addX, boxCenterY-addY, boxCenterZ-addZ >,\n" |
| 789 |
+ |
" pipeWidth\n" |
| 790 |
+ |
" texture{\n" |
| 791 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 792 |
+ |
" finish{\n" |
| 793 |
+ |
" ambient .2\n" |
| 794 |
+ |
" diffuse .6\n" |
| 795 |
+ |
" specular 1\n" |
| 796 |
+ |
" roughness .001\n" |
| 797 |
+ |
" metallic\n" |
| 798 |
+ |
" }\n" |
| 799 |
+ |
" }\n" |
| 800 |
+ |
" }\n" |
| 801 |
+ |
"\n" |
| 802 |
+ |
" // 9\n" |
| 803 |
+ |
" cylinder{\n" |
| 804 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 805 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 806 |
+ |
" pipeWidth\n" |
| 807 |
+ |
" texture{\n" |
| 808 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 809 |
+ |
" finish{\n" |
| 810 |
+ |
" ambient .2\n" |
| 811 |
+ |
" diffuse .6\n" |
| 812 |
+ |
" specular 1\n" |
| 813 |
+ |
" roughness .001\n" |
| 814 |
+ |
" metallic\n" |
| 815 |
+ |
" }\n" |
| 816 |
+ |
" }\n" |
| 817 |
+ |
" }\n" |
| 818 |
+ |
"\n" |
| 819 |
+ |
" // 10\n" |
| 820 |
+ |
" cylinder{\n" |
| 821 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 822 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 823 |
+ |
" pipeWidth\n" |
| 824 |
+ |
" texture{\n" |
| 825 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 826 |
+ |
" finish{\n" |
| 827 |
+ |
" ambient .2\n" |
| 828 |
+ |
" diffuse .6\n" |
| 829 |
+ |
" specular 1\n" |
| 830 |
+ |
" roughness .001\n" |
| 831 |
+ |
" metallic\n" |
| 832 |
+ |
" }\n" |
| 833 |
+ |
" }\n" |
| 834 |
+ |
" }\n" |
| 835 |
+ |
"\n" |
| 836 |
+ |
" // 11\n" |
| 837 |
+ |
" cylinder{\n" |
| 838 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ+addZ >,\n" |
| 839 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 840 |
+ |
" pipeWidth\n" |
| 841 |
+ |
" texture{\n" |
| 842 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 843 |
+ |
" finish{\n" |
| 844 |
+ |
" ambient .2\n" |
| 845 |
+ |
" diffuse .6\n" |
| 846 |
+ |
" specular 1\n" |
| 847 |
+ |
" roughness .001\n" |
| 848 |
+ |
" metallic\n" |
| 849 |
+ |
" }\n" |
| 850 |
+ |
" }\n" |
| 851 |
+ |
" }\n" |
| 852 |
+ |
"\n" |
| 853 |
+ |
" // 12\n" |
| 854 |
+ |
" cylinder{\n" |
| 855 |
+ |
" < boxCenterX+addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 856 |
+ |
" < boxCenterX-addX, boxCenterY+addY, boxCenterZ-addZ >,\n" |
| 857 |
+ |
" pipeWidth\n" |
| 858 |
+ |
" texture{\n" |
| 859 |
+ |
" pigment{ rgb < colorR, colorG, colorB > }\n" |
| 860 |
+ |
" finish{\n" |
| 861 |
+ |
" ambient .2\n" |
| 862 |
+ |
" diffuse .6\n" |
| 863 |
+ |
" specular 1\n" |
| 864 |
+ |
" roughness .001\n" |
| 865 |
+ |
" metallic\n" |
| 866 |
+ |
" }\n" |
| 867 |
+ |
" }\n" |
| 868 |
+ |
" }\n" |
| 869 |
+ |
"\n" |
| 870 |
+ |
"#end\n" |
| 871 |
+ |
"\n" |
| 872 |
|
"\n"); |
| 873 |
< |
|
| 874 |
< |
|
| 873 |
> |
|
| 874 |
> |
|
| 875 |
> |
|
| 876 |
> |
|
| 877 |
|
make_header_macros(out_file); |
| 878 |
|
|
| 879 |
|
fclose(out_file); |
| 901 |
|
" -h draw hydrogens\n" |
| 902 |
|
" -b draw bonds\n" |
| 903 |
|
" -a draw atoms\n" |
| 904 |
+ |
" -p draw periodic box\n" |
| 905 |
|
" -r regenerate bond\n" |
| 906 |
+ |
" -f <#> render frame <#> only\n" |
| 907 |
+ |
" -s <#> begin at frame <#> (inclusive)\n" |
| 908 |
+ |
" -e <#> end at frame <#> (inclusive)\n" |
| 909 |
|
"\n", |
| 910 |
|
program_name); |
| 911 |
|
exit(8); |