private IStereoElement newTetrahedral ( int u , int [ ] vs , IAtom [ ] atoms , Configuration c ) { // no way to handle tetrahedral configurations with implicit // hydrogen or lone pair at the moment if ( vs . length != 4 ) { // sanity check if ( vs . length != 3 ) return null ; // there is an implicit hydrogen (or lone-pair) we insert the // central atom in sorted position vs = insert ( u , vs ) ; } // @TH1/@TH2 = anti-clockwise and clockwise respectively Stereo stereo = c == Configuration . TH1 ? Stereo . ANTI_CLOCKWISE : Stereo . CLOCKWISE ; return new TetrahedralChirality ( atoms [ u ] , new IAtom [ ] { atoms [ vs [ 0 ] ] , atoms [ vs [ 1 ] ] , atoms [ vs [ 2 ] ] , atoms [ vs [ 3 ] ] } , stereo ) ; }
Creates a tetrahedral element for the given configuration . Currently only tetrahedral centres with 4 explicit atoms are handled .