Title: Theory and structure of complex compounds