decompiled_code:
__int64 __fastcall set_atm_params(__int64 a1, int a2, __int64 a3, const char *a4, int a5, int a6, int a7, __int64 a8, __int64 a9, __int64 a10, __int64 a11)
{
__int64 v15; // rbx
_DWORD *v16; // r13
int i; // ebx
__int64 v18; // r8
__int64 result; // rax
__int64 v20; // rax
__int64 v21; // r8
double v22; // xmm0_8
__int64 v23; // r8
double v24; // xmm0_8
__int64 v25; // r8
unsigned int v26; // eax
unsigned int v27; // edi
unsigned int v28; // esi
unsigned int v29; // ecx
_DWORD *v30; // rax
unsigned int v31; // edx
__int64 v32; // r8
unsigned int v33; // eax
__int64 v34; // r8
int v35; // edx
__int64 v36; // rcx
int v37; // eax
__int64 v38; // r8
int v39; // edx
__int64 v40; // rcx
int v41; // eax
__int64 v42; // r8
int v43; // edx
__int64 v44; // rcx
int v45; // eax
__int64 v46; // r8
int v47; // edx
__int64 v48; // r13
int v49; // eax
__int64 v50; // rax
int v51; // er13
__int64 v52; // rbp
__int64 v53; // rdx
__int64 v54; // r8
int v55; // eax
__int64 v56; // r14
int v57; // er13
const char *v58; // rcx
int v59; // er14
const char *v60; // rbp
int v61; // er12
__int64 v62; // rcx
int v63; // [rsp+8h] [rbp-C0h]
__int64 v64; // [rsp+8h] [rbp-C0h]
int v65; // [rsp+8h] [rbp-C0h]
int v66; // [rsp+10h] [rbp-B8h]
const char *v67; // [rsp+18h] [rbp-B0h]
unsigned int v70; // [rsp+30h] [rbp-98h] BYREF
unsigned int v71; // [rsp+34h] [rbp-94h] BYREF
unsigned int v72; // [rsp+38h] [rbp-90h] BYREF
unsigned int v73; // [rsp+3Ch] [rbp-8Ch] BYREF
int v74; // [rsp+40h] [rbp-88h] BYREF
unsigned int v75; // [rsp+44h] [rbp-84h] BYREF
double v76; // [rsp+48h] [rbp-80h] BYREF
char src[120]; // [rsp+50h] [rbp-78h] BYREF

v15 = a9;
if ( a2 > 0 )
{
v16 = (_DWORD *)(a1 + 216);
for ( i = 1; i <= a2; ++i )
{
if ( !*v16 && v16[1] == 1 )
keyword_miss(a1, a4, a3, (unsigned int)i);
v16 += 53;
}
v15 = a9;
}
_isoc99_sscanf(a1 + 486, "%d", &v74);
result = v74;
if ( *(_DWORD *)(v15 + 64) < v74 || v74 < 0 )
{
keyarg_barf(a1, a4, a3, 2LL, v18);
result = v74;
}
if ( *(int *)(*(_QWORD *)(v15 + 8) + 4 * result) > 0 )
{
v20 = *(int *)(*(_QWORD *)(v15 + 16) + 4 * result);
v74 = v20;
if ( (int)v20 > *(_DWORD *)(v15 + 56) || (int)v20 < 0 )
{
keyarg_barf(a1, a4, a3, 2LL, v18);
v20 = v74;
}
++*(_DWORD *)(*(_QWORD *)(v15 + 24) + 4 * v20);
v63 = v74;
v74 += *(_DWORD *)a10;
_isoc99_sscanf(a1 + 698, "%lg", &v76);
v22 = v76;
if ( v76 <= 0.0 )
{
keyarg_barf(a1, a4, a3, 3LL, v21);
v22 = v76;
}
*(double *)(*(_QWORD *)(a10 + 200) + 8LL * v74) = v22;
_isoc99_sscanf(a1 + 910, "%lg", &v76);
*(double *)(*(_QWORD *)(a10 + 208) + 8LL * v74) = v76;
_isoc99_sscanf(a1 + 1122, "%lg", &v76);
v24 = v76;
if ( v76 < 0.0 )
{
keyarg_barf(a1, a4, a3, 5LL, v23);
v24 = v76;
}
*(double *)(*(_QWORD *)(a10 + 216) + 8LL * v74) = v24;
_isoc99_sscanf(a1 + 1334, "%lg", &v76);
*(double *)(*(_QWORD *)(a10 + 224) + 8LL * v74) = v76;
_isoc99_sscanf(a1 + 1546, "%d", &v70);
v64 = 316LL * v63;
v26 = v70;
*(_DWORD *)(*(_QWORD *)v15 + v64 + 292) = v70;
if ( v26 > 6 )
keyarg_barf(a1, a4, a3, 7LL, v25);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 1758));
parse_improp(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), &v75, &v71, &v72, &v73);
v27 = v75;
v28 = v71;
v29 = v72;
v30 = (_DWORD *)(*(_QWORD *)v15 + v64);
v30[75] = v75 + 1;
v30[76] = v28 + 1;
v30[77] = v29 + 1;
v31 = v73;
v32 = v73 + 1;
v30[78] = v32;
v33 = v31 + v29 + v27 + v28;
if ( v33 )
{
if ( v33 == 6 )
{
LABEL_21:
if ( v29 > 3
|| v28 > 3
|| v27 > 3
|| v29 == v31
|| v28 == v31
|| v27 == v31
|| v28 == v29
|| v27 == v28
|| v27 == v29
|| v31 > 3 )
{
LOBYTE(v32) = v29 == v31;
keyarg_barf(a1, a4, a3, 8LL, v32);
}
LABEL_24:
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 1970));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 50), src);
v35 = v71;
v36 = *(_QWORD *)v15 + v64;
v37 = v72;
*(_DWORD *)(v36 + 256) = v71;
*(_DWORD *)(v36 + 276) = v37;
if ( (unsigned int)(v37 + 1) > 7 || (unsigned int)(v35 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 9LL, v34);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2182));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 100), src);
v39 = v71;
v40 = *(_QWORD *)v15 + v64;
v41 = v72;
*(_DWORD *)(v40 + 260) = v71;
*(_DWORD *)(v40 + 280) = v41;
if ( (unsigned int)(v41 + 1) > 7 || (unsigned int)(v39 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 10LL, v38);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2394));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 150), src);
v43 = v71;
v44 = *(_QWORD *)v15 + v64;
v45 = v72;
*(_DWORD *)(v44 + 264) = v71;
*(_DWORD *)(v44 + 284) = v45;
if ( (unsigned int)(v45 + 1) > 7 || (unsigned int)(v43 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 11LL, v42);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2606));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 200), src);
v47 = v71;
v48 = *(_QWORD *)v15 + v64;
v49 = v72;
*(_DWORD *)(v48 + 268) = v71;
*(_DWORD *)(v48 + 288) = v49;
if ( (unsigned int)(v49 + 1) > 7 || (unsigned int)(v47 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 12LL, v46);
_isoc99_sscanf(a1 + 2818, "%d", &v70);
*(_DWORD *)(*(_QWORD *)(a10 + 176) + 4LL * v74) = v70;
_isoc99_sscanf(a1 + 3030, "%d", &v70);
v50 = *(_QWORD *)(a10 + 184);
*(_DWORD *)(v50 + 4LL * v74) = v70;
if ( *(_DWORD *)(a1 + 2760) == 1 && !*(_DWORD *)(a1 + 2972) )
*(_DWORD *)(v50 + 4LL * v74) = *(_DWORD *)(*(_QWORD *)(a10 + 176) + 4LL * v74);
if ( !strcasecmp((const char *)(a1 + 3242), "yes") )
*(_DWORD *)(*(_QWORD *)(a10 + 192) + 4LL * v74) = 1;
if ( !strcasecmp((const char *)(a1 + 3242), "no") )
*(_DWORD *)(*(_QWORD *)(a10 + 192) + 4LL * v74) = 0;
*(_DWORD *)(*(_QWORD *)(a8 + 256) + 4LL * v74) = 0;
if ( *(_DWORD *)(a1 + 3396) )
set_ghost(a11, (_DWORD *)a10, a8, v15, a1, (unsigned int)a2, a4, a3, v74);
v51 = 0;
if ( !strcasecmp((const char *)(a1 + 4514), "standard") )
{
v51 = 1;
*(_DWORD *)(*(_QWORD *)(a8 + 280) + 4LL * v74) = 0;
}
if ( !strcasecmp((const char *)(a1 + 4514), "backbone") )
{
v52 = *(_QWORD *)(a8 + 280);
*(_DWORD *)(v52 + 4LL * v74) = 1;
if ( strcasecmp((const char *)(a1 + 4514), "sidechain") )
goto LABEL_47;
}
else
{
if ( strcasecmp((const char *)(a1 + 4514), "sidechain") )
{
if ( !v51 )
keyarg_barf(a1, a4, a3, 21LL, v54);
LABEL_47:
v55 = *(_DWORD *)(a8 + 8);
v56 = *(_QWORD *)(a8 + 48);
v57 = v55 + 1;
v65 = v55 + 1;
v66 = *(_DWORD *)(v15 + 384);
if ( v55 <= 0 )
{
v62 = (unsigned int)v66;
if ( v65 <= v66 )
goto LABEL_73;
v57 = v55 + 1;
v67 = (const char *)(v56 + 50);
}
else
{
v58 = (const char *)(v56 + 50);
v59 = 1;
v67 = v58;
v60 = v58;
v61 = *(_DWORD *)(a8 + 8);
while ( 1 )
{
if ( !strcasecmp((const char *)(a1 + 274), v60) )
v57 = v59;
v60 += 50;
if ( v61 == v59 )
break;
++v59;
}
if ( v57 <= v66 )
goto LABEL_54;
}
*(_DWORD *)(v15 + 384) = v66 + 100;
*(_QWORD *)(a8 + 48) = crealloc(v67, 50LL * (v66 + 100), v53, v62, v54) - 50;
v65 = *(_DWORD *)(a8 + 8) + 1;
LABEL_54:
if ( v57 != v65 )
{
LABEL_55:
*(_DWORD *)(*(_QWORD *)(a8 + 176) + 4LL * v74) = a5;
*(_DWORD *)(*(_QWORD *)(a8 + 232) + 4LL * v74) = 1;
*(_DWORD *)(*(_QWORD *)(a8 + 248) + 4LL * v74) = a6;
*(_DWORD *)(*(_QWORD *)(a8 + 192) + 4LL * v74) = v57;
result = *(_QWORD *)(a8 + 184);
*(_DWORD *)(result + 4LL * v74) = *(_DWORD *)(*(_QWORD *)(a8 + 104) + 4LL * (a7 + a6));
return result;
}
v56 = *(_QWORD *)(a8 + 48);
LABEL_73:
v57 = v65;
*(_DWORD *)(a8 + 8) = v65;
strcpy((char *)(v56 + 50LL * v65), (const char *)(a1 + 274));
goto LABEL_55;
}
v52 = *(_QWORD *)(a8 + 280);
}
*(_DWORD *)(v52 + 4LL * v74) = 2;
goto LABEL_47;
}
keyarg_barf(a1, a4, a3, 8LL, v32);
v27 = v75;
v28 = v71;
v29 = v72;
v31 = v73;
v33 = v73 + v72 + v75 + v71;
}
if ( v33 != 6 )
goto LABEL_24;
goto LABEL_21;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func1(__int64 a1, int a2, __int64 a3, const char *a4, int a5, int a6, int a7, __int64 a8, __int64 a9, __int64 a10, __int64 a11)
{
__int64 v15; // rbx
_DWORD *v16; // r13
int i; // ebx
__int64 v18; // r8
__int64 result; // rax
__int64 v20; // rax
__int64 v21; // r8
double v22; // xmm0_8
__int64 v23; // r8
double v24; // xmm0_8
__int64 v25; // r8
unsigned int v26; // eax
unsigned int v27; // edi
unsigned int v28; // esi
unsigned int v29; // ecx
_DWORD *v30; // rax
unsigned int v31; // edx
__int64 v32; // r8
unsigned int v33; // eax
__int64 v34; // r8
int v35; // edx
__int64 v36; // rcx
int v37; // eax
__int64 v38; // r8
int v39; // edx
__int64 v40; // rcx
int v41; // eax
__int64 v42; // r8
int v43; // edx
__int64 v44; // rcx
int v45; // eax
__int64 v46; // r8
int v47; // edx
__int64 v48; // r13
int v49; // eax
__int64 v50; // rax
int v51; // er13
__int64 v52; // rbp
__int64 v53; // rdx
__int64 v54; // r8
int v55; // eax
__int64 v56; // r14
int v57; // er13
const char *v58; // rcx
int v59; // er14
const char *v60; // rbp
int v61; // er12
__int64 v62; // rcx
int v63; // [rsp+8h] [rbp-C0h]
__int64 v64; // [rsp+8h] [rbp-C0h]
int v65; // [rsp+8h] [rbp-C0h]
int v66; // [rsp+10h] [rbp-B8h]
const char *v67; // [rsp+18h] [rbp-B0h]
unsigned int v70; // [rsp+30h] [rbp-98h] BYREF
unsigned int v71; // [rsp+34h] [rbp-94h] BYREF
unsigned int v72; // [rsp+38h] [rbp-90h] BYREF
unsigned int v73; // [rsp+3Ch] [rbp-8Ch] BYREF
int v74; // [rsp+40h] [rbp-88h] BYREF
unsigned int v75; // [rsp+44h] [rbp-84h] BYREF
double v76; // [rsp+48h] [rbp-80h] BYREF
char src[120]; // [rsp+50h] [rbp-78h] BYREF

v15 = a9;
if ( a2 > 0 )
{
v16 = (_DWORD *)(a1 + 216);
for ( i = 1; i <= a2; ++i )
{
if ( !*v16 && v16[1] == 1 )
keyword_miss(a1, a4, a3, (unsigned int)i);
v16 += 53;
}
v15 = a9;
}
_isoc99_sscanf(a1 + 486, "%d", &v74);
result = v74;
if ( *(_DWORD *)(v15 + 64) < v74 || v74 < 0 )
{
keyarg_barf(a1, a4, a3, 2LL, v18);
result = v74;
}
if ( *(int *)(*(_QWORD *)(v15 + 8) + 4 * result) > 0 )
{
v20 = *(int *)(*(_QWORD *)(v15 + 16) + 4 * result);
v74 = v20;
if ( (int)v20 > *(_DWORD *)(v15 + 56) || (int)v20 < 0 )
{
keyarg_barf(a1, a4, a3, 2LL, v18);
v20 = v74;
}
++*(_DWORD *)(*(_QWORD *)(v15 + 24) + 4 * v20);
v63 = v74;
v74 += *(_DWORD *)a10;
_isoc99_sscanf(a1 + 698, "%lg", &v76);
v22 = v76;
if ( v76 <= 0.0 )
{
keyarg_barf(a1, a4, a3, 3LL, v21);
v22 = v76;
}
*(double *)(*(_QWORD *)(a10 + 200) + 8LL * v74) = v22;
_isoc99_sscanf(a1 + 910, "%lg", &v76);
*(double *)(*(_QWORD *)(a10 + 208) + 8LL * v74) = v76;
_isoc99_sscanf(a1 + 1122, "%lg", &v76);
v24 = v76;
if ( v76 < 0.0 )
{
keyarg_barf(a1, a4, a3, 5LL, v23);
v24 = v76;
}
*(double *)(*(_QWORD *)(a10 + 216) + 8LL * v74) = v24;
_isoc99_sscanf(a1 + 1334, "%lg", &v76);
*(double *)(*(_QWORD *)(a10 + 224) + 8LL * v74) = v76;
_isoc99_sscanf(a1 + 1546, "%d", &v70);
v64 = 316LL * v63;
v26 = v70;
*(_DWORD *)(*(_QWORD *)v15 + v64 + 292) = v70;
if ( v26 > 6 )
keyarg_barf(a1, a4, a3, 7LL, v25);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 1758));
parse_improp(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), &v75, &v71, &v72, &v73);
v27 = v75;
v28 = v71;
v29 = v72;
v30 = (_DWORD *)(*(_QWORD *)v15 + v64);
v30[75] = v75 + 1;
v30[76] = v28 + 1;
v30[77] = v29 + 1;
v31 = v73;
v32 = v73 + 1;
v30[78] = v32;
v33 = v31 + v29 + v27 + v28;
if ( v33 )
{
if ( v33 == 6 )
{
LABEL_21:
if ( v29 > 3
|| v28 > 3
|| v27 > 3
|| v29 == v31
|| v28 == v31
|| v27 == v31
|| v28 == v29
|| v27 == v28
|| v27 == v29
|| v31 > 3 )
{
LOBYTE(v32) = v29 == v31;
keyarg_barf(a1, a4, a3, 8LL, v32);
}
LABEL_24:
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 1970));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 50), src);
v35 = v71;
v36 = *(_QWORD *)v15 + v64;
v37 = v72;
*(_DWORD *)(v36 + 256) = v71;
*(_DWORD *)(v36 + 276) = v37;
if ( (unsigned int)(v37 + 1) > 7 || (unsigned int)(v35 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 9LL, v34);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2182));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 100), src);
v39 = v71;
v40 = *(_QWORD *)v15 + v64;
v41 = v72;
*(_DWORD *)(v40 + 260) = v71;
*(_DWORD *)(v40 + 280) = v41;
if ( (unsigned int)(v41 + 1) > 7 || (unsigned int)(v39 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 10LL, v38);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2394));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 150), src);
v43 = v71;
v44 = *(_QWORD *)v15 + v64;
v45 = v72;
*(_DWORD *)(v44 + 264) = v71;
*(_DWORD *)(v44 + 284) = v45;
if ( (unsigned int)(v45 + 1) > 7 || (unsigned int)(v43 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 11LL, v42);
strcpy(*(char **)(v15 + 392), (const char *)(a1 + 2606));
parse_bond_site(*(_QWORD *)(v15 + 392), *(_QWORD *)(v15 + 400), src, &v71, &v72);
strcpy((char *)(*(_QWORD *)v15 + v64 + 200), src);
v47 = v71;
v48 = *(_QWORD *)v15 + v64;
v49 = v72;
*(_DWORD *)(v48 + 268) = v71;
*(_DWORD *)(v48 + 288) = v49;
if ( (unsigned int)(v49 + 1) > 7 || (unsigned int)(v47 + 1) > 7 || !src[0] )
keyarg_barf(a1, a4, a3, 12LL, v46);
_isoc99_sscanf(a1 + 2818, "%d", &v70);
*(_DWORD *)(*(_QWORD *)(a10 + 176) + 4LL * v74) = v70;
_isoc99_sscanf(a1 + 3030, "%d", &v70);
v50 = *(_QWORD *)(a10 + 184);
*(_DWORD *)(v50 + 4LL * v74) = v70;
if ( *(_DWORD *)(a1 + 2760) == 1 && !*(_DWORD *)(a1 + 2972) )
*(_DWORD *)(v50 + 4LL * v74) = *(_DWORD *)(*(_QWORD *)(a10 + 176) + 4LL * v74);
if ( !strcasecmp((const char *)(a1 + 3242), "yes") )
*(_DWORD *)(*(_QWORD *)(a10 + 192) + 4LL * v74) = 1;
if ( !strcasecmp((const char *)(a1 + 3242), "no") )
*(_DWORD *)(*(_QWORD *)(a10 + 192) + 4LL * v74) = 0;
*(_DWORD *)(*(_QWORD *)(a8 + 256) + 4LL * v74) = 0;
if ( *(_DWORD *)(a1 + 3396) )
func0(a11, (_DWORD *)a10, a8, v15, a1, (unsigned int)a2, a4, a3, v74);
v51 = 0;
if ( !strcasecmp((const char *)(a1 + 4514), "standard") )
{
v51 = 1;
*(_DWORD *)(*(_QWORD *)(a8 + 280) + 4LL * v74) = 0;
}
if ( !strcasecmp((const char *)(a1 + 4514), "backbone") )
{
v52 = *(_QWORD *)(a8 + 280);
*(_DWORD *)(v52 + 4LL * v74) = 1;
if ( strcasecmp((const char *)(a1 + 4514), "sidechain") )
goto LABEL_47;
}
else
{
if ( strcasecmp((const char *)(a1 + 4514), "sidechain") )
{
if ( !v51 )
keyarg_barf(a1, a4, a3, 21LL, v54);
LABEL_47:
v55 = *(_DWORD *)(a8 + 8);
v56 = *(_QWORD *)(a8 + 48);
v57 = v55 + 1;
v65 = v55 + 1;
v66 = *(_DWORD *)(v15 + 384);
if ( v55 <= 0 )
{
v62 = (unsigned int)v66;
if ( v65 <= v66 )
goto LABEL_73;
v57 = v55 + 1;
v67 = (const char *)(v56 + 50);
}
else
{
v58 = (const char *)(v56 + 50);
v59 = 1;
v67 = v58;
v60 = v58;
v61 = *(_DWORD *)(a8 + 8);
while ( 1 )
{
if ( !strcasecmp((const char *)(a1 + 274), v60) )
v57 = v59;
v60 += 50;
if ( v61 == v59 )
break;
++v59;
}
if ( v57 <= v66 )
goto LABEL_54;
}
*(_DWORD *)(v15 + 384) = v66 + 100;
*(_QWORD *)(a8 + 48) = crealloc(v67, 50LL * (v66 + 100), v53, v62, v54) - 50;
v65 = *(_DWORD *)(a8 + 8) + 1;
LABEL_54:
if ( v57 != v65 )
{
LABEL_55:
*(_DWORD *)(*(_QWORD *)(a8 + 176) + 4LL * v74) = a5;
*(_DWORD *)(*(_QWORD *)(a8 + 232) + 4LL * v74) = 1;
*(_DWORD *)(*(_QWORD *)(a8 + 248) + 4LL * v74) = a6;
*(_DWORD *)(*(_QWORD *)(a8 + 192) + 4LL * v74) = v57;
result = *(_QWORD *)(a8 + 184);
*(_DWORD *)(result + 4LL * v74) = *(_DWORD *)(*(_QWORD *)(a8 + 104) + 4LL * (a7 + a6));
return result;
}
v56 = *(_QWORD *)(a8 + 48);
LABEL_73:
v57 = v65;
*(_DWORD *)(a8 + 8) = v65;
strcpy((char *)(v56 + 50LL * v65), (const char *)(a1 + 274));
goto LABEL_55;
}
v52 = *(_QWORD *)(a8 + 280);
}
*(_DWORD *)(v52 + 4LL * v74) = 2;
goto LABEL_47;
}
keyarg_barf(a1, a4, a3, 8LL, v32);
v27 = v75;
v28 = v71;
v29 = v72;
v31 = v73;
v33 = v73 + v72 + v75 + v71;
}
if ( v33 != 6 )
goto LABEL_24;
goto LABEL_21;
}
return result;
}

