@ Override public StereoEncoder create ( IAtomContainer container , int [ ] [ ] graph ) { List < StereoEncoder > encoders = new ArrayList < StereoEncoder > ( 5 ) ; for ( IBond bond : container . bonds ( ) ) { // if double bond and not E or Z query bond if ( DOUBLE . equals ( bond . getOrder ( ) ) && ! E_OR_Z . equals ( bond . getStereo ( ) ) ) { IAtom left = bond . getBegin ( ) ; IAtom right = bond . getEnd ( ) ; // skip -N=N- double bonds which exhibit inversion if ( Integer . valueOf ( 7 ) . equals ( left . getAtomicNumber ( ) ) && Integer . valueOf ( 7 ) . equals ( right . getAtomicNumber ( ) ) ) continue ; StereoEncoder encoder = newEncoder ( container , left , right , right , left , graph ) ; if ( encoder != null ) { encoders . add ( encoder ) ; } } } return encoders . isEmpty ( ) ? StereoEncoder . EMPTY : new MultiStereoEncoder ( encoders ) ; }
Create a stereo encoder for all potential 2D and 3D double bond stereo configurations .