@Test
public void ionicBondsInLiAlH4() throws Exception {

    SmilesParser sp = new SmilesParser(SilentChemObjectBuilder.getInstance());
    IAtomContainer mol = sp.parseSmiles("[Li+].[Al+3].[Cl-].[Cl-].[Cl-].[Cl-]");
    layout(mol);
    for (IAtom atom : mol.atoms())
        assertNotNull(atom.getPoint2d());
    for (int i = 2; i < 5; i++) {
        double distLi = mol.getAtom(0).getPoint2d().distance(mol.getAtom(i).getPoint2d());
        double distAl = mol.getAtom(1).getPoint2d().distance(mol.getAtom(i).getPoint2d());
        double diffLi = distLi - 1.5*SDG.getBondLength();
        double diffAl = distAl - 1.5*SDG.getBondLength();
        if (Math.abs(diffLi) > 0.001 && Math.abs(diffAl) > 0.001)
            fail("Chlorine must be bond length from Al or Li atoms");
    }
}