original_code:
void set_atm_params(DICT_WORD atm_dict[],int num_atm_dict,
                    char fun_key[],char filename[],
                    int jmol_typ,int jres, int jres_off,ATOMMAPS *atommaps,
                    BUILD_INTRA *build_intra,CLATOMS_INFO *clatoms_info,
                    GHOST_ATOMS *ghost_atoms)
{
  NAME site;
  int i,iii,num,num2,num3,num4,iatm_ind,imask,index,num1;
  int itype,iatm_ind_sm,ifound;
  double dnum;
  for(i=1;i<=num_atm_dict;i++){
    if(atm_dict[i].iuset==0 && atm_dict[i].key_type==1){
      keyword_miss(atm_dict,filename,fun_key,i);}
  }
  sscanf(atm_dict[2].keyarg,"%d",&iatm_ind);
  index = 2;
  if(iatm_ind>build_intra->natmind_1res_now||iatm_ind<0){
             keyarg_barf(atm_dict,filename,fun_key,index);}
  imask = build_intra->mask_atm[iatm_ind];
  if(imask>0){
    iatm_ind = (build_intra->index_atm)[iatm_ind];
    if(iatm_ind>build_intra->natm_1res_now||iatm_ind<0){
             keyarg_barf(atm_dict,filename,fun_key,index);}
    build_intra->iatm_ind_chk[iatm_ind]++;
    iatm_ind_sm = iatm_ind;
    iatm_ind = iatm_ind + clatoms_info->natm_tot;
     sscanf(atm_dict[3].keyarg,"%lg",&dnum);
     index = 3;
     if(dnum<=0.0){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     clatoms_info->mass[iatm_ind] = dnum;
     sscanf(atm_dict[4].keyarg,"%lg",&dnum);
     clatoms_info->q[iatm_ind] = dnum;
     sscanf(atm_dict[5].keyarg,"%lg",&dnum);
     index = 5;
     if(dnum<0.0){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     clatoms_info->alp_pol[iatm_ind] = dnum;
     sscanf(atm_dict[6].keyarg,"%lg",&dnum);
     clatoms_info->b_neut[iatm_ind] = dnum;
     sscanf(atm_dict[7].keyarg,"%d",&num);
     build_intra->bond_site[iatm_ind_sm].valence = num;
     index = 7;
     if(num<0||num>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     strcpy(build_intra->strip1,atm_dict[8].keyarg);
     parse_improp(build_intra->strip1,build_intra->strip2,&num1,&num2,&num3,
                                                                      &num4);
     build_intra->bond_site[iatm_ind_sm].improper_ind[1]=num1+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[2]=num2+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[3]=num3+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[4]=num4+1;
     index = 8;
     if((num1+num2+num3+num4)!=0&&(num1+num2+num3+num4)!=6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     if((num1+num2+num3+num4)==6){
      if(num1<0||num1>3||num2<0||num2>3||num3<0||num3>3||num4<0||num4>3||
         num1==num2||num1==num3||num2==num3||num1==num4||num2==num4||
         num3==num4){
       keyarg_barf(atm_dict,filename,fun_key,index);}}
     strcpy(build_intra->strip1,atm_dict[9].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[1],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[1] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[1] = num3;
     index = 9;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     strcpy(build_intra->strip1,atm_dict[10].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[2],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[2] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[2] = num3;
     index = 10;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     strcpy(build_intra->strip1,atm_dict[11].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[3],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[3] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[3] = num3;
     index = 11;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     strcpy(build_intra->strip1,atm_dict[12].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[4],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[4] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[4] = num3;
     index = 12;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     sscanf(atm_dict[13].keyarg,"%d",&num);
     clatoms_info->cp_vlnc_up[iatm_ind] = num;
     sscanf(atm_dict[14].keyarg,"%d",&num);
     clatoms_info->cp_vlnc_dn[iatm_ind] = num;
     if(atm_dict[13].iuset == 1 && atm_dict[14].iuset == 0){
      clatoms_info->cp_vlnc_dn[iatm_ind] = clatoms_info->cp_vlnc_up[iatm_ind];
     }
     ifound = 0;
     if(strcasecmp(atm_dict[15].keyarg,"yes")==0){
       ifound=1;clatoms_info->cp_atm_flag[iatm_ind] = 1;
     }
     if(strcasecmp(atm_dict[15].keyarg,"no")==0){
       ifound=1;clatoms_info->cp_atm_flag[iatm_ind] = 0;
     }
     atommaps->ighost_flag[iatm_ind] = 0;
     if(atm_dict[16].iuset!=0){
      set_ghost(ghost_atoms,clatoms_info,atommaps,build_intra,
               atm_dict,num_atm_dict,
               filename,fun_key,iatm_ind);
     }
     index = 16+5;
     ifound = 0;
     if(strcasecmp(atm_dict[index].keyarg,"standard")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 0;
     }
     if(strcasecmp(atm_dict[index].keyarg,"backbone")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 1;
     }
     if(strcasecmp(atm_dict[index].keyarg,"sidechain")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 2;
     }
    if(ifound==0){
     keyarg_barf(atm_dict,filename,fun_key,index);
    }
     itype = atommaps->natm_typ + 1;
     for(i=1;i<=atommaps->natm_typ;i++){
       if(strcasecmp(atm_dict[1].keyarg,atommaps->atm_typ[i])==0)
         itype=i;
     }
     if(itype>build_intra->natm_typ_max){
       build_intra->natm_typ_max+=100;
       atommaps->atm_typ = (NAME *)
         crealloc(&(atommaps->atm_typ[1]),
                  (build_intra->natm_typ_max)*sizeof(NAME))-1;
     }
     if(itype==atommaps->natm_typ+1){
       atommaps->natm_typ+=1;
       strcpy(atommaps->atm_typ[itype],atm_dict[1].keyarg);
     }
     atommaps->iatm_mol_typ[iatm_ind] = jmol_typ;
     atommaps->iatm_mol_num[iatm_ind] = 1;
     atommaps->iatm_res_num[iatm_ind] = jres;
     atommaps->iatm_atm_typ[iatm_ind] = itype;
     atommaps->iatm_res_typ[iatm_ind] =
                        atommaps->ires_typ_jres_jmol_typ[jres+jres_off];
   }
}

canonical_original_code:
void set_atm_params(struct dict_word atm_dict[], int num_atm_dict, char fun_key[], char filename[], int jmol_typ, int jres, int jres_off, struct atommaps *atommaps, struct build_intra *build_intra, struct clatoms_info *clatoms_info, struct ghost_atoms *ghost_atoms)
{
  char site[50];
  int i; int iii; int num; int num2; int num3; int num4; int iatm_ind; int imask; int index; int num1;
  int itype; int iatm_ind_sm; int ifound;
  double dnum;
  for(i=1;i<=num_atm_dict;i++){
    if(atm_dict[i].iuset==0 && atm_dict[i].key_type==1){
      keyword_miss(atm_dict,filename,fun_key,i);}
  }
  sscanf(atm_dict[2].keyarg,"%d",&iatm_ind);
  index = 2;
  if(iatm_ind>build_intra->natmind_1res_now||iatm_ind<0){
             keyarg_barf(atm_dict,filename,fun_key,index);}
  imask = build_intra->mask_atm[iatm_ind];
  if(imask>0){
    iatm_ind = (build_intra->index_atm)[iatm_ind];
    if(iatm_ind>build_intra->natm_1res_now||iatm_ind<0){
             keyarg_barf(atm_dict,filename,fun_key,index);}
    build_intra->iatm_ind_chk[iatm_ind]++;
    iatm_ind_sm = iatm_ind;
    iatm_ind = iatm_ind + clatoms_info->natm_tot;
     sscanf(atm_dict[3].keyarg,"%lg",&dnum);
     index = 3;
     if(dnum<=0.0){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     clatoms_info->mass[iatm_ind] = dnum;
     sscanf(atm_dict[4].keyarg,"%lg",&dnum);
     clatoms_info->q[iatm_ind] = dnum;
     sscanf(atm_dict[5].keyarg,"%lg",&dnum);
     index = 5;
     if(dnum<0.0){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     clatoms_info->alp_pol[iatm_ind] = dnum;
     sscanf(atm_dict[6].keyarg,"%lg",&dnum);
     clatoms_info->b_neut[iatm_ind] = dnum;
     sscanf(atm_dict[7].keyarg,"%d",&num);
     build_intra->bond_site[iatm_ind_sm].valence = num;
     index = 7;
     if(num<0||num>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     strcpy(build_intra->strip1,atm_dict[8].keyarg);
     parse_improp(build_intra->strip1,build_intra->strip2,&num1,&num2,&num3,
                                                                      &num4);
     build_intra->bond_site[iatm_ind_sm].improper_ind[1]=num1+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[2]=num2+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[3]=num3+1;
     build_intra->bond_site[iatm_ind_sm].improper_ind[4]=num4+1;
     index = 8;
     if((num1+num2+num3+num4)!=0&&(num1+num2+num3+num4)!=6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     if((num1+num2+num3+num4)==6){
      if(num1<0||num1>3||num2<0||num2>3||num3<0||num3>3||num4<0||num4>3||
         num1==num2||num1==num3||num2==num3||num1==num4||num2==num4||
         num3==num4){
       keyarg_barf(atm_dict,filename,fun_key,index);}}
     strcpy(build_intra->strip1,atm_dict[9].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[1],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[1] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[1] = num3;
     index = 9;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     strcpy(build_intra->strip1,atm_dict[10].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[2],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[2] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[2] = num3;
     index = 10;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);
     }
     strcpy(build_intra->strip1,atm_dict[11].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[3],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[3] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[3] = num3;
     index = 11;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     strcpy(build_intra->strip1,atm_dict[12].keyarg);
     parse_bond_site(build_intra->strip1,build_intra->strip2,site,&num2,&num3);
     strcpy(build_intra->bond_site[iatm_ind_sm].bond_site_name[4],site);
     build_intra->bond_site[iatm_ind_sm].branch_1[4] = num2;
     build_intra->bond_site[iatm_ind_sm].branch_2[4] = num3;
     index = 12;
     if(strlen(site)==0||num2<-1||num3<-1||num2>6||num3>6){
       keyarg_barf(atm_dict,filename,fun_key,index);}
     sscanf(atm_dict[13].keyarg,"%d",&num);
     clatoms_info->cp_vlnc_up[iatm_ind] = num;
     sscanf(atm_dict[14].keyarg,"%d",&num);
     clatoms_info->cp_vlnc_dn[iatm_ind] = num;
     if(atm_dict[13].iuset == 1 && atm_dict[14].iuset == 0){
      clatoms_info->cp_vlnc_dn[iatm_ind] = clatoms_info->cp_vlnc_up[iatm_ind];
     }
     ifound = 0;
     if(strcasecmp(atm_dict[15].keyarg,"yes")==0){
       ifound=1;clatoms_info->cp_atm_flag[iatm_ind] = 1;
     }
     if(strcasecmp(atm_dict[15].keyarg,"no")==0){
       ifound=1;clatoms_info->cp_atm_flag[iatm_ind] = 0;
     }
     atommaps->ighost_flag[iatm_ind] = 0;
     if(atm_dict[16].iuset!=0){
      set_ghost(ghost_atoms,clatoms_info,atommaps,build_intra,
               atm_dict,num_atm_dict,
               filename,fun_key,iatm_ind);
     }
     index = 16+5;
     ifound = 0;
     if(strcasecmp(atm_dict[index].keyarg,"standard")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 0;
     }
     if(strcasecmp(atm_dict[index].keyarg,"backbone")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 1;
     }
     if(strcasecmp(atm_dict[index].keyarg,"sidechain")==0){
       ifound=1;atommaps->atom_label[iatm_ind] = 2;
     }
    if(ifound==0){
     keyarg_barf(atm_dict,filename,fun_key,index);
    }
     itype = atommaps->natm_typ + 1;
     for(i=1;i<=atommaps->natm_typ;i++){
       if(strcasecmp(atm_dict[1].keyarg,atommaps->atm_typ[i])==0)
         itype=i;
     }
     if(itype>build_intra->natm_typ_max){
       build_intra->natm_typ_max+=100;
       atommaps->atm_typ = (char (*)[50])
         crealloc(&(atommaps->atm_typ[1]),
                  (build_intra->natm_typ_max)*sizeof(NAME))-1;
     }
     if(itype==atommaps->natm_typ+1){
       atommaps->natm_typ+=1;
       strcpy(atommaps->atm_typ[itype],atm_dict[1].keyarg);
     }
     atommaps->iatm_mol_typ[iatm_ind] = jmol_typ;
     atommaps->iatm_mol_num[iatm_ind] = 1;
     atommaps->iatm_res_num[iatm_ind] = jres;
     atommaps->iatm_atm_typ[iatm_ind] = itype;
     atommaps->iatm_res_typ[iatm_ind] =
                        atommaps->ires_typ_jres_jmol_typ[jres+jres_off];
   }
}

variable_types: struct dict_word { int iflag; char keyword[50]; char error_mes[100]; } []

variable_types:
filename
char []

variable_types: jres int

variable_types:
site
char [50]

variable_types: num int

variable_types: itype int

variable_types: ifound int

variable_types: dnum double

user_defined_types: struct atommaps { int nmol_typ; int nres_typ; int natm_typ; int nfreeze; int nfreeze_mall; int natm_typ_mall; int nres_typ_max; int nres_max; int nres_tot; int nres_sum; int pimd_freez_typ; char (*atm_typ)[50]; char (*res_typ)[50]; char (*mol_typ)[50]; int *nmol_jmol_typ; int *nres_1mol_jmol_typ; int *jatm_jmol_typ_strt; int *jres_jmol_typ_strt; int *ires_typ_jres_jmol_typ; int *jatm_jres_1mol_jmol_typ_strt; int *natm_1mol_jmol_typ; int *natm_jres_jmol_typ; int *nfree_1mol_jmol_typ; int *nfree_jres_jmol_typ; int *icons_jmol_typ; int *icons_jres_jmol_typ; int *natm_jmol_typ; int *iatm_mol_typ; int *iatm_res_typ; int *iatm_atm_typ; int *iatm_atm_typ_nl; int *iatm_atm_typ_nl_rev; int *imap_atm_typ_nl; int *imap_atm_typ_nl_gh; int *iatm_mol_num; int *iatm_proc_num; int *iatm_res_num; int *ighost_flag; int *freeze_flag; int *freeze_map; int *atom_label; int *cp_atm_lst; }

user_defined_types: struct clatoms_info { int natm_tot; int pi_beads; int pi_beads_proc; int pi_beads_proc_st; int pi_beads_proc_end; int nfree; int nfree_pimd; int nchrg; int pi_beads_full_ter; int pi_beads_res_ter; int pi_beads_full_tra; int pi_beads_res_tra; int cg_reset_flag; int natm_mall; int nchrg_mall; int hess_calc; int natm_proc; int N_H2; int i_H2_start; int nab_initio; int myatm_start; double gamma_adb; double wght_pimd; double pi_temperature; double pi_beads_full_ter_wght; double pi_beads_res_ter_wght; double pi_beads_full_tra_wght; double pi_beads_res_tra_wght; double rcut_spread; double mass_sc_fact; int *ip_lab; int *ichrg; int *cp_vlnc_up; int *cp_atm_flag; double *mass; double *q; double *alp_pol; double *b_neut; double *roll_sc; double *text_atm; double *text_mol; double *xold; double *prekf; double *xmod; double alp_ewd; }

user_defined_types: struct ghost_atoms { int nghost_tot; int natm_comp_max; int nghost_mall; int nghost_old; int ncomp_mall; int ncomp_old; int *ighost_map; int *natm_comp; int **iatm_comp; double **coef; }

user_defined_types: struct bond_site { char bond_site_name[5][50]; int branch_1[5]; int branch_2[5]; int valence; int improper_ind[5]; }


repo: TuckermanGroup/PINY

original_code:
void control_res_params(double *tot_memory,CLATOMS_INFO *clatoms_info,
                        GHOST_ATOMS *ghost_atoms,
                        ATOMMAPS *atommaps,BONDED *bonded,
                        RESBOND_PARSE *resbond_parse,
                        BUILD_INTRA *build_intra,
                        FILENAME_PARSE *filename_parse,
                        FREE_PARSE *free_parse,CLASS_PARSE *class_parse,
                        NULL_INTER_PARSE *null_inter_parse,
                        char filename[],DICT_INTRA *dict_intra,
                        char fun_key[],int jmol_typ)
{
  int iresidue,nresidue,iparm,iresidue_off;
  int i,istart,iend,jatm,iii;
  int mol_only,natm_mol,mol_or_res,nres_bond;
  iresidue_off = atommaps->jres_jmol_typ_strt[jmol_typ]-1;
  nresidue = (((atommaps->nres_1mol_jmol_typ[jmol_typ])>(1))?(atommaps->nres_1mol_jmol_typ[jmol_typ]):(1));
  mol_or_res = 2;
  mol_only = 0;
  if(atommaps->nres_1mol_jmol_typ[jmol_typ]==0){mol_only=1;}
  atommaps->jatm_jmol_typ_strt[jmol_typ] = clatoms_info->natm_tot+1;
  for(iresidue=1;iresidue<=nresidue;iresidue++){
    atommaps->jatm_jres_1mol_jmol_typ_strt[(iresidue+iresidue_off)]=
                                                 clatoms_info->natm_tot;
    build_intra->nghost_now = 0;
    if(mol_only != 1){
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        check_parmfile(filename,&(dict_intra->num_fun_dict),
                       &(dict_intra->fun_dict),fun_key,
                       nresidue,&nres_bond,mol_or_res);
        fetch_residue_name(filename,dict_intra,atommaps,fun_key,build_intra,
                           jmol_typ,iresidue,iresidue_off,iparm,mol_only);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
           if(strlen(filename)!=0){
             check_parmfile(filename,&(dict_intra->num_fun_dict),
                            &(dict_intra->fun_dict),fun_key,
                            nresidue,&nres_bond,mol_or_res);
             fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                    build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
           }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
           if(strlen(filename)!=0){
             check_parmfile(filename,&(dict_intra->num_fun_dict),
                            &(dict_intra->fun_dict),fun_key,
                            nresidue,&nres_bond,mol_or_res);
             fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                  build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
           }
        }
        iparm = 0;
        strcpy(filename,filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        check_parmfile(filename,&(dict_intra->num_fun_dict),
                      &(dict_intra->fun_dict),fun_key,
                      nresidue,&nres_bond,mol_or_res);
        fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                 build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
       }
    }else{
        atommaps->natm_jres_jmol_typ[(iresidue_off+1)] =
                            atommaps->natm_1mol_jmol_typ[jmol_typ];
    }
        init_build_intra(build_intra,atommaps,iresidue,iresidue_off);
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_atm_masks(filename,dict_intra,atommaps,
                            fun_key,build_intra,jmol_typ,iresidue,
                            iresidue_off,iparm);
        check_atm_mask(build_intra,dict_intra,atommaps,fun_key,filename,
                       iresidue,iresidue_off);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
           if(strlen(filename)!=0){
             fetch_residue_atm_masks(filename,dict_intra,atommaps,
                               fun_key,build_intra,jmol_typ,iresidue,
                               iresidue_off,iparm);
           }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
           if(strlen(filename)!=0){
            fetch_residue_atm_masks(filename,dict_intra,atommaps,
                              fun_key,build_intra,jmol_typ,iresidue,
                              iresidue_off,iparm);
           }
       }
        iparm = 0;
        strcpy(filename, filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        fetch_residue_atm_masks(filename,dict_intra,atommaps,
                            fun_key,build_intra,jmol_typ,iresidue,
                            iresidue_off,iparm);
       }
        create_atm_ind(clatoms_info,atommaps,build_intra,
                       dict_intra,fun_key,filename);
        for(i=1;i<=build_intra->natm_1res_now;i++){
          (build_intra->iatm_ind_chk)[i]=0;
        }
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                   ghost_atoms,
                 fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
          if(strlen(filename)!=0){
             fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                    ghost_atoms,
                    fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
          }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
          if(strlen(filename)!=0){
             fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                    ghost_atoms,
                    fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
           }
        }
        iparm = 0;
        strcpy(filename, filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        fetch_residue_atm_prms(filename,dict_intra,atommaps,
                   clatoms_info,ghost_atoms,
                 fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
       }
        check_atm_ind(build_intra);
        atommaps->natm_jres_jmol_typ[(iresidue_off+iresidue)]=
                           build_intra->natm_1res_now;
        atommaps->nfree_jres_jmol_typ[(iresidue_off+iresidue)] =
                   3.0*(atommaps->natm_jres_jmol_typ[(iresidue_off+iresidue)]
                      - build_intra->nghost_now);
        atommaps->icons_jres_jmol_typ[(iresidue_off+iresidue)] = 0;
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_connectivity(filename,dict_intra,
                   atommaps,fun_key,clatoms_info,build_intra,bonded,
                   null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                   class_parse->mol_hydrog_con_opt[jmol_typ]);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
          if(strlen(filename)!=0){
            fetch_residue_connectivity(filename,dict_intra,
                     atommaps,fun_key,clatoms_info,build_intra,bonded,
                     null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                     class_parse->mol_hydrog_con_opt[jmol_typ]);
         }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
          if(strlen(filename)!=0){
            fetch_residue_connectivity(filename,dict_intra,
                     atommaps,fun_key,clatoms_info, build_intra,bonded,
                     null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                     class_parse->mol_hydrog_con_opt[jmol_typ]);
          }
        }
        iparm = 0;
          strcpy(filename, filename_parse->res_fix_name[iresidue]);
          if(strlen(filename)!=0){
          fetch_residue_connectivity(filename,dict_intra,
                    atommaps,fun_key,clatoms_info,
                    build_intra,bonded,
                    null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                    class_parse->mol_hydrog_con_opt[jmol_typ]);
          }
        if(resbond_parse->nres_bond1_jres[iresidue]>0 ||
           resbond_parse->nres_bond2_jres[iresidue]>0){
          fetch_resbond_prm(resbond_parse,build_intra->bond_site,
                            jmol_typ,iresidue,build_intra->natm_1res_now,
                            clatoms_info->natm_tot);
        }
     natm_mol = atommaps->natm_1mol_jmol_typ[jmol_typ];
     fetch_free_energy_index(build_intra,free_parse,bonded,
                           jmol_typ,iresidue,clatoms_info->natm_tot,natm_mol);
        clatoms_info->natm_tot += build_intra->natm_1res_now;
  }
  iresidue_off = atommaps->jres_jmol_typ_strt[jmol_typ]-1;
  atommaps->nfree_1mol_jmol_typ[jmol_typ] = 0;
  atommaps->natm_1mol_jmol_typ[jmol_typ] = 0;
  atommaps->icons_jmol_typ[jmol_typ] = 0;
  nresidue = (((atommaps->nres_1mol_jmol_typ[jmol_typ])>(1))?(atommaps->nres_1mol_jmol_typ[jmol_typ]):(1));
  for(i=1;i<=nresidue;i++){
    atommaps->nfree_1mol_jmol_typ[jmol_typ] +=
                           atommaps->nfree_jres_jmol_typ[(iresidue_off+i)];
    atommaps->natm_1mol_jmol_typ[jmol_typ] +=
                           atommaps->natm_jres_jmol_typ[(iresidue_off+i)];
    if(atommaps->icons_jres_jmol_typ[(iresidue_off+i)]==1){
       atommaps->icons_jmol_typ[jmol_typ] = 1;
    }
  }
  if(natm_mol!=atommaps->natm_1mol_jmol_typ[jmol_typ]){
     printf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
     printf("Error in number of atoms in molecule number %d\n",jmol_typ);
     printf("%d expected %d found\n",natm_mol,
                                     atommaps->natm_1mol_jmol_typ[jmol_typ]);
     printf("in file %s \n",filename_parse->mol_param_name[jmol_typ]);
     printf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
     fflush(stdout);
     exit(1);
    }
    istart = atommaps->jatm_jmol_typ_strt[jmol_typ];
    iend = atommaps->natm_1mol_jmol_typ[jmol_typ]+istart-1;
    for(jatm=istart;jatm<=iend;jatm++){
      clatoms_info->text_atm[jatm] = class_parse->text_nhc_mol[jmol_typ];
    }
}

canonical_original_code:
void control_res_params(double *tot_memory, struct clatoms_info *clatoms_info, struct ghost_atoms *ghost_atoms, struct atommaps *atommaps, struct bonded *bonded, struct resbond_parse *resbond_parse, struct build_intra *build_intra, struct filename_parse *filename_parse, struct free_parse *free_parse, struct class_parse *class_parse, struct null_inter_parse *null_inter_parse, char filename[], struct dict_intra *dict_intra, char fun_key[], int jmol_typ)
{
  int iresidue; int nresidue; int iparm; int iresidue_off;
  int i; int istart; int iend; int jatm; int iii;
  int mol_only; int natm_mol; int mol_or_res; int nres_bond;
  iresidue_off = atommaps->jres_jmol_typ_strt[jmol_typ]-1;
  nresidue = (((atommaps->nres_1mol_jmol_typ[jmol_typ])>(1))?(atommaps->nres_1mol_jmol_typ[jmol_typ]):(1));
  mol_or_res = 2;
  mol_only = 0;
  if(atommaps->nres_1mol_jmol_typ[jmol_typ]==0){mol_only=1;}
  atommaps->jatm_jmol_typ_strt[jmol_typ] = clatoms_info->natm_tot+1;
  for(iresidue=1;iresidue<=nresidue;iresidue++){
    atommaps->jatm_jres_1mol_jmol_typ_strt[(iresidue+iresidue_off)]=
                                                 clatoms_info->natm_tot;
    build_intra->nghost_now = 0;
    if(mol_only != 1){
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        check_parmfile(filename,&(dict_intra->num_fun_dict),
                       &(dict_intra->fun_dict),fun_key,
                       nresidue,&nres_bond,mol_or_res);
        fetch_residue_name(filename,dict_intra,atommaps,fun_key,build_intra,
                           jmol_typ,iresidue,iresidue_off,iparm,mol_only);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
           if(strlen(filename)!=0){
             check_parmfile(filename,&(dict_intra->num_fun_dict),
                            &(dict_intra->fun_dict),fun_key,
                            nresidue,&nres_bond,mol_or_res);
             fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                    build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
           }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
           if(strlen(filename)!=0){
             check_parmfile(filename,&(dict_intra->num_fun_dict),
                            &(dict_intra->fun_dict),fun_key,
                            nresidue,&nres_bond,mol_or_res);
             fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                  build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
           }
        }
        iparm = 0;
        strcpy(filename,filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        check_parmfile(filename,&(dict_intra->num_fun_dict),
                      &(dict_intra->fun_dict),fun_key,
                      nresidue,&nres_bond,mol_or_res);
        fetch_residue_name(filename,dict_intra,atommaps,fun_key,
                 build_intra,jmol_typ,iresidue,iresidue_off,iparm,mol_only);
       }
    }else{
        atommaps->natm_jres_jmol_typ[(iresidue_off+1)] =
                            atommaps->natm_1mol_jmol_typ[jmol_typ];
    }
        init_build_intra(build_intra,atommaps,iresidue,iresidue_off);
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_atm_masks(filename,dict_intra,atommaps,
                            fun_key,build_intra,jmol_typ,iresidue,
                            iresidue_off,iparm);
        check_atm_mask(build_intra,dict_intra,atommaps,fun_key,filename,
                       iresidue,iresidue_off);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
           if(strlen(filename)!=0){
             fetch_residue_atm_masks(filename,dict_intra,atommaps,
                               fun_key,build_intra,jmol_typ,iresidue,
                               iresidue_off,iparm);
           }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
           strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
           if(strlen(filename)!=0){
            fetch_residue_atm_masks(filename,dict_intra,atommaps,
                              fun_key,build_intra,jmol_typ,iresidue,
                              iresidue_off,iparm);
           }
       }
        iparm = 0;
        strcpy(filename, filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        fetch_residue_atm_masks(filename,dict_intra,atommaps,
                            fun_key,build_intra,jmol_typ,iresidue,
                            iresidue_off,iparm);
       }
        create_atm_ind(clatoms_info,atommaps,build_intra,
                       dict_intra,fun_key,filename);
        for(i=1;i<=build_intra->natm_1res_now;i++){
          (build_intra->iatm_ind_chk)[i]=0;
        }
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                   ghost_atoms,
                 fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
          if(strlen(filename)!=0){
             fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                    ghost_atoms,
                    fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
          }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
          if(strlen(filename)!=0){
             fetch_residue_atm_prms(filename,dict_intra,atommaps,clatoms_info,
                    ghost_atoms,
                    fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
           }
        }
        iparm = 0;
        strcpy(filename, filename_parse->res_fix_name[iresidue]);
       if(strlen(filename)!=0){
        fetch_residue_atm_prms(filename,dict_intra,atommaps,
                   clatoms_info,ghost_atoms,
                 fun_key,build_intra,jmol_typ,iresidue,iresidue_off,iparm);
       }
        check_atm_ind(build_intra);
        atommaps->natm_jres_jmol_typ[(iresidue_off+iresidue)]=
                           build_intra->natm_1res_now;
        atommaps->nfree_jres_jmol_typ[(iresidue_off+iresidue)] =
                   3.0*(atommaps->natm_jres_jmol_typ[(iresidue_off+iresidue)]
                      - build_intra->nghost_now);
        atommaps->icons_jres_jmol_typ[(iresidue_off+iresidue)] = 0;
        iparm = 1;
        strcpy(filename, filename_parse->res_param_name[iresidue]);
        fetch_residue_connectivity(filename,dict_intra,
                   atommaps,fun_key,clatoms_info,build_intra,bonded,
                   null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                   class_parse->mol_hydrog_con_opt[jmol_typ]);
        iparm = 0;
        istart = resbond_parse->res_bond1_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond1_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res1_file);
          if(strlen(filename)!=0){
            fetch_residue_connectivity(filename,dict_intra,
                     atommaps,fun_key,clatoms_info,build_intra,bonded,
                     null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                     class_parse->mol_hydrog_con_opt[jmol_typ]);
         }
        }
        iparm = 0;
        istart = resbond_parse->res_bond2_off[iresidue];
        for(i=1;i<=resbond_parse->nres_bond2_jres[iresidue];i++){
          strcpy(filename,resbond_parse->resbond_prm[(istart+i)].res2_file);
          if(strlen(filename)!=0){
            fetch_residue_connectivity(filename,dict_intra,
                     atommaps,fun_key,clatoms_info, build_intra,bonded,
                     null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                     class_parse->mol_hydrog_con_opt[jmol_typ]);
          }
        }
        iparm = 0;
          strcpy(filename, filename_parse->res_fix_name[iresidue]);
          if(strlen(filename)!=0){
          fetch_residue_connectivity(filename,dict_intra,
                    atommaps,fun_key,clatoms_info,
                    build_intra,bonded,
                    null_inter_parse,jmol_typ,iresidue,iresidue_off,iparm,
                    class_parse->mol_hydrog_con_opt[jmol_typ]);
          }
        if(resbond_parse->nres_bond1_jres[iresidue]>0 ||
           resbond_parse->nres_bond2_jres[iresidue]>0){
          fetch_resbond_prm(resbond_parse,build_intra->bond_site,
                            jmol_typ,iresidue,build_intra->natm_1res_now,
                            clatoms_info->natm_tot);
        }
     natm_mol = atommaps->natm_1mol_jmol_typ[jmol_typ];
     fetch_free_energy_index(build_intra,free_parse,bonded,
                           jmol_typ,iresidue,clatoms_info->natm_tot,natm_mol);
        clatoms_info->natm_tot += build_intra->natm_1res_now;
  }
  iresidue_off = atommaps->jres_jmol_typ_strt[jmol_typ]-1;
  atommaps->nfree_1mol_jmol_typ[jmol_typ] = 0;
  atommaps->natm_1mol_jmol_typ[jmol_typ] = 0;
  atommaps->icons_jmol_typ[jmol_typ] = 0;
  nresidue = (((atommaps->nres_1mol_jmol_typ[jmol_typ])>(1))?(atommaps->nres_1mol_jmol_typ[jmol_typ]):(1));
  for(i=1;i<=nresidue;i++){
    atommaps->nfree_1mol_jmol_typ[jmol_typ] +=
                           atommaps->nfree_jres_jmol_typ[(iresidue_off+i)];
    atommaps->natm_1mol_jmol_typ[jmol_typ] +=
                           atommaps->natm_jres_jmol_typ[(iresidue_off+i)];
    if(atommaps->icons_jres_jmol_typ[(iresidue_off+i)]==1){
       atommaps->icons_jmol_typ[jmol_typ] = 1;
    }
  }
  if(natm_mol!=atommaps->natm_1mol_jmol_typ[jmol_typ]){
     printf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
     printf("Error in number of atoms in molecule number %d\n",jmol_typ);
     printf("%d expected %d found\n",natm_mol,
                                     atommaps->natm_1mol_jmol_typ[jmol_typ]);
     printf("in file %s \n",filename_parse->mol_param_name[jmol_typ]);
     printf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
     fflush(stdout);
     exit(1);
    }
    istart = atommaps->jatm_jmol_typ_strt[jmol_typ];
    iend = atommaps->natm_1mol_jmol_typ[jmol_typ]+istart-1;
    for(jatm=istart;jatm<=iend;jatm++){
      clatoms_info->text_atm[jatm] = class_parse->text_nhc_mol[jmol_typ];
    }
}

variable_types: struct clatoms_info { int natm_tot; int pi_beads; int pi_beads_proc; int pi_beads_proc_st; int pi_beads_proc_end; int nfree; int nfree_pimd; int nchrg; int pi_beads_full_ter; int pi_beads_res_ter; int pi_beads_full_tra; int pi_beads_res_tra; int cg_reset_flag; int natm_mall; int nchrg_mall; int hess_calc; int natm_proc; int N_H2; int i_H2_start; int nab_initio; int myatm_start; double gamma_adb; double wght_pimd; double pi_temperature; double pi_beads_full_ter_wght; double pi_beads_res_ter_wght; double pi_beads_full_tra_wght; double pi_beads_res_tra_wght; double rcut_spread; double mass_sc_fact; int *ip_lab; int *ichrg; int *cp_vlnc_up; int *cp_atm_flag; double *mass; double *q; double *alp_pol; double *b_neut; double *roll_sc; double *text_atm; double *text_mol; double *xold; double *prekf; double *xmod; double alp_ewd; } *

variable_types: struct ghost_atoms { int nghost_tot; int natm_comp_max; int nghost_mall; int nghost_old; int ncomp_mall; int ncomp_old; int *ighost_map; int *natm_comp; int **iatm_comp; double **coef; } *

variable_types: struct atommaps { int nmol_typ; int nres_typ; int natm_typ; int nfreeze; int nfreeze_mall; int natm_typ_mall; int nres_typ_max; int nres_max; int nres_tot; int nres_sum; int pimd_freez_typ; char (*atm_typ)[50]; char (*res_typ)[50]; char (*mol_typ)[50]; int *nmol_jmol_typ; int *nres_1mol_jmol_typ; int *jatm_jmol_typ_strt; int *jres_jmol_typ_strt; int *ires_typ_jres_jmol_typ; int *jatm_jres_1mol_jmol_typ_strt; int *natm_1mol_jmol_typ; int *natm_jres_jmol_typ; int *nfree_1mol_jmol_typ; int *nfree_jres_jmol_typ; int *icons_jmol_typ; int *icons_jres_jmol_typ; int *natm_jmol_typ; int *iatm_mol_typ; int *iatm_res_typ; int *iatm_atm_typ; int *iatm_atm_typ_nl; int *iatm_atm_typ_nl_rev; int *imap_atm_typ_nl; int *imap_atm_typ_nl_gh; int *iatm_mol_num; int *iatm_proc_num; int *iatm_res_num; int *ighost_flag; int *freeze_flag; int *freeze_map; int *atom_label; int *cp_atm_lst; } *

variable_types: struct bonded { struct bond { int npow; int ntyp_pow; int ncon; int ntyp_con; int nbond_pow_mall; int nbond_typ_pow_mall; int nbond_con_mall; int nbond_typ_con_mall; int block_pow_on; int ncon_tot; int ncon_max; int nblock_pow; int nblock_con; int *j1_pow; int *jtyp_pow; int *j1_con; int *jtyp_con; int *iblock_pow_size; int *iblock_pow_conflict_1; int *iblock_con_size; int *iblock_con_conflict_1; double *eq_pow; double *eq_pow_res; double *c_0; double *dc_0; double *al_con; double *eq_con; } bond; struct grp_bond_con { int num_33; int num_21; int num_43; int ntyp_33; int num_23; int ntyp_23; int num_46; int ntyp_46; int max_iter; int ngrp_21_mall; int ngrp_33_mall; int ngrp_43_mall; int ngrp_23_mall; int ngrp_46_mall; int ngrp_typ_21_mall; int ngrp_typ_33_mall; int ngrp_typ_43_mall; int ngrp_typ_23_mall; int ngrp_typ_46_mall; int num_21_tot; double tol; int *j1_33; int *j1_21; int *j2_43; int *jtyp_33; int *j1_23; int *jtyp_23; int *j1_46; int *jtyp_46; double **al_33; double **al_23; double **al_21; double **eq_21; double **al_46; int ncons_gather_tot; int ncons_gather; int ncons_gather_max; int *ind_gather_fwd; int *ind_gather_bck; int *ind_gather_scr; } grp_bond_con; struct grp_bond_watts { int num_33; int num_33_tot; int ntyp_33; int ngrp_33_mall; int ngrp_typ_33_mall; int *j1_33; int *jtyp_33; double *cos_thet0_2; double **eq_33; double **c_0_33; double **c_4_33; double **dc_0_33; double **dc_4_33; } grp_bond_watts; struct constrnt { int iconstrnt; int iroll; int max_iter; double tolshake; double tolratl; } constrnt; struct bond_free { int num; int j1; int npow; int nhist; double fk; double eq; double del; double rmin; double rmax; char *file; double *hist; } bond_free; struct bend { int npow; int ntyp_pow; int ncon; int ntyp_con; int nbend_pow_mall; int nbend_typ_pow_mall; int nbend_con_mall; int nbend_typ_con_mall; int block_pow_on; int ncon_tot; int nblock_pow; int nblock_con; int *j1_pow; int *jtyp_pow; int *j1_con; int *jtyp_con; int *iblock_pow_size; int *iblock_pow_conflict_1; int *iblock_pow_conflict_3; int *iblock_con_size; int *iblock_con_conflict_1; int *iblock_con_conflict_3; double *eq_pow; double *c_0; double *s_0; double *dc_0; double *ds_0; double *al_con; double *eq_con; } bend; struct bend_free { int num; int j1; int npow; int nhist; double fk; double eq; double del; char *file; double *hist; } bend_free; struct bend_bnd { int num; int ntyp; int nbend_bnd_mall; int nbend_bnd_typ_mall; int block_on; int nblock; int *j1; int *jtyp; int *iblock_size; int *iblock_conflict_1; int *iblock_conflict_3; double *eq_bond; double *eq_bend; double *cbond_0; double *dcbond_0; double *cbend_0; double *sbend_0; double *dcbend_0; double *dsbend_0; } bend_bnd; struct tors { int npow; int ntyp_pow; int nimpr; int ncon; int ntyp_con; int ntors_pow_mall; int ntors_typ_pow_mall; int ntors_con_mall; int ntors_typ_con_mall; int block_pow_on; int block_con_on; int ncon_tot; int nblock_pow; int nblock_con; int *j1_pow; int *jtyp_pow; int *j1_con; int *jtyp_con; int *iblock_pow_size; int *iblock_pow_conflict_1; int *iblock_pow_conflict_3; int *iblock_con_size; int *iblock_con_conflict_1; int *iblock_con_conflict_3; double *c_0; double *s_0; double *dc_0; double *ds_0; double *eq_pow; double *al_con; double *eq_con; } tors; struct tors_free { int num; int npow; int nhist; int j1[3]; double fk; double eq[3]; double del; char *file; double *hist; double **hist_2d; } tors_free; struct rbar_sig_free { int nfree; int nhist_bar; int iopt; int *j1; double fk_bar; double fk_sigma; double eq_bar; double eq_sigma; double del_bar; double rmin; double smin; double rnfree; double **hist; double **hist_rn; char *file; } rbar_sig_free; struct onfo { int num; int ntyp; int nonfo_mall; int nonfo_typ_mall; int block_on; int nblock; int *j1; int *jtyp; int *iblock_size; int *iblock_conflict_1; double *feps; double *s6; double *sc; } onfo; struct ecor { int nsplin; int num; int block_on; int nblock; int nktot_res; int necor_mall; double alp_ewd; double ecut; double rmin_spl; double rmax_spl; double dr_spl; int *j1; int *iblock_size; int *iblock_conflict_1; double *cv0; } ecor; struct excl { int nlst; int nlst_root; int num_cp; int *num; int *j; int *j_off; int *j1_cp; } excl; struct intra_scr { int nlen; double wght_ter; double wght_ter_res; double wght_tra; double wght_tra_res; double int_res_inter; int *iatm_typ; int *jatm_typ; double *vpot; double *p11; double *p21; double *p31; double *x1; double *x2; double *x3; double *x4; double *x5; double *x6; double *x7; double *x8; double *fx1; double *fx2; double *fx3; double *fx4; double *dx12; double *dx13; double *dx23; double *dx42; double *dx43; double *dx56; double *dx57; double *dx67; double *dx86; double *dx87; double *c_0; double *dc_0; double *ds_0; double *s_0; double *eq; double *m1; double *vx1; double *vx2; double *sc_1; double *sc; double *q1; double *rmin; double *dri; double *vcut_coul; double *del_r; double *swit; double *cutoff_res; } intra_scr; } *

variable_types: struct resbond_parse { int nresidue; int nres_bond; int ionfo; int iconv; struct resbond_prm { int opt; int res1_index; int iatm_res1_site; int natm_res1_1back; char label[50]; char res1_typ[50]; char res1_site[50]; char res1_file[50]; int improp_res1[5]; int iatm_res1_1back[7]; int natm_res1_2back[7]; int iatm_res1_2back[7][7]; } *resbond_prm; int *nres_bond1_jres; int *res_bond1_index; int *res_bond1_off; } *

variable_types: struct build_intra { struct bond_site { char bond_site_name[5][50]; int branch_1[5]; int branch_2[5]; int valence; int improper_ind[5]; } *bond_site; int *mask_atm; int *index_atm; int *iatm_ind_chk; int *ires_ind_chk; int natm_1res_pure_now; int natm_tot_max; int nfreeze_max; int nfreeze_now; int natm_1res_now; int natm_1res_max; int natmind_1res_now; int natmind_1res_max; int nghost_now; int nghost_tot_max; int nbond_pow_max; int nbond_con_max; int nbond_nul_max; int nbond_typ_pow_max; int nbond_typ_con_max; struct CBOND { char atm1[50]; } *cbond_typ_pow; struct CBOND *cbond_typ_con; struct CBOND *cbond_typ_now; int nbend_pow_max; int nbend_con_max; int nbend_nul_max; int nbend_typ_pow_max; int nbend_typ_con_max; struct CBEND { char atm1[50]; } *cbend_typ_pow; struct CBEND *cbend_typ_con; struct CBEND *cbend_typ_now; int ntors_pow_max; int ntors_con_max; int ntors_nul_max; int ntors_typ_pow_max; int ntors_typ_con_max; struct CTORS { char atm1[50]; } *ctors_typ_pow; struct CTORS *ctors_typ_con; struct CTORS *ctors_typ_now; int nonfo_max; int nonfo_nul_max; int nonfo_typ_max; struct CBOND *confo_typ; struct CBOND *confo_typ_now; int nbend_bnd_max; int nbend_bnd_typ_max; struct CBEND *cbend_bnd_typ; struct CBEND *cbend_bnd_typ_now; int ngrp_33_max; int ngrp_watt_33_max; int ngrp_21_max; int ngrp_43_max; int ngrp_23_max; int ngrp_46_max; int ngrp_typ_21_max; int ngrp_typ_43_max; int ngrp_typ_33_max; int ngrp_typ_watt_33_max; int ngrp_typ_23_max; int ngrp_typ_46_max; struct CGRP_CONS { char atm1[50]; } *cgrp_typ_now; struct CGRP_CONS *cgrp_typ_21; struct CGRP_CONS *cgrp_typ_43; struct CGRP_CONS *cgrp_typ_33; struct CGRP_CONS *cgrp_typ_watt_33; struct CGRP_CONS *cgrp_typ_23; struct CGRP_CONS *cgrp_typ_46; int natm_typ_max; int nres_typ_max; char *strip1; int *ibend_bnd_typ_pure; int *ibend_bnd_typ_map; } *

variable_types: struct filename_parse { char *simname; char *molsetname; char *dnamei; char *dnameci; char *input_name; char def_vps_name[50]; char user_vps_name[50]; char def_inter_name[50]; char user_inter_name[50]; char def_surf_name[50]; char user_surf_name[50]; char (*def_intra_name)[50]; char (*mol_param_name)[50]; char (*res_param_name)[50]; char (*res_fix_name)[50]; char (*user_intra_name)[50]; char (*vps_name)[50]; } *

variable_types: struct free_parse { int *imoltyp_bond_free; int *imol_bond_free; int *ires_bond_free; int *iatm_bond_free; int *imoltyp_bend_free; int *imol_bend_free; int *ires_bend_free; int *iatm_bend_free; int *imoltyp_tors_free; int *imol_tors_free; int *ires_tors_free; int *iatm_tors_free; int nbar_bond; int *imoltyp_rbar1_free; int *imoltyp_rbar2_free; int *imol_rbar1_free; int *imol_rbar2_free; int *ires_rbar1_free; int *ires_rbar2_free; int *iatm_rbar1_free; int *iatm_rbar2_free; } *

variable_types: struct class_parse { int ivx_smpl; int ivx_scale; int kmax_ewd; int istart; int ishift_pot; int initial_spread_opt; int zero_com_vel; double tau_vol; double tau_nhc_def; int *imol_nhc_opt; int *ionfo_opt; int *ires_bond_conv; int *mol_freeze_opt; int *mol_hydrog_mass_opt; int *mol_hydrog_con_opt; double *tau_nhc_mol; double *text_nhc_mol; double *mol_hydrog_mass_val; } *

variable_types: struct null_inter_parse { int nbond_nul; int ntors_nul; int *jbond1_nul; int *jbend1_nul; int *jtors1_nul; int *jonfo1_nul; } *

variable_types: struct dict_intra { int num_fun_dict; int num_mol_name_dict; int num_atm_dict; int num_intra_dict; int num_res_name_dict; int num_res_def_dict; int num_res_bond_dict; struct dict_word { int iflag; char keyword[50]; char error_mes[100]; } *fun_dict; struct dict_word *atm_dict; struct dict_word *intra_dict; struct dict_word *mol_name_dict; struct dict_word *res_name_dict; struct dict_word *res_def_dict; struct dict_word *res_bond_dict; struct dict_word *word; } *

variable_types: iresidue int

variable_types: nresidue int

variable_types: iparm int

variable_types: i int

variable_types: istart int

variable_types: iend int

variable_types: jatm int

variable_types: iii int

return_type: void

user_defined_types: struct bonded { struct bond bond; struct grp_bond_con grp_bond_con; struct grp_bond_watts grp_bond_watts; struct constrnt constrnt; struct bond_free bond_free; struct bend bend; struct bend_free bend_free; struct bend_bnd bend_bnd; struct tors tors; struct tors_free tors_free; struct rbar_sig_free rbar_sig_free; struct onfo onfo; struct ecor ecor; struct excl excl; struct intra_scr intra_scr; }

user_defined_types: struct resbond_parse { int nresidue; int nres_bond; int ionfo; int iconv; struct resbond_prm *resbond_prm; int *nres_bond1_jres; int *res_bond1_index; int *res_bond1_off; }

user_defined_types: struct build_intra { struct bond_site *bond_site; int *mask_atm; int *index_atm; int *iatm_ind_chk; int *ires_ind_chk; int natm_1res_pure_now; int natm_tot_max; int nfreeze_max; int nfreeze_now; int natm_1res_now; int natm_1res_max; int natmind_1res_now; int natmind_1res_max; int nghost_now; int nghost_tot_max; int nbond_pow_max; int nbond_con_max; int nbond_nul_max; int nbond_typ_pow_max; int nbond_typ_con_max; struct CBOND *cbond_typ_pow; struct CBOND *cbond_typ_con; struct CBOND *cbond_typ_now; int nbend_pow_max; int nbend_con_max; int nbend_nul_max; int nbend_typ_pow_max; int nbend_typ_con_max; struct CBEND *cbend_typ_pow; struct CBEND *cbend_typ_con; struct CBEND *cbend_typ_now; int ntors_pow_max; int ntors_con_max; int ntors_nul_max; int ntors_typ_pow_max; int ntors_typ_con_max; struct CTORS *ctors_typ_pow; struct CTORS *ctors_typ_con; struct CTORS *ctors_typ_now; int nonfo_max; int nonfo_nul_max; int nonfo_typ_max; struct CBOND *confo_typ; struct CBOND *confo_typ_now; int nbend_bnd_max; int nbend_bnd_typ_max; struct CBEND *cbend_bnd_typ; struct CBEND *cbend_bnd_typ_now; int ngrp_33_max; int ngrp_watt_33_max; int ngrp_21_max; int ngrp_43_max; int ngrp_23_max; int ngrp_46_max; int ngrp_typ_21_max; int ngrp_typ_43_max; int ngrp_typ_33_max; int ngrp_typ_watt_33_max; int ngrp_typ_23_max; int ngrp_typ_46_max; struct CGRP_CONS *cgrp_typ_now; struct CGRP_CONS *cgrp_typ_21; struct CGRP_CONS *cgrp_typ_43; struct CGRP_CONS *cgrp_typ_33; struct CGRP_CONS *cgrp_typ_watt_33; struct CGRP_CONS *cgrp_typ_23; struct CGRP_CONS *cgrp_typ_46; int natm_typ_max; int nres_typ_max; char *strip1; int *ibend_bnd_typ_pure; int *ibend_bnd_typ_map; }

user_defined_types: struct dict_intra { int num_fun_dict; int num_mol_name_dict; int num_atm_dict; int num_intra_dict; int num_res_name_dict; int num_res_def_dict; int num_res_bond_dict; struct dict_word *fun_dict; struct dict_word *atm_dict; struct dict_word *intra_dict; struct dict_word *mol_name_dict; struct dict_word *res_name_dict; struct dict_word *res_def_dict; struct dict_word *res_bond_dict; struct dict_word *word; }