public static Stereo getStereo ( IAtom atom1 , IAtom atom2 , IAtom atom3 , IAtom atom4 ) { // a normal is calculated for the base atoms (2, 3, 4) and compared to // the first atom. PLUS indicates ACW. TetrahedralSign sign = StereoTool . getHandedness ( atom2 , atom3 , atom4 , atom1 ) ; if ( sign == TetrahedralSign . PLUS ) { return Stereo . ANTI_CLOCKWISE ; } else { return Stereo . CLOCKWISE ; } }
Take four atoms and return Stereo . CLOCKWISE or Stereo . ANTI_CLOCKWISE . The first atom is the one pointing towards the observer .