private void fixNCNTypes ( String [ ] symbs , int [ ] [ ] graph ) { for ( int v = 0 ; v < graph . length ; v ++ ) { if ( "NCN+" . equals ( symbs [ v ] ) ) { boolean foundCNN = false ; for ( int w : graph [ v ] ) { foundCNN = foundCNN || "CNN+" . equals ( symbs [ w ] ) || "CIM+" . equals ( symbs [ w ] ) ; } if ( ! foundCNN ) { symbs [ v ] = "NC=N" ; } } } }
Special case NCN + matches entries that the validation suite say should actually be NC = N . We can achieve 100% compliance by checking if NCN + is still next to CNN + or CIM + after aromatic types are assigned