Merge branch release-2021
[alexxy/gromacs.git] / src / gromacs / mdrunutility / handlerestart.cpp
index 6c6804f1bbf9181d02ae91b2d46c68aa10a34b65..68db1fbfd7316e0b435bcc0c19ad503c82f6ef39 100644 (file)
@@ -188,7 +188,8 @@ gmx_bool exist_output_file(const char* fnm_cp, int nfile, const t_filenm fnm[])
             "part), or instruct mdrun to write new output files with mdrun -noappend. In "
             "the last case, you will not be able to use appending in future for this "
             "simulation.",
-            numFilesMissing, outputfiles.size());
+            numFilesMissing,
+            outputfiles.size());
     GMX_THROW(InconsistentInputError(stream.toString()));
 }
 
@@ -295,7 +296,8 @@ StartingBehaviorHandler chooseStartingBehavior(const AppendingBehavior appending
     GMX_RELEASE_ASSERT(Path::extensionMatches(logFilename, ftp2ext(efLOG)),
                        formatString("The checkpoint file or its reading is broken, the first "
                                     "output file '%s' must be a log file with extension '%s'",
-                                    logFilename, ftp2ext(efLOG))
+                                    logFilename,
+                                    ftp2ext(efLOG))
                                .c_str());
 
     if (appendingBehavior != AppendingBehavior::NoAppending)
@@ -353,7 +355,8 @@ StartingBehaviorHandler chooseStartingBehavior(const AppendingBehavior appending
                         "Cannot restart with appending because the previous simulation part used "
                         "%s precision which does not match the %s precision used by this build "
                         "of GROMACS. Either use matching precision or use mdrun -noappend.",
-                        precisionToString(headerContents.double_prec), precisionToString(GMX_DOUBLE))));
+                        precisionToString(headerContents.double_prec),
+                        precisionToString(GMX_DOUBLE))));
             }
         }
         // If the previous log filename had a part number, then we
@@ -401,7 +404,8 @@ void checkOutputFile(t_fileio* fileToCheck, const gmx_file_position_t& outputfil
                     "Can't read %d bytes of '%s' to compute checksum. The file "
                     "has been replaced or its contents have been modified. Cannot "
                     "do appending because of this condition.",
-                    outputfile.checksumSize, outputfile.filename);
+                    outputfile.checksumSize,
+                    outputfile.filename);
             GMX_THROW(InconsistentInputError(message));
         }
     }
@@ -543,8 +547,8 @@ void StartingBehaviorHandler::ensureMultiSimBehaviorsMatch(const gmx_multisim_t*
 
     auto startingBehaviors = gatherIntFromMultiSimulation(ms, static_cast<int>(startingBehavior));
     bool identicalStartingBehaviors =
-            (std::adjacent_find(std::begin(startingBehaviors), std::end(startingBehaviors),
-                                std::not_equal_to<>())
+            (std::adjacent_find(
+                     std::begin(startingBehaviors), std::end(startingBehaviors), std::not_equal_to<>())
              == std::end(startingBehaviors));
 
     const EnumerationArray<StartingBehavior, std::string> behaviorStrings = {
@@ -569,8 +573,8 @@ simulations wanted the following respective behaviors:
         for (index simIndex = 0; simIndex != ssize(startingBehaviors); ++simIndex)
         {
             auto behavior = static_cast<StartingBehavior>(startingBehaviors[simIndex]);
-            message += formatString("  Simulation %6zd: %s\n", simIndex,
-                                    behaviorStrings[behavior].c_str());
+            message += formatString(
+                    "  Simulation %6zd: %s\n", simIndex, behaviorStrings[behavior].c_str());
         }
         GMX_THROW(InconsistentInputError(message));
     }
@@ -585,9 +589,10 @@ simulations wanted the following respective behaviors:
     // describes the same simulation part. If those don't match, then
     // the simulation cannot proceed.
     auto simulationParts = gatherIntFromMultiSimulation(ms, headerContents->simulation_part);
-    bool identicalSimulationParts = (std::adjacent_find(std::begin(simulationParts),
-                                                        std::end(simulationParts), std::not_equal_to<>())
-                                     == std::end(simulationParts));
+    bool identicalSimulationParts =
+            (std::adjacent_find(
+                     std::begin(simulationParts), std::end(simulationParts), std::not_equal_to<>())
+             == std::end(simulationParts));
 
     if (!identicalSimulationParts)
     {