Learning to apply models of materials while explaining their properties