private int getHybridisationState ( IAtom atom1 ) { IBond . Order maxBondOrder = atom1 . getMaxBondOrder ( ) ; // if (atom1.getFormalNeighbourCount() == 1 || maxBondOrder > 4) { if ( atom1 . getFormalNeighbourCount ( ) == 1 ) { // WTF?? } else if ( atom1 . getFormalNeighbourCount ( ) == 2 || maxBondOrder == IBond . Order . TRIPLE ) { return 1 ; //sp } else if ( atom1 . getFormalNeighbourCount ( ) == 3 || ( maxBondOrder == IBond . Order . DOUBLE ) ) { return 2 ; //sp2 } else { return 3 ; //sp3 } return - 1 ; }
Gets the hybridisation state of an atom .