********> bugfix.23 Author: Bill Ross Date: 6/12/95 Programs: Carnal Severity: slight Problem: incorrect candidate hydrogen bond donors can be identified, generating superfluous output Affects: HBOND option with '94 force field Cause: Carnal relies on hard-coded force field information when identifying hbonding atoms. A new hydrogen type (H2) slipped through. Note: Because Carnal depends on the force field, this problem could always affect user-created atom types. Always check your output, and don't create bondable non-carbon types beginning with 'C'! Fix: Make the following change to hbond.c ----------------------------------------------------------------------- *** OLD hbond.c --- NEW hbond.c *************** *** 622,627 } /* * compare the bonded H to list of 'wrong' H types * (HC, H4) which is shorter than list of * 'right' types (H, HS, HO, HW, H3, H2) --- 622,635 ----- } /* + * as a quick test, rule out any donors that + * are carbon.. 1st char 'C' does the + * job for bondable atoms in '91, '94 force fields + */ + if (AtomSym[ATOMTOKLEN * hat] == 'C') + continue; + + /* * compare the bonded H to list of 'wrong' H types * (HC, H2, H4) which is shorter than list of * 'right' types (H, HS, HO, HW, H3, H2) *************** *** 623,629 /* * compare the bonded H to list of 'wrong' H types ! * (HC, H4) which is shorter than list of * 'right' types (H, HS, HO, HW, H3, H2) */ --- 631,637 ----- /* * compare the bonded H to list of 'wrong' H types ! * (HC, H2, H4) which is shorter than list of * 'right' types (H, HS, HO, HW, H3, H2) */ *************** *** 629,635 hatch = AtomSym[ATOMTOKLEN * hyd + 1]; ! if (hatch == 'C' || hatch == '4') continue; /* --- 637,643 ----- hatch = AtomSym[ATOMTOKLEN * hyd + 1]; ! if (hatch == 'C' || hatch == '2' || hatch == '4') continue; /* ----------------------------------------------------------------------- Temporary workarounds: restrict donor atoms considered to reasonable ones using GROUP --