From atomic stress control to stable material design: Towards a full stress control algorithm