********>Bugfix 8:
Authors: Junmei Wang
Date: 05/05/2004
Programs: antechamber
Description: When the input is a mol2 file ("-fi mol2") antechamber, and
the "-j 5" flag is also set, antechamber can give the
wrong atom types or charges.
Fix: Apply the following patch to $AMBERHOME/src/antechamber/bondtype.C
------------------------------------------------------------------------------
*** bondtype.C 2004/04/28 23:30:19 1.8
--- bondtype.C 2004/05/04 23:21:46
***************
*** 49,54 ****
--- 49,55 ----
int *va_best;
int *conjatom;
int maxaps;
+ int judge_flag = 0;
struct Point {
int addr;
***************
*** 731,739 ****
{
int i, j, k;
int bondi, bondj;
! int flag, flag1, flag2;
int num;
int index[6];
for (i = 0; i < bondnum; i++) {
bondi = bond[i].bondi;
bondj = bond[i].bondj;
--- 732,762 ----
{
int i, j, k;
int bondi, bondj;
! int flag, flag0, flag1, flag2 ;
int num;
int index[6];
+ if (judge_flag == 0) {
+ for (i = 0; i < bondnum; i++) {
+ if(bond[i].type != 10)
+ continue;
+ bondi = bond[i].bondi;
+ bondj = bond[i].bondj;
+ flag0 = 0;
+ for (j = 0; j < bondnum; j++) {
+ if(i==j) continue;
+ if(bond[j].bondi == bondi || bond[j].bondj == bondi ||
+ bond[j].bondi == bondj || bond[j].bondj == bondj)
+ if(bond[j].type == 2 || bond[j].type == 8) {
+ flag0 = 1;
+ break;
+ }
+ }
+ if(flag0 == 0)
+ bond[i].type = 8;
+ else
+ bond[i].type = 7;
+ }
+ }
for (i = 0; i < bondnum; i++) {
bondi = bond[i].bondi;
bondj = bond[i].bondj;
***************
*** 883,889 ****
int tmpint1, tmpint2;
int tmp_addr, tmp_penalty, tmp_valence;
int flag = 0;
- int judge_flag = 0;
if (strcmp(COLORTEXT, "YES") == 0 || strcmp(COLORTEXT, "yes") == 0) {
if (argc == 2
--- 906,911 ----
------------------------------------------------------------------------------
Temporary workarounds: use pdb format files as input to antechamber, rather
than mol2 files