37 |
|
int nnit,nnh,nc,no,nox,nitatom; |
38 |
|
int ktype,jtype, jjik; |
39 |
|
int adjn, nplus, adjn1, noxide, icurr; |
40 |
< |
int mmxtype,mm3type,mmfftype,ambertype,oplstype, ia, ib, ia1, ib1; |
40 |
> |
int mmxtype,mm3type,mmfftype, ia, ib, ia1, ib1; |
41 |
|
int ndouble, ntriple; |
42 |
|
int icycl3, icycl4, icycl5, icycl6; |
43 |
|
int full_ring, non_pi; |
70 |
|
mmxtype = atom[i].mmx_type; |
71 |
|
mm3type = atom[i].mm3_type; |
72 |
|
mmfftype = atom[i].mmff_type; |
73 |
– |
ambertype = atom[i].amber_type; |
74 |
– |
oplstype = atom[i].opls_type; |
73 |
|
if (atom[i].atomnum != 0 && !(atom[i].flags & type_mask) ) |
74 |
|
{ |
75 |
|
if (mmxtype == 100 || mmxtype == 101 || mmxtype == 102 || mmxtype == 103 ) // user defined type |
84 |
|
mmxtype = 60; |
85 |
|
mm3type = 200; |
86 |
|
mmfftype = 5; |
89 |
– |
ambertype = 33; |
90 |
– |
oplstype = 29; |
87 |
|
goto L_10; |
88 |
|
} |
89 |
|
if (atom[i].mmx_type == 45) // TS H |
91 |
|
mmxtype = 45; |
92 |
|
mm3type = 0; |
93 |
|
mmfftype = 0; |
98 |
– |
ambertype = 33; |
94 |
|
goto L_10; |
95 |
|
} |
96 |
|
if (atom[i].mmx_type == 36) // Deuterium |
98 |
|
mmxtype = 36; |
99 |
|
mm3type = 36; |
100 |
|
mmfftype = 5; |
106 |
– |
ambertype = 33; |
101 |
|
goto L_10; |
102 |
|
} |
103 |
|
jji = 0; |
116 |
|
mmxtype = 5; |
117 |
|
mm3type = 5; |
118 |
|
mmfftype = 5; |
125 |
– |
ambertype = 34; |
126 |
– |
oplstype = 29; |
119 |
|
jatm = atom[i].iat[0]; |
120 |
|
for (j=0; j < 3; j++) // Acetylene |
121 |
|
{ |
122 |
|
if (atom[jatm].bo[j] == 3) |
123 |
|
{ |
124 |
|
mm3type = 124; |
133 |
– |
oplstype = 33; |
125 |
|
goto L_10; |
126 |
|
} |
127 |
|
} |
137 |
– |
for (j=0; j < MAXIAT; j++) // ammonium |
138 |
– |
{ |
139 |
– |
if (atom[jatm].iat[j] != 0 && atom[atom[jatm].iat[j]].atomnum == 7) |
140 |
– |
{ |
141 |
– |
jjik = 0; |
142 |
– |
katm = atom[jatm].iat[j]; |
143 |
– |
for (k=0; k < MAXIAT; k++) |
144 |
– |
{ |
145 |
– |
if (atom[katm].iat[j] != 0) |
146 |
– |
jjik++; |
147 |
– |
} |
148 |
– |
if (jjik == 4) // H-C-N+ |
149 |
– |
{ |
150 |
– |
ambertype = 38; |
151 |
– |
goto L_10; |
152 |
– |
} |
153 |
– |
} |
154 |
– |
} |
155 |
– |
for (j=0; j < MAXIAT; j++) |
156 |
– |
{ |
157 |
– |
if (atom[jatm].bo[j] == 2 && !(atom[jatm].flags && aromatic_mask) ) |
158 |
– |
{ |
159 |
– |
if (atom[atom[jatm].iat[j]].atomnum == 6) |
160 |
– |
oplstype = 30; |
161 |
– |
else if (atom[atom[jatm].iat[j]].atomnum == 7) |
162 |
– |
oplstype = 31; |
163 |
– |
goto L_10; |
164 |
– |
} |
165 |
– |
if (atom[jatm].bo[j] == 2 && atom[atom[jatm].iat[j]].atomnum == 8 ) |
166 |
– |
{ |
167 |
– |
oplstype = 32; |
168 |
– |
goto L_10; |
169 |
– |
} |
170 |
– |
} |
171 |
– |
jji = 0; |
172 |
– |
nnit = 0; |
173 |
– |
nitatom = 0; |
174 |
– |
for (j=0; j < MAXIAT; j++) |
175 |
– |
{ |
176 |
– |
if (atom[jatm].iat[j] != 0 && atom[atom[jatm].iat[j]].bo[j] != 9 && atom[atom[jatm].iat[j]].mmx_type != 20) |
177 |
– |
jji++; |
178 |
– |
if (atom[atom[jatm].iat[j]].atomnum == 7 || atom[atom[jatm].iat[j]].atomnum == 8 || |
179 |
– |
atom[atom[jatm].iat[j]].atomnum == 16) |
180 |
– |
{ |
181 |
– |
nnit++; |
182 |
– |
nitatom = atom[jatm].iat[j]; |
183 |
– |
} |
184 |
– |
} |
185 |
– |
if ( jji == 3 && nnit == 2) |
186 |
– |
{ |
187 |
– |
ambertype = 40; // H5 |
188 |
– |
oplstype = 43; |
189 |
– |
} else if ( jji == 4 && nnit == 2) |
190 |
– |
{ |
191 |
– |
ambertype = 36; // H2 |
192 |
– |
oplstype = 29; |
193 |
– |
} else if ( jji == 3 && nnit == 1) |
194 |
– |
{ |
195 |
– |
ambertype = 39; // H4 |
196 |
– |
oplstype = 42; |
197 |
– |
jjk = 0; |
198 |
– |
for (j=0; j < MAXIAT; j++) |
199 |
– |
{ |
200 |
– |
if (atom[nitatom].iat[j] != 0 && atom[atom[nitatom].iat[j]].mmx_type != 20) |
201 |
– |
jjk++; |
202 |
– |
} |
203 |
– |
if (jjk == 2) |
204 |
– |
oplstype = 34; |
205 |
– |
}else if ( jji == 4 && nnit == 1) |
206 |
– |
{ |
207 |
– |
ambertype = 35; // H1 |
208 |
– |
oplstype = 29; |
209 |
– |
}else if ( jji == 3 && nnit == 0) |
210 |
– |
{ |
211 |
– |
ambertype = 33; // HA |
212 |
– |
oplstype = 34; |
213 |
– |
}else if ( jji == 4 && nnit == 0) |
214 |
– |
{ |
215 |
– |
ambertype = 34; // HC |
216 |
– |
oplstype = 29; |
217 |
– |
}else if ( jji == 4 && nnit == 3) |
218 |
– |
{ |
219 |
– |
ambertype = 37; // H3 |
220 |
– |
oplstype = 29; |
221 |
– |
} |
128 |
|
goto L_10; |
129 |
|
} else if (atom[atom[i].iat[0]].atomnum == 7) // nitrogen |
130 |
|
{ |
136 |
|
mmxtype = 23; |
137 |
|
mm3type = 23; |
138 |
|
mmfftype = 23; |
233 |
– |
ambertype = 29; |
234 |
– |
oplstype = 38; |
139 |
|
for (j=0; j < MAXIAT; j++) |
140 |
|
{ |
141 |
|
if (atom[jatm].iat[j] != 0 && atom[atom[jatm].iat[j]].mmx_type != 20 ) |
167 |
|
mm3type = 23; |
168 |
|
} |
169 |
|
mmfftype = 36; |
266 |
– |
oplstype = 40; |
170 |
|
if (noxide == TRUE) |
171 |
|
mmfftype = 23; |
172 |
|
goto L_10; |
176 |
|
mmxtype = 23; |
177 |
|
mm3type = 23; |
178 |
|
mmfftype = 23; |
276 |
– |
oplstype = 38; |
179 |
|
if (is_cyclo5(jatm,array) ) |
180 |
|
{ |
181 |
|
jjk = 0; |
267 |
|
mmxtype = 23; |
268 |
|
mm3type = 28; |
269 |
|
mmfftype = 28; |
368 |
– |
oplstype = 39; |
270 |
|
goto L_10; |
271 |
|
} else if (atom[atom[katm].iat[k]].atomnum == 6 || atom[atom[katm].iat[k]].atomnum == 7) |
272 |
|
{ |
295 |
|
mmxtype = 21; |
296 |
|
mm3type = 21; |
297 |
|
mmfftype = 21; |
397 |
– |
ambertype = 31; |
398 |
– |
oplstype = 36; |
298 |
|
jatm = atom[i].iat[0]; |
299 |
|
if (atom[jatm].iat[0] != i) |
300 |
|
katm = atom[jatm].iat[0]; |
311 |
|
mmxtype = 21; |
312 |
|
mm3type = 21; |
313 |
|
mmfftype = 31; |
415 |
– |
ambertype = 30; |
416 |
– |
oplstype = 41; |
314 |
|
goto L_10; |
315 |
|
} else if (atom[katm].atomnum == 1 && jji == 3) // h3o+ |
316 |
|
{ |
317 |
|
mmxtype = 24; |
318 |
|
mm3type = 21; |
319 |
|
mmfftype = 50; |
423 |
– |
ambertype = 31; |
424 |
– |
oplstype = 36; |
320 |
|
goto L_10; |
321 |
|
} |
322 |
|
if (atom[katm].atomnum == 15) // h-o-p |
324 |
|
mmxtype = 24; |
325 |
|
mm3type = 24; |
326 |
|
mmfftype = 24; |
432 |
– |
ambertype = 31; |
433 |
– |
oplstype = 36; |
327 |
|
goto L_10; |
328 |
|
} |
329 |
|
if (atom[katm].atomnum == 16) // h-o-s |
331 |
|
mmxtype = 24; |
332 |
|
mm3type = 24; |
333 |
|
mmfftype = 33; |
441 |
– |
ambertype = 31; |
442 |
– |
oplstype = 36; |
334 |
|
goto L_10; |
335 |
|
} |
336 |
|
jji = 0; |
344 |
|
mmxtype = 24; |
345 |
|
mm3type = 21; |
346 |
|
mmfftype = 50; |
456 |
– |
ambertype = 31; |
347 |
|
goto L_10; |
348 |
|
} |
349 |
|
for (j=0; j < MAXIAT; j++) |
355 |
|
mmxtype = 24; |
356 |
|
mm3type = 24; |
357 |
|
mmfftype = 24; |
468 |
– |
ambertype = 31; |
358 |
|
goto L_10; |
359 |
|
} |
360 |
|
} |
366 |
|
mmxtype = 28; |
367 |
|
mm3type = 73; |
368 |
|
mmfftype = 29; |
480 |
– |
ambertype = 31; |
369 |
|
goto L_10; |
370 |
|
} |
371 |
|
} |
392 |
|
mmxtype = 23; |
393 |
|
mm3type = 5; |
394 |
|
mmfftype = 71; |
507 |
– |
ambertype = 32; |
508 |
– |
oplstype = 37; |
395 |
|
goto L_10; |
396 |
|
} else if (atom[atom[i].iat[0]].atomnum == 9 || atom[atom[i].iat[0]].atomnum == 17 || |
397 |
|
atom[atom[i].iat[0]].atomnum == 35 || atom[atom[i].iat[0]].atomnum == 53) // halogens |
399 |
|
mmxtype = 21; |
400 |
|
mm3type = 5; |
401 |
|
mmfftype = 71; |
516 |
– |
ambertype = 32; |
517 |
– |
oplstype = 37; |
402 |
|
goto L_10; |
403 |
|
} else if (atom[atom[i].iat[0]].atomnum == 16) // sulfur |
404 |
|
{ |
405 |
|
mmxtype = 21; |
406 |
|
mm3type = 5; |
407 |
|
mmfftype = 71; |
524 |
– |
ambertype = 32; |
525 |
– |
oplstype = 37; |
408 |
|
goto L_10; |
409 |
|
} else if (atom[atom[i].iat[0]].atomnum == 15) // phosphorous |
410 |
|
{ |
411 |
|
mmxtype = 23; |
412 |
|
mm3type = 5; |
413 |
|
mmfftype = 71; |
532 |
– |
ambertype = 0; |
533 |
– |
oplstype = 36; |
414 |
|
goto L_10; |
415 |
|
} else // bridging hydrogens |
416 |
|
{ |
426 |
|
mmxtype = 5; |
427 |
|
mm3type = 5; |
428 |
|
mmfftype = 5; |
549 |
– |
ambertype = 31; |
429 |
|
} |
430 |
|
goto L_10; |
431 |
|
} |
492 |
|
mmxtype = 29; |
493 |
|
mm3type = 29; |
494 |
|
mmfftype = 0; |
616 |
– |
ambertype = 0; |
617 |
– |
oplstype = 0; |
495 |
|
goto L_10; |
496 |
|
} else if (mmxtype == 30) // C cation |
497 |
|
{ |
498 |
|
mmxtype = 30; |
499 |
|
mm3type = 30; |
500 |
|
mmfftype = 0; |
624 |
– |
ambertype = 0; |
625 |
– |
oplstype = 0; |
501 |
|
goto L_10; |
502 |
|
} else if (mmxtype == 48) // C anion |
503 |
|
{ |
504 |
|
mmxtype = 48; |
505 |
|
mm3type = 0; |
506 |
|
mmfftype = 0; |
632 |
– |
ambertype = 0; |
633 |
– |
oplstype = 0; |
507 |
|
goto L_10; |
508 |
|
} else if (mmxtype == 40) // aromatic carbon |
509 |
|
{ |
510 |
|
mmxtype = 40; |
511 |
|
mm3type = 50; |
512 |
|
mmfftype = 37; |
640 |
– |
ambertype = 3; |
641 |
– |
oplstype = 7; |
513 |
|
goto L_10; |
514 |
|
} else if (mmxtype == 49 || mmxtype == 50 || mmxtype == 51 || mmxtype == 52) // TS atoms |
515 |
|
{ |
516 |
|
mm3type = 0; |
517 |
|
mmfftype = 0; |
647 |
– |
ambertype = 0; |
648 |
– |
oplstype = 0; |
518 |
|
goto L_10; |
519 |
|
} |
520 |
|
// check rings |
545 |
|
mmxtype = 2; |
546 |
|
mm3type = 2; |
547 |
|
mmfftype = 78; |
679 |
– |
ambertype = 11; |
680 |
– |
oplstype = 11; |
548 |
|
goto L_10; |
549 |
|
} |
550 |
|
// |
572 |
|
mm3type = 2; |
573 |
|
for (ij=0; ij < icycl5; ij++) |
574 |
|
{ |
708 |
– |
// do ambertypes first |
709 |
– |
nh = 0; |
710 |
– |
nnit = 0; |
711 |
– |
nnh = 0; |
712 |
– |
for (j=0; j < MAXIAT; j++) |
713 |
– |
{ |
714 |
– |
if (atom[atom[i].iat[j]].atomnum == 1) |
715 |
– |
nh++; |
716 |
– |
else if (atom[atom[i].iat[j]].atomnum == 7) |
717 |
– |
{ |
718 |
– |
nnit++; |
719 |
– |
for(k=0; k < MAXIAT; k++) |
720 |
– |
{ |
721 |
– |
if (atom[atom[atom[i].iat[j]].iat[k]].atomnum == 1) |
722 |
– |
nnh++; |
723 |
– |
} |
724 |
– |
} |
725 |
– |
} |
726 |
– |
if (nh ==1 && nnit == 2 && nnh == 1) |
727 |
– |
{ |
728 |
– |
ambertype = 8; |
729 |
– |
oplstype = 15; |
730 |
– |
}else if (nh == 1 && nnh == 1) |
731 |
– |
{ |
732 |
– |
ambertype = 7; |
733 |
– |
oplstype = 12; |
734 |
– |
}else if (nh == 1 && nnit == 1) |
735 |
– |
{ |
736 |
– |
ambertype = 6; |
737 |
– |
oplstype = 13; |
738 |
– |
}else if (nh == 1 && nnit == 2 && nnh == 0) |
739 |
– |
{ |
740 |
– |
ambertype = 12; |
741 |
– |
oplstype = 18; |
742 |
– |
} else if (nh == 0 && nnit == 1) |
743 |
– |
{ |
744 |
– |
ambertype = 5; |
745 |
– |
oplstype = 12; |
746 |
– |
} else if (nh == 0 && nnit == 0) |
747 |
– |
{ |
748 |
– |
ambertype = 10; |
749 |
– |
oplstype = 17; |
750 |
– |
} |
575 |
|
// do mmff types |
576 |
|
get_rsize(i,5,ij,array); |
577 |
|
if (aromatic_5(ij,array)) |
648 |
|
} |
649 |
|
} |
650 |
|
} |
827 |
– |
if (atom[array[ia]].atomnum == 7 && atom[array[ib]].atomnum == 6) // n=c-c |
828 |
– |
{ |
829 |
– |
oplstype = 23; |
830 |
– |
// goto L_10; |
831 |
– |
} else if (atom[array[ia]].atomnum == 6 && atom[array[ib]].atomnum == 7) // n=c-c |
832 |
– |
{ |
833 |
– |
oplstype = 23; |
834 |
– |
// goto L_10; |
835 |
– |
} |
651 |
|
if (nplus == TRUE) // found N+ in ring |
652 |
|
{ |
653 |
|
noxide = FALSE; |
773 |
|
atom[array[ia]].atomnum == 16 || atom[array[ib]].atomnum == 16 ) |
774 |
|
{ |
775 |
|
mmfftype = 63; |
961 |
– |
oplstype = 14; |
776 |
|
goto L_10; |
777 |
|
} |
778 |
|
// check beta |
812 |
|
atom[array[ia]].atomnum == 16 || atom[array[ib]].atomnum == 16 ) |
813 |
|
{ |
814 |
|
mmfftype = 64; |
1001 |
– |
oplstype = 22; |
1002 |
– |
nnit = 0; |
1003 |
– |
for (j=0; j < 5; j++) |
1004 |
– |
{ |
1005 |
– |
if (atom[array[j]].atomnum != 6) |
1006 |
– |
nnit++; |
1007 |
– |
} |
1008 |
– |
if (nnit > 1) |
1009 |
– |
oplstype = 7; |
815 |
|
goto L_10; |
816 |
|
} |
817 |
|
} |
841 |
|
} |
842 |
|
if (full_ring == FALSE) mmfftype = 2; |
843 |
|
// |
1039 |
– |
ambertype = 3; |
1040 |
– |
oplstype = 7; |
1041 |
– |
nh = 0; |
1042 |
– |
nnit = 0; |
1043 |
– |
no = 0; |
1044 |
– |
for (j=0; j < MAXIAT; j++) |
1045 |
– |
{ |
1046 |
– |
if (atom[atom[i].iat[j]].atomnum == 1) |
1047 |
– |
nh++; |
1048 |
– |
else if (atom[atom[i].iat[j]].atomnum == 7) |
1049 |
– |
nnit++; |
1050 |
– |
else if (atom[atom[i].iat[j]].atomnum == 8) |
1051 |
– |
no++; |
1052 |
– |
} |
1053 |
– |
if (nh ==1 && nnit == 2) |
1054 |
– |
{ |
1055 |
– |
ambertype = 13; |
1056 |
– |
oplstype = 19; |
1057 |
– |
goto L_10; |
1058 |
– |
} |
1059 |
– |
if (no == 1) |
1060 |
– |
{ |
1061 |
– |
ambertype = 2; // tyrosine ring |
1062 |
– |
oplstype = 7; |
1063 |
– |
goto L_10; |
1064 |
– |
} |
1065 |
– |
if (jji == 3) // aromatic carbon from pdb file |
1066 |
– |
{ |
1067 |
– |
ambertype = 3; |
1068 |
– |
oplstype = 7; |
1069 |
– |
goto L_10; |
1070 |
– |
} |
844 |
|
} |
845 |
|
if (icycl3 >= 1 ) |
846 |
|
{ |
871 |
|
mmxtype = 4; |
872 |
|
mm3type = 4; |
873 |
|
mmfftype = 4; |
1101 |
– |
ambertype = 0; |
1102 |
– |
oplstype = 24; |
874 |
|
if (jji == 1 && atom[atom[i].iat[0]].atomnum == 7) |
875 |
|
{ |
876 |
|
mmfftype = 60; // isonitrile carbon |
1106 |
– |
oplstype = 0; |
877 |
|
} |
878 |
|
if ( (atom[atom[i].iat[0]].mmx_type >= 300) && |
879 |
|
atom[atom[i].iat[1]].mmx_type == 46) |
895 |
|
goto L_10; |
896 |
|
} |
897 |
|
} |
1128 |
– |
if (atom[atom[i].iat[0]].atomnum == 1 || atom[atom[i].iat[1]].atomnum == 1) |
1129 |
– |
oplstype = 24; |
898 |
|
goto L_10; |
899 |
|
} |
900 |
|
if (ndouble == 2) // allenes and ketenes |
902 |
|
mmxtype = 4; |
903 |
|
mm3type = 68; |
904 |
|
mmfftype = 4; |
1137 |
– |
ambertype = 0; |
905 |
|
for (j=0; j < MAXIAT; j++) // metal carbene |
906 |
|
{ |
907 |
|
if ( atom[atom[i].iat[j]].mmx_type >= 300) |
927 |
|
mmxtype = 2; |
928 |
|
mm3type = 2; |
929 |
|
mmfftype = 3; |
1163 |
– |
oplstype = 10; |
930 |
|
goto L_10; |
931 |
|
} |
932 |
|
if (atom[jatm].atomnum == 16) // c=s |
934 |
|
mmxtype = 2; |
935 |
|
mm3type = 2; |
936 |
|
mmfftype = 3; |
1171 |
– |
ambertype = 3; |
1172 |
– |
oplstype = 10; |
937 |
|
for (k=0; k < MAXIAT; k++) |
938 |
|
{ |
939 |
|
if (atom[i].iat[k] != 0 && atom[i].bo[k] != 9) |
962 |
|
mmxtype = 3; |
963 |
|
mm3type = 3; |
964 |
|
mmfftype = 3; |
1201 |
– |
ambertype = 2; |
1202 |
– |
oplstype = 5; |
965 |
|
if (is_cyclo3(i,array)) // cyclopropanone |
966 |
|
mm3type = 67; |
967 |
|
else if (is_cyclo4(i,array)) // cyclobutanone |
984 |
|
if (jjk == 1) |
985 |
|
{ |
986 |
|
mmfftype = 41; |
1225 |
– |
oplstype = 5; |
987 |
|
break; |
988 |
|
} |
989 |
|
} |
996 |
|
mmxtype = 2; |
997 |
|
mm3type = 2; |
998 |
|
mmfftype = 3; |
1238 |
– |
ambertype = 3; |
1239 |
– |
oplstype = 10; |
999 |
|
if (jji == 3) |
1000 |
|
{ |
1001 |
|
if (atom[i].iat[0] == jatm) |
1017 |
|
kbo = 0; |
1018 |
|
lbo = 0; |
1019 |
|
adjn = FALSE; |
1261 |
– |
oplstype = 8; |
1020 |
|
for (j=0; j < MAXIAT; j++) |
1021 |
|
{ |
1022 |
|
if (atom[jatm].iat[j] != 0 && atom[jatm].bo[j] != 9 && atom[atom[jatm].iat[j]].mmx_type != 20) |
1037 |
|
if (jbo == 4 && kbo == 3 && lbo == 3 && adjn == FALSE) |
1038 |
|
{ |
1039 |
|
mmfftype = 57; |
1282 |
– |
oplstype = 8; |
1040 |
|
goto L_10; |
1041 |
|
} |
1042 |
|
} |
1059 |
|
if (jbo == 4 && kbo == 3 && adjn == FALSE) |
1060 |
|
{ |
1061 |
|
mmfftype = 57; |
1305 |
– |
oplstype = 8; |
1062 |
|
goto L_10; |
1063 |
|
} |
1308 |
– |
if (jbo == 3 && kbo == 3 && adjn == FALSE) // cytosine c4 |
1309 |
– |
{ |
1310 |
– |
if (atom[latm].atomnum != 7) |
1311 |
– |
{ |
1312 |
– |
oplstype = 9; |
1313 |
– |
goto L_10; |
1314 |
– |
} |
1315 |
– |
} |
1064 |
|
} |
1065 |
|
if (atom[jatm].atomnum == 7 && atom[latm].atomnum == 7) |
1066 |
|
{ |
1081 |
|
if (jbo == 4 && lbo == 3 && adjn == FALSE) |
1082 |
|
{ |
1083 |
|
mmfftype = 57; |
1336 |
– |
oplstype = 8; |
1084 |
|
goto L_10; |
1085 |
|
} |
1339 |
– |
if (jbo == 3 && lbo == 3 && adjn == FALSE) // cytosine c4 |
1340 |
– |
{ |
1341 |
– |
if (atom[katm].atomnum != 7) |
1342 |
– |
{ |
1343 |
– |
oplstype = 9; |
1344 |
– |
goto L_10; |
1345 |
– |
} |
1346 |
– |
} |
1086 |
|
} |
1087 |
|
} |
1088 |
|
goto L_10; |
1091 |
|
mmxtype = 2; |
1092 |
|
mm3type = 2; |
1093 |
|
mmfftype = 2; |
1355 |
– |
ambertype = 4; |
1356 |
– |
oplstype = 10; |
1094 |
|
if (is_cyclo3(i,array)) // cyclopropene |
1095 |
|
{ |
1096 |
|
mm3type = 38; |
1110 |
|
mmxtype = 2; |
1111 |
|
mm3type = 2; |
1112 |
|
mmfftype = 2; |
1376 |
– |
ambertype = 4; |
1377 |
– |
oplstype = 10; |
1113 |
|
goto L_10; |
1114 |
|
} |
1115 |
|
goto L_10; |
1118 |
|
mmxtype = 1; |
1119 |
|
mm3type = 1; |
1120 |
|
mmfftype = 1; |
1386 |
– |
ambertype = 1; |
1387 |
– |
oplstype = 1; |
1121 |
|
if (is_cyclo3(i,array)) |
1122 |
|
{ |
1123 |
|
mmxtype = 22; |
1124 |
|
mm3type = 22; |
1125 |
|
mmfftype = 22; |
1393 |
– |
oplstype = 28; |
1126 |
|
goto L_10; |
1127 |
|
} else if (is_cyclo4(i,array)) |
1128 |
|
{ |
1130 |
|
mm3type = 56; |
1131 |
|
mmfftype = 20; |
1132 |
|
goto L_10; |
1133 |
< |
} else // look for adjacent triple bonds for opls |
1402 |
< |
{ |
1403 |
< |
for (j=0; j < MAXIAT; j++) |
1404 |
< |
{ |
1405 |
< |
if (atom[i].iat[j] != 0 && atom[atom[i].iat[j]].atomnum == 6) |
1406 |
< |
{ |
1407 |
< |
jatm = atom[i].iat[j]; |
1408 |
< |
for (k=0; k < MAXIAT; k++) |
1409 |
< |
{ |
1410 |
< |
if (atom[jatm].iat[k] != 0 && atom[jatm].bo[k] == 3) |
1411 |
< |
{ |
1412 |
< |
oplstype = 25; |
1413 |
< |
nh = 0; |
1414 |
< |
for (l = 0; l < MAXIAT; l++) |
1415 |
< |
{ |
1416 |
< |
if (atom[i].iat[l] != 0 && atom[atom[i].iat[l]].atomnum == 1) |
1417 |
< |
nh++; |
1418 |
< |
} |
1419 |
< |
if (nh == 0) oplstype = 27; |
1420 |
< |
if (nh == 1) oplstype = 26; |
1421 |
< |
if (nh == 2) oplstype = 25; |
1422 |
< |
goto L_10; |
1423 |
< |
} |
1424 |
< |
} |
1425 |
< |
} |
1426 |
< |
} |
1427 |
< |
} |
1428 |
< |
// acetal type |
1429 |
< |
nh = 0; |
1430 |
< |
for (j=0; j < MAXIAT; j++) |
1431 |
< |
{ |
1432 |
< |
if (atom[i].iat[j] != 0 && atom[atom[i].iat[j]].atomnum == 8 && atom[i].bo[j] != 2) |
1433 |
< |
nh++; |
1434 |
< |
} |
1435 |
< |
if (nh == 2 || nh == 3) |
1436 |
< |
oplstype = 21; |
1133 |
> |
} |
1134 |
|
goto L_10; |
1135 |
|
} else if (atom[i].atomnum == 7) // nitrogen |
1136 |
|
{ |
1153 |
|
} |
1154 |
|
icycl5 = find_rsize(5,i); |
1155 |
|
icycl6 = find_rsize(6,i); |
1459 |
– |
// amber types |
1460 |
– |
if (icycl5 >= 1 && nh == 0 && (nc == 2 || nc == 1)) |
1461 |
– |
{ |
1462 |
– |
ambertype = 16; // NB |
1463 |
– |
oplstype = 59; |
1464 |
– |
goto L_1001; |
1465 |
– |
}else if (icycl5 >=1 && nh <= 1 && (nc == 2 || nc == 1)) |
1466 |
– |
{ |
1467 |
– |
// need to check for proline |
1468 |
– |
for (j=0; j < MAXIAT; j++) |
1469 |
– |
{ |
1470 |
– |
if (atom[atom[i].iat[j]].atomnum == 6) |
1471 |
– |
{ |
1472 |
– |
jatm = atom[i].iat[j]; |
1473 |
– |
for (k=0; k < MAXIAT; k++) |
1474 |
– |
{ |
1475 |
– |
if (atom[atom[jatm].iat[k]].atomnum == 6) |
1476 |
– |
{ |
1477 |
– |
katm = atom[jatm].iat[k]; |
1478 |
– |
for (l=0; l < MAXIAT; l++) |
1479 |
– |
{ |
1480 |
– |
if (atom[katm].iat[l] != 0 && atom[katm].bo[l] == 2 && atom[atom[katm].iat[l]].atomnum == 8) |
1481 |
– |
{ |
1482 |
– |
ambertype = 14; |
1483 |
– |
oplstype = 53; |
1484 |
– |
goto L_1001; |
1485 |
– |
} |
1486 |
– |
} |
1487 |
– |
} |
1488 |
– |
} |
1489 |
– |
} |
1490 |
– |
} |
1491 |
– |
ambertype = 15; // NA |
1492 |
– |
oplstype = 58; |
1493 |
– |
goto L_1001; |
1494 |
– |
} else if (icycl5 >= 1 && nh == 0 && nc == 3) |
1495 |
– |
{ |
1496 |
– |
for (j=0; j < MAXIAT; j++) |
1497 |
– |
{ |
1498 |
– |
if (atom[atom[i].iat[j]].atomnum == 6) |
1499 |
– |
{ |
1500 |
– |
jatm = atom[i].iat[j]; |
1501 |
– |
for (k=0; k < MAXIAT; k++) |
1502 |
– |
{ |
1503 |
– |
if (atom[atom[jatm].iat[k]].atomnum == 8 && atom[jatm].bo[k] == 2) |
1504 |
– |
{ |
1505 |
– |
ambertype = 14; |
1506 |
– |
oplstype = 55; |
1507 |
– |
goto L_1001; |
1508 |
– |
} |
1509 |
– |
} |
1510 |
– |
} |
1511 |
– |
} |
1512 |
– |
ambertype = 18; // N* |
1513 |
– |
oplstype = 61; |
1514 |
– |
goto L_1001; |
1515 |
– |
} |
1516 |
– |
if (icycl6 >= 1) |
1517 |
– |
{ |
1518 |
– |
if (nh == 1) |
1519 |
– |
{ |
1520 |
– |
ambertype = 15; // NA |
1521 |
– |
oplstype = 58; |
1522 |
– |
} else if (nh == 0 && nc == 3) |
1523 |
– |
{ |
1524 |
– |
ambertype = 18; // N*; |
1525 |
– |
oplstype = 61; |
1526 |
– |
}else if (nh == 0 && nc == 2) |
1527 |
– |
{ |
1528 |
– |
ambertype = 17; // NC |
1529 |
– |
oplstype = 60; |
1530 |
– |
} |
1531 |
– |
goto L_1001; |
1532 |
– |
} |
1533 |
– |
if (jji == 4) |
1534 |
– |
{ |
1535 |
– |
ambertype = 20; // N3 |
1536 |
– |
oplstype = 56; |
1537 |
– |
goto L_1001; |
1538 |
– |
} |
1539 |
– |
// only amides and guanadinium ions left |
1540 |
– |
for (j=0; j< MAXIAT; j++) |
1541 |
– |
{ |
1542 |
– |
if (atom[atom[i].iat[j]].atomnum == 6) |
1543 |
– |
{ |
1544 |
– |
jatm = atom[i].iat[j]; |
1545 |
– |
for (k=0; k < MAXIAT; k++) |
1546 |
– |
{ |
1547 |
– |
if (atom[atom[jatm].iat[k]].atomnum == 8 && atom[jatm].bo[k] == 2) |
1548 |
– |
{ |
1549 |
– |
ambertype = 14; // N amide |
1550 |
– |
oplstype = 55; |
1551 |
– |
goto L_1001; |
1552 |
– |
} |
1553 |
– |
if (atom[atom[jatm].iat[k]].atomnum == 7 && atom[jatm].bo[k] == 2) |
1554 |
– |
{ |
1555 |
– |
ambertype = 19; // guanadinium |
1556 |
– |
oplstype = 57; |
1557 |
– |
goto L_1001; |
1558 |
– |
} |
1559 |
– |
if (atom[atom[jatm].iat[k]].atomnum == 6 && atom[jatm].bo[k] == 2) |
1560 |
– |
{ |
1561 |
– |
ambertype = 19; // guanadinium |
1562 |
– |
oplstype = 54; |
1563 |
– |
goto L_1001; |
1564 |
– |
} |
1565 |
– |
} |
1566 |
– |
} |
1567 |
– |
} |
1568 |
– |
ambertype = 20; // N2 |
1569 |
– |
oplstype = 53; |
1570 |
– |
L_1001: |
1156 |
|
// |
1157 |
|
if (icycl5 >= 1 && atom[i].flags & aromatic_mask) |
1158 |
|
{ |
1823 |
|
mmxtype = 41; |
1824 |
|
mm3type = 39; |
1825 |
|
mmfftype = 34; |
2241 |
– |
oplstype = 56; |
1826 |
|
for (j=0; j < MAXIAT; j++) |
1827 |
|
{ |
1828 |
|
if (atom[i].iat[j] != 0 && (atom[atom[i].iat[j]].mmx_type >= 300)) |
2173 |
|
atom[atom[jatm].iat[1]].atomnum == 7 && atom[atom[jatm].iat[2]].atomnum == 7) ) |
2174 |
|
{ |
2175 |
|
mmfftype = 56; |
2592 |
– |
oplstype = 57; |
2176 |
|
goto L_10; |
2177 |
|
} |
2178 |
|
} |
2203 |
|
mmxtype = 53; |
2204 |
|
mm3type = 0; |
2205 |
|
mmfftype = 0; |
2623 |
– |
ambertype = 0; |
2206 |
|
goto L_10; |
2207 |
|
} |
2208 |
|
jjbo = 0; |
2216 |
|
{ |
2217 |
|
mmxtype = 46; |
2218 |
|
mmfftype = 49; |
2637 |
– |
ambertype = 0; |
2219 |
|
mm3type = 0; |
2639 |
– |
oplstype = 0; |
2220 |
|
for (j=0; j < MAXIAT; j++) |
2221 |
|
{ |
2222 |
|
if (atom[i].iat[j] != 0 && atom[i].bo[j] == 2) |
2232 |
|
{ |
2233 |
|
mm3type = 47; |
2234 |
|
mmfftype = 32; |
2655 |
– |
ambertype = 25; |
2656 |
– |
oplstype = 50; |
2235 |
|
} |
2236 |
|
if (mmxtype == 6 || mmxtype == 7 || mmxtype == 66) |
2237 |
|
{ |
2242 |
|
mmxtype = 7; |
2243 |
|
mm3type = 7; |
2244 |
|
mmfftype = 7; |
2667 |
– |
ambertype = 25; |
2668 |
– |
oplstype = 49; |
2245 |
|
jatm = atom[i].iat[j]; |
2246 |
|
if (atom[jatm].atomnum == 15) // p=o |
2247 |
|
{ |
2264 |
|
} |
2265 |
|
} |
2266 |
|
mmfftype = 32; |
2691 |
– |
oplstype = 50; |
2267 |
|
goto L_10; |
2268 |
|
} |
2269 |
|
if (atom[jatm].atomnum == 16) // s=o |
2286 |
|
if (jjk == 1 && jj_bo == 1 && atom[katm].mmx_type == 42) |
2287 |
|
{ |
2288 |
|
mmxtype = 66; |
2289 |
< |
mm3type = 47; |
2289 |
> |
mm3type = 47; |
2290 |
|
mmfftype = 32; |
2716 |
– |
oplstype = 50; |
2291 |
|
goto L_10; |
2292 |
|
} |
2293 |
|
} |
2312 |
|
if (jjk == 1) // carboxylate |
2313 |
|
{ |
2314 |
|
mmxtype = 66; |
2315 |
< |
mm3type = 47; |
2315 |
> |
mm3type = 47; |
2316 |
|
mmfftype = 32; |
2743 |
– |
ambertype = 25; |
2744 |
– |
oplstype = 50; |
2317 |
|
goto L_10; |
2318 |
|
} |
2319 |
|
if (jjk == 2) // ester and acids |
2321 |
|
if ( atom[atom[katm].iat[0]].atomnum != 1 && atom[atom[katm].iat[1]].atomnum != 1) // ester |
2322 |
|
{ |
2323 |
|
mm3type = 78; |
2752 |
– |
ambertype = 25; |
2753 |
– |
oplstype = 49; |
2324 |
|
goto L_10; |
2325 |
|
} else if ( atom[atom[katm].iat[0]].atomnum == 1 || atom[atom[katm].iat[1]].atomnum == 1) // acid |
2326 |
|
{ |
2327 |
|
mm3type = 77; |
2758 |
– |
ambertype = 24; |
2759 |
– |
oplstype = 49; |
2328 |
|
goto L_10; |
2329 |
|
} |
2330 |
|
} |
2337 |
|
{ |
2338 |
|
if (atom[atom[jatm].iat[k]].atomnum == 7) // amide |
2339 |
|
{ |
2772 |
– |
ambertype = 24; |
2773 |
– |
oplstype = 49; |
2340 |
|
mm3type = 7; // should be 79 but database only has 58-79 |
2341 |
|
goto L_10; |
2342 |
|
} |
2378 |
|
mmxtype = 66; |
2379 |
|
mm3type = 47; |
2380 |
|
mmfftype = 32; |
2815 |
– |
ambertype = 24; |
2816 |
– |
oplstype = 50; |
2381 |
|
goto L_10; |
2382 |
|
} |
2383 |
|
} else if (atom[atom[jatm].iat[k]].atomnum == 8 && atom[jatm].iat[k] != i && atom[jatm].bo[k] == 2) |
2384 |
|
{ |
2385 |
|
mmfftype = 32; |
2822 |
– |
oplstype = 50; |
2386 |
|
goto L_10; |
2387 |
|
} else if (atom[atom[jatm].iat[k]].atomnum == 16 && atom[jatm].iat[k] != i && atom[jatm].bo[k] == 2) |
2388 |
|
{ |
2397 |
|
{ |
2398 |
|
mmxtype = 66; |
2399 |
|
mm3type = 47; |
2837 |
– |
oplstype = 50; |
2400 |
|
} |
2401 |
|
mmfftype = 32; |
2402 |
|
goto L_10; |
2426 |
|
} |
2427 |
|
if (jji == 1) // only one bond |
2428 |
|
{ |
2867 |
– |
oplstype = 52; |
2429 |
|
if (atom[atom[i].iat[0]].atomnum == 6) |
2430 |
|
{ |
2431 |
|
jatm = atom[i].iat[0]; |
2434 |
|
if (atom[jatm].iat[j] != 0 && atom[jatm].bo[j] == 2) |
2435 |
|
{ |
2436 |
|
|
2876 |
– |
if (atom[atom[jatm].iat[j]].atomnum == 8) // c=c |
2877 |
– |
{ |
2878 |
– |
oplstype = 50; |
2879 |
– |
goto L_10; |
2880 |
– |
} |
2437 |
|
if (atom[atom[jatm].iat[j]].atomnum == 6) // c=c |
2438 |
|
{ |
2439 |
|
mmfftype = 35; |
2447 |
|
mmxtype = 66; |
2448 |
|
mm3type = 69; |
2449 |
|
mmfftype = 32; |
2894 |
– |
oplstype = 50; |
2450 |
|
goto L_10; |
2451 |
|
} |
2452 |
|
if (atom[atom[i].iat[0]].atomnum == 15 || atom[atom[i].iat[0]].atomnum == 16) // p-o |
2454 |
|
mmxtype = 66; |
2455 |
|
mm3type = 7; |
2456 |
|
mmfftype = 32; |
2902 |
– |
oplstype = 50; |
2457 |
|
goto L_10; |
2458 |
|
} |
2459 |
|
|
2471 |
|
{ |
2472 |
|
mmfftype = 59; |
2473 |
|
mm3type = 41; |
2920 |
– |
ambertype = 23; |
2921 |
– |
oplstype = 47; |
2474 |
|
goto L_10; |
2475 |
|
} |
2476 |
|
} |
2479 |
|
if (nh == 2) // mmff water |
2480 |
|
{ |
2481 |
|
mmfftype = 70; |
2930 |
– |
ambertype = 21; |
2931 |
– |
oplstype = 51; |
2482 |
|
goto L_10; |
2483 |
|
} else if (nh == 1) // ROH and RCOOH |
2484 |
|
{ |
2485 |
|
mm3type = 6; |
2486 |
|
mmfftype = 6; |
2937 |
– |
ambertype = 22; |
2938 |
– |
oplstype = 44; |
2487 |
|
jatm = atom[i].iat[0]; |
2488 |
|
for (j=0; j < MAXIAT; j++) |
2489 |
|
{ |
2492 |
|
if (atom[atom[jatm].iat[j]].atomnum == 8) |
2493 |
|
{ |
2494 |
|
mm3type = 75; |
2947 |
– |
oplstype = 46; |
2495 |
|
break; |
2496 |
|
} |
2497 |
|
} |
2500 |
|
} else |
2501 |
|
{ |
2502 |
|
mmfftype = 6; |
2503 |
< |
ambertype = 23; // ether |
2957 |
< |
oplstype = 47; |
2958 |
< |
jatm = atom[i].iat[0]; // acetal |
2959 |
< |
katm = atom[i].iat[1]; |
2960 |
< |
nox = 0; |
2961 |
< |
for (j=0; j < MAXIAT; j++) |
2962 |
< |
{ |
2963 |
< |
if (atom[jatm].iat[j] != 0 && atom[atom[jatm].iat[j]].atomnum == 8 && atom[jatm].bo[j] != 2) |
2964 |
< |
nox++; |
2965 |
< |
} |
2966 |
< |
if (nox == 2 || nox == 3) |
2967 |
< |
oplstype = 48; |
2968 |
< |
nox = 0; |
2969 |
< |
for (j=0; j < MAXIAT; j++) |
2970 |
< |
{ |
2971 |
< |
if (atom[katm].iat[j] != 0 && atom[atom[katm].iat[j]].atomnum == 8 && atom[katm].bo[j] != 2) |
2972 |
< |
nox++; |
2973 |
< |
} |
2974 |
< |
if (nox == 2 || nox == 3) |
2975 |
< |
oplstype = 48; |
2976 |
< |
|
2503 |
> |
goto L_10; |
2504 |
|
} |
2505 |
|
jatm = atom[i].iat[0]; |
2506 |
|
jtype = 0; |
2553 |
|
mmxtype = 6; |
2554 |
|
mm3type = 6; |
2555 |
|
mmfftype = 6; |
3029 |
– |
ambertype = 22; |
3030 |
– |
oplstype = 47; |
2556 |
|
} |
2557 |
|
goto L_10; |
2558 |
|
} else if (mmxtype == 42) |
2559 |
|
{ |
2560 |
|
mmfftype = 32; |
3036 |
– |
ambertype = 25; |
3037 |
– |
oplstype = 52; |
2561 |
|
for (j=0; j < MAXIAT; j++) |
2562 |
|
{ |
2563 |
|
if (atom[atom[i].iat[j]].atomnum == 16 || atom[atom[i].iat[j]].atomnum == 15) |
2565 |
|
mmxtype = 66; |
2566 |
|
mm3type = 47; |
2567 |
|
mmfftype = 32; |
3045 |
– |
oplstype = 50; |
2568 |
|
goto L_10; |
2569 |
|
} |
2570 |
|
if (atom[atom[i].iat[j]].atomnum == 7) |
2582 |
|
mmxtype = 66; |
2583 |
|
mm3type = 69; |
2584 |
|
mmfftype = 32; |
3063 |
– |
oplstype = 50; |
2585 |
|
} else |
2586 |
|
mmfftype = 35; |
2587 |
|
goto L_10; |
2597 |
|
mmxtype = 66; |
2598 |
|
mm3type = 47; |
2599 |
|
mmfftype = 32; |
3079 |
– |
oplstype = 50; |
2600 |
|
goto L_10; |
2601 |
|
} |
2602 |
|
} |
2621 |
|
mmxtype = 25; |
2622 |
|
mm3type = 25; |
2623 |
|
mmfftype = 25; |
3104 |
– |
ambertype = 28; |
3105 |
– |
oplstype = 66; |
2624 |
|
jji = 0; |
2625 |
|
for (j=0; j < MAXIAT; j++) |
2626 |
|
{ |
2630 |
|
{ |
2631 |
|
mmxtype = 67; |
2632 |
|
mmfftype = 75; |
3115 |
– |
oplstype = 67; |
2633 |
|
goto L_10; |
2634 |
|
} |
2635 |
|
if (atom[atom[i].iat[j]].atomnum == 8 && atom[i].bo[j] == 2) |
2639 |
|
{ |
2640 |
|
mmxtype = 47; |
2641 |
|
mm3type = 60; |
3125 |
– |
oplstype = 67; |
2642 |
|
}else if (jji == 3) |
2643 |
|
{ |
2644 |
|
mmxtype = 25; |
2650 |
|
mmxtype = 15; |
2651 |
|
mm3type = 15; |
2652 |
|
mmfftype = 15; |
3137 |
– |
ambertype = 26; |
3138 |
– |
oplstype = 69; |
3139 |
– |
if (atom[atom[i].iat[0]].atomnum == 1 || atom[atom[i].iat[1]].atomnum == 1) |
3140 |
– |
{ |
3141 |
– |
ambertype = 27; |
3142 |
– |
oplstype = 68; |
3143 |
– |
} |
2653 |
|
jji = 0; |
2654 |
|
ndouble = 0; |
2655 |
|
for (j=0; j < MAXIAT; j++) |
2761 |
|
mm3type = 12; |
2762 |
|
mmxtype = 12; |
2763 |
|
mmfftype = 12; |
3255 |
– |
oplstype = 63; |
2764 |
|
jji = 0; |
2765 |
|
for (j=0; j < MAXIAT; j++) |
2766 |
|
if (atom[i].iat[j] != 0 && atom[i].bo[j] != 9) |
2785 |
|
mmxtype = 11; |
2786 |
|
mm3type = 11; |
2787 |
|
mmfftype = 11; |
3280 |
– |
oplstype = 62; |
2788 |
|
goto L_10; |
2789 |
|
} else if (atom[i].atomnum == 35) // Bromine |
2790 |
|
{ |
2791 |
|
mmxtype = 13; |
2792 |
|
mm3type = 13; |
2793 |
|
mmfftype = 13; |
3287 |
– |
oplstype = 64; |
2794 |
|
goto L_10; |
2795 |
|
} else if (atom[i].atomnum == 53) // Iodine |
2796 |
|
{ |
2804 |
|
mmxtype = 14; |
2805 |
|
mm3type = 14; |
2806 |
|
mmfftype = 14; |
3301 |
– |
oplstype = 65; |
2807 |
|
goto L_10; |
2808 |
|
} else if (atom[i].atomnum == 14 ) // Silicon |
2809 |
|
{ |
2820 |
|
} else if (mmxtype >= 300) // metal atom - try to assign MMFF type |
2821 |
|
{ |
2822 |
|
mm3type = mmxtype; |
3318 |
– |
ambertype = mmxtype; |
2823 |
|
if (mmfftype == 0) |
2824 |
|
mmfftype = mmxtype; |
3321 |
– |
oplstype = mmxtype; |
2825 |
|
} |
2826 |
|
L_10: |
2827 |
< |
set_atomtype(i,mmxtype,mm3type,mmfftype,ambertype,oplstype); |
2827 |
> |
set_atomtype(i,mmxtype,mm3type,mmfftype,0,0); |
2828 |
|
L_20: |
2829 |
|
continue; // do nothing |
2830 |
|
} |