Implement optimization of atomic positions.

Uses NLopt for optimization algorithms.