/** * A very simple aromaticity model which only allows atoms adjacent to * cyclic pi bonds. Lone pairs are not consider and as such molecules like * furan and pyrrole are non-aromatic. The model is useful for storing * aromaticity in MDL and Mol2 file formats where aromatic systems involving * a lone pair can not be properly represented. * * @return electron donation model to use for aromaticity perception */ public static ElectronDonation piBonds() { return new PiBondModel(); }
/** * Check if the number electrons in the {@code cycle} could delocalise. The * {@code contributions} array indicates how many π-electrons each atom can * contribute. * * @param cycle closed walk (last and first vertex the same) of * vertices which form a cycle * @param contributions π-electron contribution from each atom * @return the number of electrons indicate they could delocalise */ private static boolean checkElectronSum(final int[] cycle, final int[] contributions, final int[] subset) { return validSum(electronSum(cycle, contributions, subset)); }
/** * Lookup of the number of valence electrons for the element at a given * charge. * * @param element the atomic number of an element * @param charge the formal charge on the atom * @return the valence * @throws UnsupportedOperationException encountered an element which the * valence was not encoded for */ private int valence(int element, int charge) { return valence(element - charge); }
private static boolean atomIsPotentiallyAromatic(IAtom atom) { if (atom.getHybridization() == Hybridization.SP2) return true; if (atom.getHybridization() == Hybridization.PLANAR3) return true; if (atom.getHybridization() == Hybridization.SP3 && getLonePairCount(atom) > 0) return true; return false; }
private static boolean atomIsPotentiallyAromatic(IAtom atom) { if (atom.getHybridization() == Hybridization.SP2) return true; if (atom.getHybridization() == Hybridization.PLANAR3) return true; if (atom.getHybridization() == Hybridization.SP3 && getLonePairCount(atom) > 0) return true; return false; }