10 |
|
#include "readWrite.h" |
11 |
|
#include "scdCorr.h" |
12 |
|
#include "directorHead.h" |
13 |
+ |
#include "directorWhole.h" |
14 |
|
|
15 |
|
|
16 |
|
#define VERSION_MAJOR 0 |
47 |
|
int scdCorr; |
48 |
|
double startTime; |
49 |
|
double maxLength; |
50 |
< |
int directorHead; |
50 |
> |
int directorHead, directorWhole; |
51 |
|
|
52 |
|
// system initialization |
53 |
|
|
66 |
|
scdCorr = 0; |
67 |
|
startTime = 0.0; |
68 |
|
directorHead = 0; |
69 |
+ |
directorWhole = 0; |
70 |
|
|
71 |
|
|
72 |
|
// parse the command line |
310 |
|
directorHead = 1; |
311 |
|
break; |
312 |
|
|
313 |
+ |
case 'w': |
314 |
+ |
// -h turn on director head |
315 |
|
|
316 |
+ |
directorWhole = 1; |
317 |
+ |
break; |
318 |
+ |
|
319 |
+ |
|
320 |
|
default: |
321 |
|
|
322 |
|
fprintf( stderr, |
364 |
|
for(i=0;i<nLipids;i++){ |
365 |
|
|
366 |
|
atoms[nLipAtoms*i+0].type = HEAD; |
367 |
+ |
atoms[nLipAtoms*i+0].mass = 72; |
368 |
|
atoms[nLipAtoms*i+0].u[0] = 0.0; |
369 |
|
atoms[nLipAtoms*i+0].u[1] = 0.0; |
370 |
|
atoms[nLipAtoms*i+0].u[2] = 1.0; |
371 |
|
|
372 |
+ |
|
373 |
|
|
374 |
|
atoms[nLipAtoms*i+1].type = CH2; |
375 |
+ |
atoms[nLipAtoms*i+1].mass = 14.03; |
376 |
|
|
377 |
|
atoms[nLipAtoms*i+2].type = CH; |
378 |
+ |
atoms[nLipAtoms*i+2].mass = 13.02; |
379 |
|
|
380 |
|
atoms[nLipAtoms*i+3].type = CH2; |
381 |
+ |
atoms[nLipAtoms*i+3].mass = 14.03; |
382 |
|
|
383 |
|
atoms[nLipAtoms*i+4].type = CH2; |
384 |
+ |
atoms[nLipAtoms*i+4].mass = 14.03; |
385 |
|
|
386 |
|
atoms[nLipAtoms*i+5].type = CH2; |
387 |
+ |
atoms[nLipAtoms*i+5].mass = 14.03; |
388 |
|
|
389 |
|
atoms[nLipAtoms*i+6].type = CH2; |
390 |
+ |
atoms[nLipAtoms*i+6].mass = 14.03; |
391 |
|
|
392 |
|
atoms[nLipAtoms*i+7].type = CH2; |
393 |
+ |
atoms[nLipAtoms*i+7].mass = 14.03; |
394 |
|
|
395 |
|
atoms[nLipAtoms*i+8].type = CH2; |
396 |
+ |
atoms[nLipAtoms*i+8].mass = 14.03; |
397 |
|
|
398 |
|
atoms[nLipAtoms*i+9].type = CH2; |
399 |
+ |
atoms[nLipAtoms*i+9].mass = 14.03; |
400 |
|
|
401 |
|
atoms[nLipAtoms*i+10].type = CH3; |
402 |
+ |
atoms[nLipAtoms*i+10].mass = 15.04; |
403 |
|
|
404 |
|
atoms[nLipAtoms*i+11].type = CH2; |
405 |
+ |
atoms[nLipAtoms*i+11].mass = 14.03; |
406 |
|
|
407 |
|
atoms[nLipAtoms*i+12].type = CH2; |
408 |
+ |
atoms[nLipAtoms*i+12].mass = 14.03; |
409 |
|
|
410 |
< |
atoms[nLipAtoms*i+13].type = CH2; |
410 |
> |
atoms[nLipAtoms*i+13].type = CH2; |
411 |
> |
atoms[nLipAtoms*i+13].mass = 14.03; |
412 |
|
|
413 |
|
atoms[nLipAtoms*i+14].type = CH2; |
414 |
+ |
atoms[nLipAtoms*i+14].mass = 14.03; |
415 |
|
|
416 |
|
atoms[nLipAtoms*i+15].type = CH2; |
417 |
+ |
atoms[nLipAtoms*i+15].mass = 14.03; |
418 |
|
|
419 |
|
atoms[nLipAtoms*i+16].type = CH2; |
420 |
+ |
atoms[nLipAtoms*i+16].mass = 14.03; |
421 |
|
|
422 |
|
atoms[nLipAtoms*i+17].type = CH2; |
423 |
+ |
atoms[nLipAtoms*i+17].mass = 14.03; |
424 |
|
|
425 |
|
atoms[nLipAtoms*i+18].type = CH3; |
426 |
+ |
atoms[nLipAtoms*i+18].mass = 15.04; |
427 |
|
} |
428 |
|
|
429 |
|
for(i=(nLipAtoms*nLipids);i<nAtoms;i++){ |
430 |
|
atoms[i].type = SSD; |
431 |
+ |
atoms[i].mass = 18.03; |
432 |
|
atoms[i].u[0] = 0.0; |
433 |
|
atoms[i].u[1] = 0.0; |
434 |
|
atoms[i].u[2] = 1.0; |
469 |
|
|
470 |
|
calcDirHeadCorr( startTime, atoms, outPrefix ); |
471 |
|
} |
472 |
+ |
|
473 |
+ |
if(directorWhole){ |
474 |
+ |
|
475 |
+ |
fprintf ( stdout, |
476 |
+ |
"Calculating the bilayer director\n" ); |
477 |
+ |
fflush( stdout ); |
478 |
+ |
|
479 |
+ |
calcDirWholeCorr( startTime, atoms, outPrefix ); |
480 |
+ |
} |
481 |
|
|
482 |
|
|
483 |
|
closeFile(); |
503 |
|
" -l <maxLength> set the maximum value of r\n" |
504 |
|
" *Defaults to 1/2 smallest length of first frame.\n" |
505 |
|
" -s Calculate the Scd chain correlation.\n" |
506 |
+ |
" -h Calculate the directors for the head groups\n" |
507 |
+ |
" -w Calculate the director fro the bilayers\n" |
508 |
|
"\n" |
509 |
|
" long:\n" |
510 |
|
" -----\n" |