public static int isTetrahedral ( IAtomContainer container , IAtom atom , boolean strict ) { List < IAtom > atoms = container . getConnectedAtomsList ( atom ) ; if ( atoms . size ( ) != 4 ) { return ( 0 ) ; } List < IBond > bonds = container . getConnectedBondsList ( atom ) ; int up = 0 ; int down = 0 ; for ( IBond bond : bonds ) { if ( bond . getStereo ( ) == IBond . Stereo . NONE || bond . getStereo ( ) == CDKConstants . UNSET ) { } else if ( bond . getStereo ( ) == IBond . Stereo . UP ) { up ++ ; } else if ( bond . getStereo ( ) == IBond . Stereo . DOWN ) { down ++ ; } } if ( up == 1 && down == 1 ) { return 1 ; } if ( up == 2 && down == 2 ) { if ( stereosAreOpposite ( container , atom ) ) { return 2 ; } return 0 ; } if ( up == 1 && down == 0 && ! strict ) { return 3 ; } if ( down == 1 && up == 0 && ! strict ) { return 4 ; } if ( down == 2 && up == 1 && ! strict ) { return 5 ; } if ( down == 1 && up == 2 && ! strict ) { return 6 ; } return 0 ; }
Says if an atom as a center of a tetrahedral chirality . This method uses wedge bonds . 3D coordinates are not taken into account . If there are no wedge bonds around a potential stereo center it will not be found .