Predicting properties of complex metamaterials