********>Bugfix 24:
Author: John Mongan
Date: 09/01/2004

Programs: ptraj

Description: When the grid command is used, blank lines will be mistakenly
             entered into the output if the number of cells in a plane is
             divisible by 6.  Also, the command will fail if the "box" option
             is set.

Fix:  apply the following patch to amber8/src/ptraj/actions.c

------------------------------------------------------------------------------
*** actions.c	2004/08/08 17:33:40	1.36
--- actions.c	2004/09/01 20:54:26
***************
*** 4405,4413 ****
        action->iarg1 = 0;
  
      if (action->iarg1 == 1 &&
! 	(action->state->box[3] != 90.0 || box[3] != 90.0 ||
! 	 action->state->box[4] != 90.0 || box[4] != 90.0 ||
! 	 action->state->box[5] != 90.0 || box[5] != 90.0)) {
        fprintf(stdout, "WARNING in ptraj() dipole: Code to shift to the box center\n");
        fprintf(stdout, "is not implemented yet in transformDipole for non-orthorhomibic\n");
        fprintf(stdout, "unit cells.  Shifting to the origin instead!!!\n");
--- 4405,4413 ----
        action->iarg1 = 0;
  
      if (action->iarg1 == 1 &&
! 	(action->state->box[3] != 90.0 ||
! 	 action->state->box[4] != 90.0 || 
! 	 action->state->box[5] != 90.0 )) {
        fprintf(stdout, "WARNING in ptraj() dipole: Code to shift to the box center\n");
        fprintf(stdout, "is not implemented yet in transformDipole for non-orthorhomibic\n");
        fprintf(stdout, "unit cells.  Shifting to the origin instead!!!\n");
***************
*** 4505,4511 ****
  	  if ( gridInfo->grid[index] > gridMax )
  	    gridMax = gridInfo->grid[index];
  	}
! 	if ( c % 6 != 0 ) 
  	  fprintf(outFile, "\n");
        }
      } 
--- 4505,4511 ----
  	  if ( gridInfo->grid[index] > gridMax )
  	    gridMax = gridInfo->grid[index];
  	}
! 	if ( (c-1) % 6 != 0 )   /* unless a newline was just written.. */
  	  fprintf(outFile, "\n");
        }
      } 
------------------------------------------------------------------------------

Temporary workarounds: none.