********> bugfix.26 Author: Bill Ross Date: 6/28/95 Programs: Carnal Severity: Moderate Problem: Program can crash when using TORSION BACKBONE Cause: Bookkeeping problems when molecule at end of system (e.g. an ion) is too small to have a torsion. Fix: Make the following change to pointax.c: ------------------------------------------------------------------ *** OLD pointax.c --- NEW pointax.c *************** *** 506,511 if (consecatom > 3) ndih += consecatom; } else { atomarray[iarr] = -1; resarray[iarr] = 0; if (consecatom > 3) --- 506,522 ----- if (consecatom > 3) ndih += consecatom; } else { + if (consecatom < 4) { + + /* + * not enough 4 torsion - back up + */ + + printf(" <4 main atoms in chain\n"); + iarr = iarr_first-1; + if (iarr < 0) iarr = 0; + iarr_last = iarr; + } atomarray[iarr] = -1; resarray[iarr] = 0; if (consecatom > 3) ------------------------------------------------------------------ Temporary workarounds: preprocess trajectory with COORD to remove small molecules at end before using BACKBONE Routines affected: BACKBONE --