********> bugfix.17 Author: Junmei Wang Date: 6/06/02 Programs: Antechamber Severity: Moderate Description: Gasteiger charges are not always correctly computed; double bonds in mol2 files are not read in correctly Fix: apply the following patch to amber7/src/antechamber/antechamber.c ------------------------------------------------------------- *** antechamber.c 2002/05/08 15:53:40 1.24 --- antechamber.c 2002/06/07 00:11:56 *************** *** 1246,1252 **** atom[tmpint5 - 1].con[atom[tmpint5 - 1].connum++] = tmpint4 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 1; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; --- 1246,1252 ---- atom[tmpint5 - 1].con[atom[tmpint5 - 1].connum++] = tmpint4 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 2; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; *************** *** 3013,3019 **** atom[tmpint5 - 1].con[atom[tmpint5 - 1].connum++] = tmpint4 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 1; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; --- 3013,3019 ---- atom[tmpint5 - 1].con[atom[tmpint5 - 1].connum++] = tmpint4 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 2; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; *************** *** 3297,3303 **** atom[tmpint4 - 1].con[atom[tmpint4 - 1].connum++] = tmpint3 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 1; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; --- 3297,3303 ---- atom[tmpint4 - 1].con[atom[tmpint4 - 1].connum++] = tmpint3 - 1; if(strcmp(type, "1") == 0) itype = 1; ! if(strcmp(type, "2") == 0) itype = 2; if(strcmp(type, "3") == 0) itype = 3; if(strcmp(type, "am") == 0) itype = 1; if(strcmp(type, "ar") == 0) itype = 10; *************** *** 4270,4284 **** xx = gas[gasparmindex[i]].a + gas[gasparmindex[i]].b + gas[gasparmindex[i]].c; q = (x[j] - x[i]) / xx * pow(DAMPFACTOR, iteration + 1); gaschargea[i] += q; gaschargea[j] -= q; ! } ! if (x[i] > x[j]) { xx = gas[gasparmindex[j]].a + gas[gasparmindex[j]].b + gas[gasparmindex[j]].c; q = (x[i] - x[j]) / xx * pow(DAMPFACTOR, iteration + 1); gaschargea[i] -= q; --- 4270,4285 ---- xx = gas[gasparmindex[i]].a + gas[gasparmindex[i]].b + gas[gasparmindex[i]].c; + if(atom[i].atomicnum == 1) xx = 20.02; q = (x[j] - x[i]) / xx * pow(DAMPFACTOR, iteration + 1); gaschargea[i] += q; gaschargea[j] -= q; ! } else { xx = gas[gasparmindex[j]].a + gas[gasparmindex[j]].b + gas[gasparmindex[j]].c; + if(atom[j].atomicnum == 1) xx = 20.02; q = (x[i] - x[j]) / xx * pow(DAMPFACTOR, iteration + 1); gaschargea[i] -= q; ------------------------------------------------------------- Workarounds: none Files affected: amber7/src/antechamber/antechamber.c