First-principles simulation framework