SMS: A general framework of high-performance machine learning algorithms: application in structural mechanics