third_party/inchi/INCHI_BASE/src/ichister.c
int FixUnkn0DStereoBonds( inp_ATOM *at, int num_at )
{
    int i, m, num = 0;

    /* Add usual Unknown stereobond descriptors to each Unknown bond */
    for (i = 0; i < num_at; i++)
    {
        for (m = 0; m < MAX_NUM_STEREO_BONDS && at[i].sb_parity[m]; m++)
        {
            if (AB_PARITY_UNKN == at[i].sb_parity[m])
            {
                at[i].bond_stereo[(int) at[i].sb_ord[m]] = STEREO_DBLE_EITHER;
                num++;
            }
        }
    }
#ifdef NEVER
    if (num)
    {
        int j;
        /* how to remove Unknown stereo bond parities */
        for (i = 0; i < num_at; i++)
        {
            for (m = 0; m < MAX_NUM_STEREO_BONDS && at[i].sb_parity[m]; m++)
            {
                if (AB_PARITY_UNKN == at[i].sb_parity[m])
                {
                    for (j = m + 1; j < MAX_NUM_STEREO_BONDS; j++)
                    {
                        at[i].sb_parity[j - 1] = at[i].sb_parity[j];
                        at[i].sb_ord[j - 1] = at[i].sb_ord[j];
                        at[i].sn_ord[j - 1] = at[i].sn_ord[j];
                        at[i].sn_orig_at_num[j - 1] = at[i].sn_orig_at_num[j];
                    }
                    at[i].sb_parity[j - 1] = 0;
                    at[i].sb_ord[j - 1] = 0;
                    at[i].sn_ord[j - 1] = 0;
                    at[i].sn_orig_at_num[j - 1] = 0;
                }
            }
        }
    }
#endif

    return num;
}
/****************************************************************************
 without this InChI fails on reconstructed  CID=450438
 (isotopic, Unknown SB adjacent to SB with known parity)
****************************************************************************/
without this InChI fails on reconstructed  CID=450438
(isotopic, Unknown SB adjacent to SB with known parity)
without this InChI fails on reconstructed CID = 450438 ( isotopic Unknown SB adjacent to SB with known parity )
int FixUnkn0DStereoBonds( inp_ATOM *at, int num_at )
{
    int i, m, num = 0;
    for (i = 0; i < num_at; i++)
    {
        for (m = 0; m < MAX_NUM_STEREO_BONDS && at[i].sb_parity[m]; m++)
        {
            if (AB_PARITY_UNKN == at[i].sb_parity[m])
            {
                at[i].bond_stereo[(int) at[i].sb_ord[m]] = STEREO_DBLE_EITHER;
                num++;
            }
        }
    }
#ifdef NEVER
    if (num)
    {
        int j;
        for (i = 0; i < num_at; i++)
        {
            for (m = 0; m < MAX_NUM_STEREO_BONDS && at[i].sb_parity[m]; m++)
            {
                if (AB_PARITY_UNKN == at[i].sb_parity[m])
                {
                    for (j = m + 1; j < MAX_NUM_STEREO_BONDS; j++)
                    {
                        at[i].sb_parity[j - 1] = at[i].sb_parity[j];
                        at[i].sb_ord[j - 1] = at[i].sb_ord[j];
                        at[i].sn_ord[j - 1] = at[i].sn_ord[j];
                        at[i].sn_orig_at_num[j - 1] = at[i].sn_orig_at_num[j];
                    }
                    at[i].sb_parity[j - 1] = 0;
                    at[i].sb_ord[j - 1] = 0;
                    at[i].sn_ord[j - 1] = 0;
                    at[i].sn_orig_at_num[j - 1] = 0;
                }
            }
        }
    }
#endif
    return num;
}
int FixUnkn0DStereoBonds ( inp_ATOM * at , int num_at ) { int i , m , num = 0 ; for ( i = 0 ; i < num_at ; i ++ ) { for ( m = 0 ; m < MAX_NUM_STEREO_BONDS && at [ i ] . sb_parity [ m ] ; m ++ ) { if ( AB_PARITY_UNKN == at [ i ] . sb_parity [ m ] ) { at [ i ] . bond_stereo [ ( int ) at [ i ] . sb_ord [ m ] ] = STEREO_DBLE_EITHER ; num ++ ; } } } #ifdef NEVER if ( num ) { int j ; for ( i = 0 ; i < num_at ; i ++ ) { for ( m = 0 ; m < MAX_NUM_STEREO_BONDS && at [ i ] . sb_parity [ m ] ; m ++ ) { if ( AB_PARITY_UNKN == at [ i ] . sb_parity [ m ] ) { for ( j = m + 1 ; j < MAX_NUM_STEREO_BONDS ; j ++ ) { at [ i ] . sb_parity [ j - 1 ] = at [ i ] . sb_parity [ j ] ; at [ i ] . sb_ord [ j - 1 ] = at [ i ] . sb_ord [ j ] ; at [ i ] . sn_ord [ j - 1 ] = at [ i ] . sn_ord [ j ] ; at [ i ] . sn_orig_at_num [ j - 1 ] = at [ i ] . sn_orig_at_num [ j ] ; } at [ i ] . sb_parity [ j - 1 ] = 0 ; at [ i ] . sb_ord [ j - 1 ] = 0 ; at [ i ] . sn_ord [ j - 1 ] = 0 ; at [ i ] . sn_orig_at_num [ j - 1 ] = 0 ; } } } } #endif return num ; }
without this InChI fails on reconstructed  CID=450438
(isotopic, Unknown SB adjacent to SB with known parity)
without this InChI fails on reconstructed CID = 450438 ( isotopic Unknown SB adjacent to SB with known parity )
/* Add usual Unknown stereobond descriptors to each Unknown bond */ /* how to remove Unknown stereo bond parities */