********>Bugfix 1:
Author: Scott Brozell
Date: 03/25/2004

Programs: LEaP

Description: tleap and xleap may cause a segmentation fault when saving
             a prmtop file using a unit containing unbonded hydrogen atoms;
             the problem occurs when modified GB radii are requested.

Fix:  apply the following patch to amber8/src/leap/src/leap/unitio.c

------------------------------------------------------------------------------
*** unitio.c	10 Mar 2004 23:25:00 -0000	7.43
--- unitio.c	25 Mar 2004 20:20:49 -0000
***************
*** 5177,5202 ****
  					/* make the modifications that hydrogen radii
  					   depend upon the atom it is bonded to.  iGBparm=1
  					   corresponds to Amber 6, and JACS 122:2489 (2000);
! 					   iGBparm=2 adds the modifcation from Biopolymers
  					   56: 275 (2001)    */
  
! 					if( GDefaults.iGBparm == 1 || GDefaults.iGBparm == 2 ){
  						aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0);
! 						if( sAtomType(aAtomA)[0] == 'C' ||
! 						    sAtomType(aAtomA)[0] == 'c' ) dGBrad = 1.3;
! 						if( sAtomType(aAtomA)[0] == 'O' ||
! 						    sAtomType(aAtomA)[0] == 'o' ) dGBrad = 0.8;
! 						if( sAtomType(aAtomA)[0] == 'S' ||
! 						    sAtomType(aAtomA)[0] == 's' ) dGBrad = 0.8;
! 						if( (sAtomType(aAtomA)[0] == 'N' ||
! 						     sAtomType(aAtomA)[0] == 'n')  &&
! 							GDefaults.iGBparm == 2) dGBrad = 1.3;
  					}
! 
! 					if( GDefaults.iGBparm == 6 ){  /* try Alexey's scheme */
! 						aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0);
! 						if( sAtomType(aAtomA)[0] == 'N' ||
! 						     sAtomType(aAtomA)[0] == 'n' ) dGBrad = 1.3;
  					}
  
  					break;
--- 5177,5215 ----
  					/* make the modifications that hydrogen radii
  					   depend upon the atom it is bonded to.  iGBparm=1
  					   corresponds to Amber 6, and JACS 122:2489 (2000);
! 					   iGBparm=2 adds the modification from Biopolymers
  					   56: 275 (2001)    */
  
! 					if( iAtomCoordination(saPAtom->aAtom) > 0 ) {
! 						/* For multiply bonded Hydrogen atoms use the first
! 						* bond for determining modified GB radii.
! 						* WAT contains multiply bonded Hydrogen atoms 
! 						* so do not emit a warning. */
  						aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0);
! 						if( GDefaults.iGBparm == 1 || GDefaults.iGBparm == 2 ){
! 							if( sAtomType(aAtomA)[0] == 'C' ||
! 								sAtomType(aAtomA)[0] == 'c' ) dGBrad = 1.3;
! 							if( sAtomType(aAtomA)[0] == 'O' ||
! 								sAtomType(aAtomA)[0] == 'o' ) dGBrad = 0.8;
! 							if( sAtomType(aAtomA)[0] == 'S' ||
! 								sAtomType(aAtomA)[0] == 's' ) dGBrad = 0.8;
! 							if( (sAtomType(aAtomA)[0] == 'N' ||
! 								sAtomType(aAtomA)[0] == 'n')  &&
! 								GDefaults.iGBparm == 2) dGBrad = 1.3;
! 						}
! 						else if( GDefaults.iGBparm == 6 ){ 
! 							/* try Alexey's scheme */
! 							if( sAtomType(aAtomA)[0] == 'N' ||
! 								sAtomType(aAtomA)[0] == 'n' ) dGBrad = 1.3;
! 						}
  					}
! 					else {
! 						VP0(( "WARNING: Unbonded Hydrogen atom %s in %s.\n"
! 								" Cannot determine the requested GB radius"
! 								" for this atom.\n"
! 								" Writing the unmodified Bondi GB radius.\n",
! 								saPAtom->aAtom->cHeader.sName,
! 								saPAtom->aAtom->cHeader.cContainedBy->sName ));
  					}
  
  					break;
------------------------------------------------------------------------------

Temporary workarounds: use the unmodified Bondi GB radii via the command
                       set default PBradii bondi