Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / mdlib / minimize.c
index ab48e44b42c6ad7274b2108f77e1a2b36dfcc733..6133699d1967fd1952b9dc7d61fc77e2686f2b92 100644 (file)
 #include <config.h>
 #endif
 
+#include <math.h>
 #include <string.h>
 #include <time.h>
-#include <math.h>
-#include "sysstuff.h"
-#include "gromacs/utility/cstringutil.h"
+
 #include "network.h"
-#include "gromacs/utility/smalloc.h"
 #include "nrnb.h"
-#include "main.h"
 #include "force.h"
 #include "macros.h"
 #include "names.h"
-#include "gmx_fatal.h"
 #include "txtdump.h"
 #include "typedefs.h"
 #include "update.h"
 #include "constr.h"
-#include "vec.h"
 #include "tgroup.h"
 #include "mdebin.h"
 #include "vsite.h"
 #include "domdec.h"
 #include "mdatoms.h"
 #include "ns.h"
-#include "mtop_util.h"
+#include "gromacs/topology/mtop_util.h"
 #include "pme.h"
 #include "bondf.h"
 #include "gmx_omp_nthreads.h"
 #include "md_logging.h"
 
 #include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/mtxio.h"
 #include "gromacs/fileio/trajectory_writing.h"
-#include "gromacs/linearalgebra/mtxio.h"
+#include "gromacs/imd/imd.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/linearalgebra/sparsematrix.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/mshift.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/timing/walltime_accounting.h"
-#include "gromacs/imd/imd.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 typedef struct {
     t_state  s;
@@ -1789,7 +1791,6 @@ double do_lbfgs(FILE *fplog, t_commrec *cr,
     }
 
     stepsize  = 1.0/fnorm;
-    converged = FALSE;
 
     /* Start the loop over BFGS steps.
      * Each successful step is counted, and we continue until