3D Structure Prediction of Atomic Systems with Flow-Based Direct Preference Optimization