to + infinitive = in order to + infinitive = so as to + infinitive
If we need the negative, we say so as not to, less frequently in order not to.
Examples
We need the key to unlock this door. We need the key if we want to open this door.
I'm skipping dinner to lose some weight. I'm skipping dinner because I want to lose weight.
In order to pass the exam, the students should revise all their notes. The students should revise them if they want to pass the exam.
The scientists conducted the experiments several times in order to avoid errors. They did it because they wanted to avoid errors.
I kept checking the meat so as not to overcook it. WRONG I kept checking the meat not to overcook it.
He set the alarm clock for 5 o'clock so as not to be late for his flight. WRONG He set the alarm clock for 5 o'clock not to be late for his flight.