Abstract. Complex systems from science, technology or mathematics usually appear to be very different in their specific dynamical evolution. However, the concept of an energy landscape with its basins corresponding to locally ergodic regions separated by energy barriers provides a unifying approach to the description of complex systems dynamics. In such systems one is often confronted with the task to control the dynamics such that a certain basin is reached with the highest possible probability. Typically one aims for the global minimum, e.g. when dealing with global optimization problems, but frequently other local minima such as the metastable compounds in materials science are of primary interest. Here we show how this task can be solved by applying control theory using magnesium fluoride as an example system, where different modifications of MgF2 are considered as targets. In particular, we generalize previous work restricted to temperature controls only and present controls which simultaneously adjust temperature and pressure in an optimal fashion.