Analyzing DNA curvature and its impact on the ionic environment: application to molecular dynamics simulations of minicircles