130 |
|
initialize(); |
131 |
|
nret = rd_sdf(infile); |
132 |
|
if (-1 == nret) return ; |
133 |
< |
if (FALSE == nret) { |
133 |
> |
if (FALSE == nret) |
134 |
> |
{ |
135 |
|
fprintf(logfile,"Strnum: %d Cannot handle aromatic bonds. Try Kekule version.\n",i); |
136 |
|
goto L_10; |
137 |
|
natom = 0; |
138 |
< |
} |
138 |
> |
} |
139 |
|
|
140 |
|
if (natom == 1) |
141 |
|
{ |
142 |
|
fprintf(logfile,"Strnum: %d has only one atom\n",i); |
143 |
|
goto L_10; |
144 |
|
} |
144 |
– |
// if (i%20 == 0) |
145 |
– |
// printf("Strnum: %d\n",files.nfiles); |
145 |
|
if (nret == TRUE) |
146 |
|
{ |
148 |
– |
nc = close_contact(1); |
149 |
– |
if (nc == FALSE) |
150 |
– |
{ |
151 |
– |
fprintf(logfile,"Strnum: %d CID: %s fails on bad contact\n",files.nfiles,Struct_Title); |
152 |
– |
strcpy(Savebox.fname,bad_contact); |
153 |
– |
sprintf(Struct_Title,"Bad Contact %d\n",i); |
154 |
– |
files.append = TRUE; |
155 |
– |
if (bcontact == FALSE) |
156 |
– |
{ |
157 |
– |
files.append = FALSE; |
158 |
– |
bcontact = TRUE; |
159 |
– |
} |
160 |
– |
nbcontact++; |
161 |
– |
//write_sdf(flags); |
162 |
– |
//strcpy(Savebox.fname,std_file); |
163 |
– |
goto L_10; |
164 |
– |
} |
165 |
– |
ncount = natom; |
166 |
– |
for (j=1; j<= ncount; j++) |
167 |
– |
{ |
168 |
– |
jj = 0; |
169 |
– |
if (atom[j].atomnum == 1) // bridging hydrogens |
170 |
– |
{ |
171 |
– |
if (atom[j].iat[0] != 0 && atom[j].iat[1] != 0) |
172 |
– |
goto L_10; |
173 |
– |
} |
174 |
– |
} |
175 |
– |
// TJO |
176 |
– |
if (flags & DO_ADDH) { |
177 |
– |
hdel(0); |
178 |
– |
hadd(); |
179 |
– |
} |
180 |
– |
type(); |
181 |
– |
// TJO |
182 |
– |
if (flags & DO_ADDH) { |
183 |
– |
hdel(0); |
184 |
– |
} |
185 |
– |
nret = setup_calculation(); |
186 |
– |
if (nret == TRUE) |
187 |
– |
minimize(); |
188 |
– |
end_calculation(); |
189 |
– |
|
190 |
– |
// minim_control.method = 3; |
147 |
|
// TJO |
148 |
< |
if (flags & DO_ADDH) { |
148 |
> |
if (flags & DO_ADDH) |
149 |
> |
{ |
150 |
|
hdel(0); |
151 |
|
hadd(); |
152 |
|
} |
153 |
|
type_mmx(); |
154 |
|
|
155 |
+ |
// minim_values.iprint = TRUE; |
156 |
|
nret = setup_calculation(); |
157 |
+ |
// if (minim_values.iprint == TRUE) exit(0); |
158 |
|
if (nret == TRUE) |
159 |
|
{ |
160 |
|
minimize(); |