  The structural and electronic properties of the clathrate compounds
Ba$_{8}$Al$_{x}$Si$_{46-x}$ and Sr$_{8}$Al$_{x}$Si$_{46-x}$ are studied from
first principles, considering an Al content $x$ between 6 and 16. Due to the
large number of possible substitutional configurations we make use of a special
iterative cluster-expansion approach, to predict ground states and
quasi-degenerate structures in a highly efficient way. These are found from a
simulated annealing technique where millions of configurations are sampled. For
both compounds, we find a linear increase of the lattice constant with the
number of Al substituents, confirming experimental observations for
Ba$_{8}$Al$_{x}$Si$_{46-x}$. Also the calculated bond distances between
high-symmetry sites agree well with experiment for the full compositional
range. For $x$ being below 16, all configurations are metallic for both
materials. At the charge-balanced composition ($x=16$), the substitutional
ordering leads to a metal-semiconductor transition, and the ground states of
Ba$_{8}$Al$_{16}$Si$_{30}$ and Sr$_{8}$Al$_{16}$Si$_{30}$ exhibit indirect
Kohn-Sham band gaps of 0.36 and 0.30 eV, respectively, while configurations
higher in energy are metals. The finding of semiconducting behavior is a
promising result in view of exploiting these materials in thermoelectric
applications.
