third_party/inchi/INCHI_BASE/src/runichi3.c
void OAD_PolymerUnit_DebugTrace( OAD_PolymerUnit *u )
{
    char *conn = "ABSENT", *typ = "ABSENT", *styp = "ABSENT";

    if (!u)
    {
        return;
    }

    if (u->conn == 1)
    {
        conn = "HT";
    }
    else if (u->conn == 2)
    {
        conn = "HH";
    }
    else if (u->conn == 3)
    {
        conn = "EU";
    }

    if (u->type == 0)
    {
        typ = "NONE";
    }
    else if (u->type == 1)
    {
        typ = "SRU";
    }
    else if (u->type == 2)
    {
        typ = "MON";
    }
    else if (u->type == 3)
    {
        typ = "COP";
    }
    else if (u->type == 4)
    {
        typ = "MOD";
    }
    else if (u->type == 5)
    {
        typ = "MER";
    }

    if (u->subtype == 1)
    {
        styp = "ALT";
    }
    else if (u->subtype == 2)
    {
        styp = "RAN";
    }
    else if (u->subtype == 3)
    {
        styp = "BLK";
    }

    {
        int i, k;
        int na, nb;

        ITRACE_("\n\nPOLYMER UNIT @ %-p", u);

        ITRACE_( "\n\tid=%-d   label=%-d   type=%-s   subtype=%-s   conn=%-s   subscr='%-s'\n",
                u->id, u->label, typ, styp, conn, u->smt );

        ITRACE_( "\tBracket1 coords: %-f, %-f, %-f, %-f\n", u->xbr1[0], u->xbr1[1], u->xbr1[2], u->xbr1[3] );
        ITRACE_( "\tBracket2 coords: %-f, %-f, %-f, %-f\n", u->xbr2[0], u->xbr2[1], u->xbr2[2], u->xbr2[3] );

        na = u->na;
        ITRACE_( "\t%-d atoms { ", na );
        for (k = 0; k < na - 1; k++)
        {
            ITRACE_( " %-d, ", u->alist[k] );
        }
        ITRACE_( " %-d }\n", u->alist[na - 1] );

        nb = u->nb;
        ITRACE_( "\t%-d bonds crossing unit borders { ", nb );

        for (k = 0; k < nb; k++)
        {
            ITRACE_( " %-d-%-d ", u->blist[2 * k], u->blist[2 * k + 1] );
        }
        ITRACE_( "}\n" );

        ITRACE_( "\tCRU caps and end atoms { " );

        ITRACE_( "*%-d-[-%-d(end1) ... ", u->cap1, u->end_atom1 );
        ITRACE_( "%-d(end2)-]-*%-d", u->end_atom2, u->cap2 );
        ITRACE_( " }\n" );

        ITRACE_( "\tBackbone bonds (may include 'artificially cyclizing' one) : %-d bonds ", u->nbkbonds );
        if (u->nbkbonds)
        {
            ITRACE_(" { ");
            for (i = 0; i < u->nbkbonds; i++)
            {
                ITRACE_( "(%-d, %-d)  ", u->bkbonds[i][0], u->bkbonds[i][1] );
            }
            ITRACE_("}\n");
        }
    }
    

    return;
}
/****************************************************************************
 Debug print polymer data for a given SRU
****************************************************************************/
Debug print polymer data for a given SRU
Debug print polymer data for a given SRU
void OAD_PolymerUnit_DebugTrace( OAD_PolymerUnit *u )
{
    char *conn = "ABSENT", *typ = "ABSENT", *styp = "ABSENT";
    if (!u)
    {
        return;
    }
    if (u->conn == 1)
    {
        conn = "HT";
    }
    else if (u->conn == 2)
    {
        conn = "HH";
    }
    else if (u->conn == 3)
    {
        conn = "EU";
    }
    if (u->type == 0)
    {
        typ = "NONE";
    }
    else if (u->type == 1)
    {
        typ = "SRU";
    }
    else if (u->type == 2)
    {
        typ = "MON";
    }
    else if (u->type == 3)
    {
        typ = "COP";
    }
    else if (u->type == 4)
    {
        typ = "MOD";
    }
    else if (u->type == 5)
    {
        typ = "MER";
    }
    if (u->subtype == 1)
    {
        styp = "ALT";
    }
    else if (u->subtype == 2)
    {
        styp = "RAN";
    }
    else if (u->subtype == 3)
    {
        styp = "BLK";
    }
    {
        int i, k;
        int na, nb;
        ITRACE_("\n\nPOLYMER UNIT @ %-p", u);
        ITRACE_( "\n\tid=%-d   label=%-d   type=%-s   subtype=%-s   conn=%-s   subscr='%-s'\n",
                u->id, u->label, typ, styp, conn, u->smt );
        ITRACE_( "\tBracket1 coords: %-f, %-f, %-f, %-f\n", u->xbr1[0], u->xbr1[1], u->xbr1[2], u->xbr1[3] );
        ITRACE_( "\tBracket2 coords: %-f, %-f, %-f, %-f\n", u->xbr2[0], u->xbr2[1], u->xbr2[2], u->xbr2[3] );
        na = u->na;
        ITRACE_( "\t%-d atoms { ", na );
        for (k = 0; k < na - 1; k++)
        {
            ITRACE_( " %-d, ", u->alist[k] );
        }
        ITRACE_( " %-d }\n", u->alist[na - 1] );
        nb = u->nb;
        ITRACE_( "\t%-d bonds crossing unit borders { ", nb );
        for (k = 0; k < nb; k++)
        {
            ITRACE_( " %-d-%-d ", u->blist[2 * k], u->blist[2 * k + 1] );
        }
        ITRACE_( "}\n" );
        ITRACE_( "\tCRU caps and end atoms { " );
        ITRACE_( "*%-d-[-%-d(end1) ... ", u->cap1, u->end_atom1 );
        ITRACE_( "%-d(end2)-]-*%-d", u->end_atom2, u->cap2 );
        ITRACE_( " }\n" );
        ITRACE_( "\tBackbone bonds (may include 'artificially cyclizing' one) : %-d bonds ", u->nbkbonds );
        if (u->nbkbonds)
        {
            ITRACE_(" { ");
            for (i = 0; i < u->nbkbonds; i++)
            {
                ITRACE_( "(%-d, %-d)  ", u->bkbonds[i][0], u->bkbonds[i][1] );
            }
            ITRACE_("}\n");
        }
    }
    return;
}
void OAD_PolymerUnit_DebugTrace ( OAD_PolymerUnit * u ) { char * conn = " " , * typ = " " , * styp = " " ; if ( ! u ) { return ; } if ( u -> conn == 1 ) { conn = " " ; } else if ( u -> conn == 2 ) { conn = " " ; } else if ( u -> conn == 3 ) { conn = " " ; } if ( u -> type == 0 ) { typ = " " ; } else if ( u -> type == 1 ) { typ = " " ; } else if ( u -> type == 2 ) { typ = " " ; } else if ( u -> type == 3 ) { typ = " " ; } else if ( u -> type == 4 ) { typ = " " ; } else if ( u -> type == 5 ) { typ = " " ; } if ( u -> subtype == 1 ) { styp = " " ; } else if ( u -> subtype == 2 ) { styp = " " ; } else if ( u -> subtype == 3 ) { styp = " " ; } { int i , k ; int na , nb ; ITRACE_ ( " \n \n " , u ) ; ITRACE_ ( " \n \t \n " , u -> id , u -> label , typ , styp , conn , u -> smt ) ; ITRACE_ ( " \t \n " , u -> xbr1 [ 0 ] , u -> xbr1 [ 1 ] , u -> xbr1 [ 2 ] , u -> xbr1 [ 3 ] ) ; ITRACE_ ( " \t \n " , u -> xbr2 [ 0 ] , u -> xbr2 [ 1 ] , u -> xbr2 [ 2 ] , u -> xbr2 [ 3 ] ) ; na = u -> na ; ITRACE_ ( " \t " , na ) ; for ( k = 0 ; k < na - 1 ; k ++ ) { ITRACE_ ( " " , u -> alist [ k ] ) ; } ITRACE_ ( " \n " , u -> alist [ na - 1 ] ) ; nb = u -> nb ; ITRACE_ ( " \t " , nb ) ; for ( k = 0 ; k < nb ; k ++ ) { ITRACE_ ( " " , u -> blist [ 2 * k ] , u -> blist [ 2 * k + 1 ] ) ; } ITRACE_ ( " \n " ) ; ITRACE_ ( " \t " ) ; ITRACE_ ( " " , u -> cap1 , u -> end_atom1 ) ; ITRACE_ ( " " , u -> end_atom2 , u -> cap2 ) ; ITRACE_ ( " \n " ) ; ITRACE_ ( " \t " , u -> nbkbonds ) ; if ( u -> nbkbonds ) { ITRACE_ ( " " ) ; for ( i = 0 ; i < u -> nbkbonds ; i ++ ) { ITRACE_ ( " " , u -> bkbonds [ i ] [ 0 ] , u -> bkbonds [ i ] [ 1 ] ) ; } ITRACE_ ( " \n " ) ; } } return ; }
Debug print polymer data for a given SRU
Debug print polymer data for a given SRU