Building AI models that understand chemical principles