Project

General

Profile

gmx_order.patch

patch to gmx_order.c - David van der Spoel, 06/03/2006 11:56 AM

View differences:

gmx_order.c 2006-06-03 11:40:26.000000000 +0200
532 532
  static int  nslices = 1;                    /* nr of slices defined       */
533 533
  static bool bSzonly = FALSE;                /* True if only Sz is wanted  */
534 534
  static bool bUnsat = FALSE;                 /* True if carbons are unsat. */
535
  static bool bDoTetraheder = FALSE;          /* True if the options -Sg or */
536
                                              /* -Sk are given */
537

  
535 538
  static char *normal_axis[] = { NULL, "z", "x", "y", NULL };
536 539
  t_pargs pa[] = {
537 540
    { "-d",      FALSE, etENUM, {normal_axis}, 
......
569 572
  };
570 573
  bool      bSliced = FALSE;                /* True if box is sliced      */
571 574
#define NFILE asize(fnm)
572
  char *sgfnm,*skfnm,*ndxfnm,*tpsfnm,*trxfnm;
575
  char *sgfnm=NULL,*skfnm=NULL,*ndxfnm,*tpsfnm,*trxfnm;
573 576

  
574 577
  CopyRight(stderr,argv[0]);
575 578
  
576 579
  parse_common_args(&argc,argv,PCA_CAN_VIEW | PCA_CAN_TIME | PCA_BE_NICE,
577 580
		    NFILE,fnm,asize(pa),pa,asize(desc),desc,0, NULL);
578

  
579
  sgfnm = opt2fn_null("-Sg",NFILE,fnm);
580
  skfnm = opt2fn_null("-Sk",NFILE,fnm);
581 581
  ndxfnm = ftp2fn(efNDX,NFILE,fnm);
582 582
  tpsfnm = ftp2fn(efTPX,NFILE,fnm);
583 583
  trxfnm = ftp2fn(efTRX,NFILE,fnm);
584 584
  
585
  if (opt2bSet("-Sg",NFILE,fnm) || opt2bSet("-Sk",NFILE,fnm)) {
586
    sgfnm = opt2fn_null("-Sg",NFILE,fnm);
587
    skfnm = opt2fn_null("-Sk",NFILE,fnm);
588
    bDoTetraheder = TRUE;
589
  }
590

  
585 591
  /* tetraheder order parameter */
586
  if (skfnm || sgfnm) {
592
  if (bDoTetraheder) {
587 593
    calc_tetra_order_parm(ndxfnm,tpsfnm,trxfnm,sgfnm,skfnm);
588 594
    /* view xvgr files */
589 595
    do_view(opt2fn("-Sg",NFILE,fnm), NULL);