third_party/inchi/INCHI_BASE/src/ichister.c
int bCanAtomHaveAStereoBond( char *elname, S_CHAR charge, S_CHAR radical )
{
    static const char   szElem[][3] = { "C\000", "Si", "Ge", "N\000", "N\000" };
    static const S_CHAR   cCharge[] = { 0,        0,    0,   0,       1, };
    static const int       n = sizeof( szElem ) / sizeof( szElem[0] );
    int i, ret = 0;
    for (i = 0; i < n; i++)
    {
        if (!strcmp( elname, szElem[i] ) && ( charge == cCharge[i] ))
        {
            ret = ( !radical || radical == RADICAL_SINGLET );
            break;
        }
    }
    return ret;
}
/****************************************************************************
 used for atoms adjacent to stereogenic bonds only
****************************************************************************/
used for atoms adjacent to stereogenic bonds only
used for atoms adjacent to stereogenic bonds only
int bCanAtomHaveAStereoBond( char *elname, S_CHAR charge, S_CHAR radical )
{
    static const char   szElem[][3] = { "C\000", "Si", "Ge", "N\000", "N\000" };
    static const S_CHAR   cCharge[] = { 0,        0,    0,   0,       1, };
    static const int       n = sizeof( szElem ) / sizeof( szElem[0] );
    int i, ret = 0;
    for (i = 0; i < n; i++)
    {
        if (!strcmp( elname, szElem[i] ) && ( charge == cCharge[i] ))
        {
            ret = ( !radical || radical == RADICAL_SINGLET );
            break;
        }
    }
    return ret;
}
int bCanAtomHaveAStereoBond ( char * elname , S_CHAR charge , S_CHAR radical ) { static const char szElem [ ] [ 3 ] = { " \000 " , " " , " " , " \000 " , " \000 " } ; static const S_CHAR cCharge [ ] = { 0 , 0 , 0 , 0 , 1 , } ; static const int n = sizeof ( szElem ) / sizeof ( szElem [ 0 ] ) ; int i , ret = 0 ; for ( i = 0 ; i < n ; i ++ ) { if ( ! strcmp ( elname , szElem [ i ] ) && ( charge == cCharge [ i ] ) ) { ret = ( ! radical || radical == RADICAL_SINGLET ) ; break ; } } return ret ; }
used for atoms adjacent to stereogenic bonds only
used for atoms adjacent to stereogenic bonds only