********> bugfix.10 Author: Dave Case Date: 07/17/2009 Programs: tleap Description: fix up the residue numbers in loadMol2 if the input mol2 file has residue numbers outside the range 1 to number of substructures. Usage: Use this patch to update amber10/src/leap/src/leap/tripos.c ------------------------------------------------------------------------------ --- tripos.c 15 Apr 2008 23:22:21 -0000 10.0 +++ tripos.c 7 Jul 2009 20:04:46 -0000 @@ -182,6 +182,11 @@ if (iRet != 9) break; + /* don't allow the residue number to be greater than no. of + substructures, nor less than 1: */ + iResidue = iResidue > iFileSubstructures ? iFileSubstructures : iResidue; + iResidue = iResidue < 1 ? 1 : iResidue; + MESSAGE((" Atom: %s\n", sName)); aAtom = (ATOM) oCreate(ATOMid); ContainerSetName(aAtom, sName); ------------------------------------------------------------------------------ Workarounds: none