Foundations of chemistry