A framework for glass-box physics rule learner and its application to nano-scale phenomena