From e77c7a9bb6da6afd768b693a0fc311fc1901441e Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Tue, 30 Jun 2009 09:53:10 +0100
Subject: [PATCH] code clean-up...

---
 .../BinaryCollisionModel.H                    |  10 +-
 .../bufferedAccumulator/bufferedAccumulator.C |  13 +-
 .../bufferedAccumulatorIO.C                   |   6 +-
 .../correlationFunction/correlationFunction.C |   4 +-
 .../correlationFunction/correlationFunction.H |   5 +-
 .../correlationFunctionIO.C                   |  20 +--
 .../distribution/distribution.C               |  14 +-
 .../distribution/distribution.H               |   3 +-
 .../distribution/distributionIO.C             |  35 -----
 .../directInteractionList.C                   |  93 ++++++++-----
 .../directInteractionList.H                   |   9 +-
 .../directInteractionListI.H                  |   5 -
 .../interactionLists/interactionLists.C       |   1 +
 .../interactionLists/interactionLists.H       |   7 +-
 .../referralLists/receivingReferralList.C     |   6 +-
 .../referralLists/receivingReferralListI.H    |   5 -
 .../referralLists/sendingReferralList.C       |   6 +-
 .../referralLists/sendingReferralListI.H      |   4 -
 .../referredCell/referredCell.C               |  20 +--
 .../referredCell/referredCell.H               |   2 +-
 .../referredCellList/referredCellList.C       | 127 ++++++++++--------
 .../referredCellList/referredCellList.H       |   5 +-
 .../referredMolecule/referredMolecule.C       |   2 -
 .../referredMolecule/referredMolecule.H       |   2 +-
 .../referredMolecule/referredMoleculeI.H      |   3 +-
 .../molecule/mdTools/averageMDFields.H        |  26 ++--
 .../calculateAutoCorrelationFunctions.H       |  19 +--
 .../mdTools/calculateTransportProperties.H    |   8 +-
 .../molecularDynamics/molecule/mdTools/md.H   |  12 +-
 .../mdTools/meanMomentumEnergyAndNMols.H      |   2 +-
 .../molecule/mdTools/resetMDFields.H          |   8 +-
 .../molecule/mdTools/temperatureAndPressure.H |   1 +
 .../molecule/molecule/molecule.H              |   3 +
 .../molecule/molecule/moleculeI.H             |  23 ++--
 .../molecule/molecule/moleculeIO.C            |  59 ++++----
 .../molecule/moleculeCloud/moleculeCloud.C    |   5 +-
 .../molecule/moleculeCloud/moleculeCloud.H    |  16 ++-
 .../molecule/moleculeCloud/moleculeCloudI.H   | 111 ++++++++-------
 .../molecule/reducedUnits/reducedUnits.H      |   2 +-
 .../electrostaticPotential.C                  |   2 -
 .../electrostaticPotential.H                  |   2 +-
 .../basic/energyScalingFunction.C             |   3 +-
 .../basic/energyScalingFunction.H             |   4 +-
 .../basic/newEnergyScalingFunction.C          |   4 +-
 .../derived/doubleSigmoid/doubleSigmoid.C     |  13 +-
 .../derived/doubleSigmoid/doubleSigmoid.H     |   3 +-
 .../derived/noScaling/noScaling.C             |   6 +-
 .../derived/shifted/shifted.C                 |   6 +-
 .../derived/shifted/shifted.H                 |   2 +
 .../derived/shiftedForce/shiftedForce.C       |   6 +-
 .../derived/shiftedForce/shiftedForce.H       |   2 +-
 .../derived/sigmoid/sigmoid.C                 |  14 +-
 .../pairPotential/basic/newPairPotential.C    |   4 +-
 .../pairPotential/basic/pairPotential.H       |   5 +-
 .../pairPotential/basic/pairPotentialIO.C     |  12 +-
 .../pairPotential/derived/azizChen/azizChen.C |  24 ++--
 .../pairPotential/derived/azizChen/azizChen.H |   1 +
 .../pairPotential/derived/coulomb/coulomb.C   |   5 +-
 .../pairPotential/derived/coulomb/coulomb.H   |   3 +-
 .../derived/dampedCoulomb/dampedCoulomb.C     |   7 +-
 .../derived/dampedCoulomb/dampedCoulomb.H     |   7 +-
 .../exponentialRepulsion.C                    |  11 +-
 .../exponentialRepulsion.H                    |   3 +-
 .../derived/lennardJones/lennardJones.C       |   3 +-
 .../derived/lennardJones/lennardJones.H       |   3 +-
 .../derived/maitlandSmith/maitlandSmith.C     |   5 +-
 .../derived/maitlandSmith/maitlandSmith.H     |   3 +-
 .../derived/noInteraction/noInteraction.C     |   3 +-
 .../derived/noInteraction/noInteraction.H     |   2 +-
 .../pairPotentialList/pairPotentialList.C     |   3 +-
 .../pairPotentialList/pairPotentialList.H     |  15 ++-
 .../pairPotentialList/pairPotentialListI.H    |   1 +
 .../potential/potential/potential.H           |   4 +-
 .../potential/potential/potentialI.H          |   2 -
 .../basic/newTetherPotential.C                |  10 +-
 .../tetherPotential/basic/tetherPotential.H   |   2 +-
 .../derived/harmonicSpring/harmonicSpring.H   |   2 +-
 .../derived/pitchForkRing/pitchForkRing.H     |   2 +-
 .../restrainedHarmonicSpring.C                |   9 +-
 .../restrainedHarmonicSpring.H                |   2 +-
 .../tetherPotentialList/tetherPotentialList.C |   1 -
 .../tetherPotentialList/tetherPotentialList.H |   3 +
 82 files changed, 481 insertions(+), 445 deletions(-)
 delete mode 100644 src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distributionIO.C

diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
index 4b422bdd317..0dc8f02ea7d 100644
--- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
+++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
@@ -152,26 +152,26 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeBinaryCollisionModel(CloudType)                            \
+#define makeBinaryCollisionModel(CloudType)                                   \
                                                                               \
     defineNamedTemplateTypeNameAndDebug                                       \
     (                                                                         \
-        BinaryCollisionModel<CloudType>,                               \
+        BinaryCollisionModel<CloudType>,                                      \
         0                                                                     \
     );                                                                        \
                                                                               \
     defineTemplateRunTimeSelectionTable                                       \
     (                                                                         \
-        BinaryCollisionModel<CloudType>,                               \
+        BinaryCollisionModel<CloudType>,                                      \
         dictionary                                                            \
     );
 
 
-#define makeBinaryCollisionModelType(SS, CloudType, ParcelType)        \
+#define makeBinaryCollisionModelType(SS, CloudType, ParcelType)               \
                                                                               \
     defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0);       \
                                                                               \
-    BinaryCollisionModel<CloudType<ParcelType> >::                     \
+    BinaryCollisionModel<CloudType<ParcelType> >::                            \
         adddictionaryConstructorToTable<SS<CloudType<ParcelType> > >          \
             add##SS##CloudType##ParcelType##ConstructorToTable_;
 
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
index 80c930bb028..de7d31fcb52 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
@@ -126,6 +126,7 @@ void Foam::bufferedAccumulator<Type>::setSizes
     }
 }
 
+
 template<class Type>
 Foam::label Foam::bufferedAccumulator<Type>::addToBuffers
 (
@@ -184,11 +185,10 @@ Foam::Field<Type> Foam::bufferedAccumulator<Type>::averaged() const
         WarningIn
         (
             "bufferedAccumulator<Type>::averagedbufferedAccumulator() const"
-        )
-        << "Averaged correlation function requested but averagesTaken = "
-        << averagesTaken_
-        << ". Returning empty field."
-        << endl;
+        )   << "Averaged correlation function requested but averagesTaken = "
+            << averagesTaken_
+            << ". Returning empty field."
+            << endl;
 
         return Field<Type>(bufferLength(), pTraits<Type>::zero);
     }
@@ -218,8 +218,7 @@ void Foam::bufferedAccumulator<Type>::operator=
         FatalErrorIn
         (
             "bufferedAccumulator<Type>::operator=(const bufferedAccumulator&)"
-        )
-            << "Attempted assignment to self"
+        )   << "Attempted assignment to self"
             << abort(FatalError);
     }
 
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
index 2de8ccfb119..ec1956a345d 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
@@ -34,9 +34,9 @@ Foam::Ostream&
 Foam::operator<<(Ostream& os, const bufferedAccumulator<Type>& bA)
 {
 
-    os<< bA.averagesTaken_
-      << static_cast<const List< Field<Type> >&>(bA)
-      << bA.bufferOffsets();
+    os  << bA.averagesTaken_
+        << static_cast<const List< Field<Type> >&>(bA)
+        << bA.bufferOffsets();
 
     // Check state of Ostream
     os.check
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
index adad29b3f11..cce0d86a22c 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
@@ -138,7 +138,7 @@ void Foam::correlationFunction<Type>::calculateCorrelationFunction
         FatalErrorIn("correlationFunction<Type>::calculateCorrelationFunction")
             << "Trying to supply a Field of length"
             << currentValues.size()
-            <<" to calculate the correlation function.  "
+            << " to calculate the correlation function. "
             << "Expecting a Field of length "
             << measurandFieldSize() << nl
             << abort(FatalError);
@@ -205,7 +205,7 @@ Foam::scalar Foam::correlationFunction<Type>::integral() const
 
     scalar cFIntegral = 0.0;
 
-    for(label v = 0; v < averageCF.size() - 1; v++)
+    for (label v = 0; v < averageCF.size() - 1; v++)
     {
         cFIntegral +=
             0.5
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
index b751d044f75..fe2071aff37 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
@@ -155,7 +155,10 @@ public:
     // IOstream Operators
 
         friend Ostream& operator<< <Type>
-        (Ostream&, const correlationFunction<Type>&);
+        (
+            Ostream&,
+            const correlationFunction<Type>&
+        );
 };
 
 
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionIO.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionIO.C
index b1532271884..aa62cdcaf6e 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionIO.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionIO.C
@@ -34,10 +34,10 @@ bool Foam::correlationFunction<Type>::writeAveraged(Ostream& os) const
 
     forAll(averageCF, v)
     {
-        os<< v*sampleInterval()
-          << token::SPACE
-          << averageCF[v]
-          << nl;
+        os  << v*sampleInterval()
+            << token::SPACE
+            << averageCF[v]
+            << nl;
     }
 
     return os.good();
@@ -51,12 +51,12 @@ Foam::Ostream& Foam::operator<<
     const correlationFunction<Type>& cF
 )
 {
-    os<< cF.duration()
-      << nl << cF.sampleInterval()
-      << nl << cF.averagingInterval()
-      << nl << cF.sampleSteps()
-      << nl << cF.tZeroBuffers()
-      << nl << static_cast<const bufferedAccumulator<scalar>&>(cF);
+    os  << cF.duration()
+        << nl << cF.sampleInterval()
+        << nl << cF.averagingInterval()
+        << nl << cF.sampleSteps()
+        << nl << cF.tZeroBuffers()
+        << nl << static_cast<const bufferedAccumulator<scalar>&>(cF);
 
     // Check state of Ostream
     os.check
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
index 8c666939e85..439ed64bdf0 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
@@ -75,7 +75,7 @@ label distribution::totalEntries() const
                 << "sumOfEntries = " << sumOfEntries
                 << ". This is most likely to be because too many samples "
                 << "have been added to the bins and the label has 'rolled "
-                << "round'.  Try distribution::approxTotalEntries which "
+                << "round'. Try distribution::approxTotalEntries which "
                 << "returns a scalar." << endl;
 
             sumOfEntries = -1;
@@ -336,8 +336,8 @@ List< Pair<scalar> > distribution::normalisedShifted(const scalar shiftValue)
                    *(oldDist[u].second() - oldDist[u-1].second())
                   +
                     (
-                        oldDist[u-1].second() * oldDist[u].first()
-                      - oldDist[u].second() * oldDist[u-1].first()
+                        oldDist[u-1].second()*oldDist[u].first()
+                      - oldDist[u].second()*oldDist[u-1].first()
                     )
                     /binWidth_;
             }
@@ -348,7 +348,7 @@ List< Pair<scalar> > distribution::normalisedShifted(const scalar shiftValue)
             {
                 newDist[u].second() =
                     (0.5 + scalar(newKey))*-oldDist[u].second()
-                  + oldDist[u].second() * (oldDist[u].first() + binWidth_)
+                  + oldDist[u].second()*(oldDist[u].first() + binWidth_)
                    /binWidth_;
             }
             else
@@ -358,8 +358,8 @@ List< Pair<scalar> > distribution::normalisedShifted(const scalar shiftValue)
                    *(oldDist[u+1].second() - oldDist[u].second())
                   +
                     (
-                        oldDist[u].second() * oldDist[u+1].first()
-                      - oldDist[u+1].second() * oldDist[u].first()
+                        oldDist[u].second()*oldDist[u+1].first()
+                      - oldDist[u+1].second()*oldDist[u].first()
                     )
                    /binWidth_;
             }
@@ -395,7 +395,7 @@ List<Pair<scalar> > distribution::raw()
     {
         label key = keys[k];
 
-        rawDist[k].first() = (0.5 + scalar(key)) * binWidth_;
+        rawDist[k].first() = (0.5 + scalar(key))*binWidth_;
 
         rawDist[k].second() = scalar((*this)[key]);
     }
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
index 363f68a6cfb..da1ce973bc7 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
@@ -30,7 +30,6 @@ Description
 SourceFiles
     distributionI.H
     distribution.C
-    distributionIO.C
 
 \*---------------------------------------------------------------------------*/
 
@@ -46,7 +45,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class distribution Declaration
+                        Class distribution Declaration
 \*---------------------------------------------------------------------------*/
 
 class distribution
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distributionIO.C b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distributionIO.C
deleted file mode 100644
index 7e5a0118f07..00000000000
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distributionIO.C
+++ /dev/null
@@ -1,35 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-#include "distribution.H"
-#include "IOstreams.H"
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-// construct from Istream
-
-
-// ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.C
index 6af4e7d5bf3..1556db83178 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.C
@@ -79,8 +79,12 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellI],
-                                    cellJ) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellI],
+                                        cellJ
+                                    )
+                                 == -1
                                 )
                                 {
                                     directInteractionList[cellI].append(cellJ);
@@ -91,8 +95,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellJ],
-                                    cellI) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellJ],
+                                        cellI
+                                    )
+                                 ==
+                                    -1
                                 )
                                 {
                                     directInteractionList[cellJ].append(cellI);
@@ -109,11 +118,11 @@ void Foam::directInteractionList::buildDirectInteractionList
         Info<< tab << "Point-Face, Edge-Edge direct interaction list build."
             << endl;
 
-        forAll (mesh.points(), p)
+        forAll(mesh.points(), p)
         {
             forAll(mesh.faces(), f)
             {
-                if(il_.testPointFaceDistance(p, f))
+                if (il_.testPointFaceDistance(p, f))
                 {
                     const labelList& pCells(mesh.pointCells()[p]);
 
@@ -129,8 +138,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                         {
                             if
                             (
-                                findIndex(directInteractionList[cellI],
-                                cellO) == -1
+                                findIndex
+                                (
+                                    directInteractionList[cellI],
+                                    cellO
+                                )
+                             ==
+                                -1
                             )
                             {
                                 directInteractionList[cellI].append(cellO);
@@ -141,8 +155,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                         {
                             if
                             (
-                                findIndex(directInteractionList[cellO],
-                                cellI) == -1
+                                findIndex
+                                (
+                                    directInteractionList[cellO],
+                                    cellI
+                                )
+                             ==
+                                -1
                             )
                             {
                                 directInteractionList[cellO].append(cellI);
@@ -160,8 +179,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellI],
-                                    cellN) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellI],
+                                        cellN
+                                    )
+                                 ==
+                                    -1
                                 )
                                 {
                                     directInteractionList[cellI].append(cellN);
@@ -172,8 +196,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellN],
-                                    cellI) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellN],
+                                        cellI
+                                    )
+                                 ==
+                                    -1
                                 )
                                 {
                                     directInteractionList[cellN].append(cellI);
@@ -187,7 +216,7 @@ void Foam::directInteractionList::buildDirectInteractionList
 
         label edgeJIndex;
 
-        forAll (mesh.edges(), edgeIIndex)
+        forAll(mesh.edges(), edgeIIndex)
         {
             const edge& eI(mesh.edges()[edgeIIndex]);
 
@@ -218,8 +247,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellI],
-                                    cellJ) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellI],
+                                        cellJ
+                                    )
+                                 ==
+                                    -1
                                 )
                                 {
                                     directInteractionList[cellI].append(cellJ);
@@ -230,8 +264,13 @@ void Foam::directInteractionList::buildDirectInteractionList
                             {
                                 if
                                 (
-                                    findIndex(directInteractionList[cellJ],
-                                    cellI) == -1
+                                    findIndex
+                                    (
+                                        directInteractionList[cellJ],
+                                        cellI
+                                    )
+                                 ==
+                                    -1
                                 )
                                 {
                                     directInteractionList[cellJ].append(cellI);
@@ -272,11 +311,11 @@ Foam::directInteractionList::directInteractionList
     labelListList(il.mesh().nCells()),
     il_(il)
 {
-    if((*this).size() > 1)
+    if ((*this).size() > 1)
     {
         buildDirectInteractionList(pointPointListBuild);
     }
-    else if((*this).size() == 1)
+    else if ((*this).size() == 1)
     {
         Info<< nl
             << "Single cell mesh, no direct interaction lists required."
@@ -305,16 +344,4 @@ Foam::directInteractionList::~directInteractionList()
 {}
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.H
index 04a957170ce..8a85404ca04 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionList.H
@@ -59,6 +59,7 @@ class directInteractionList
 
         const interactionLists& il_;
 
+
     // Private Member Functions
 
         void buildDirectInteractionList
@@ -72,6 +73,7 @@ class directInteractionList
         //- Disallow default bitwise assignment
         void operator=(const directInteractionList&);
 
+
 public:
 
     // Constructors
@@ -89,6 +91,7 @@ public:
             const interactionLists& il
         );
 
+
     // Destructor
 
         ~directInteractionList();
@@ -100,12 +103,6 @@ public:
 
         inline const interactionLists& il() const;
 
-        // Check
-
-        // Edit
-
-        // Write
-
 
     // IOstream Operators
 
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionListI.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionListI.H
index 26529babb6a..34c1d650806 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionListI.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/directInteractionList/directInteractionListI.H
@@ -24,8 +24,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline const Foam::interactionLists& Foam::directInteractionList::il() const
@@ -34,7 +32,4 @@ inline const Foam::interactionLists& Foam::directInteractionList::il() const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
index 10985a4cc27..f1036eaa0e9 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
@@ -342,6 +342,7 @@ bool Foam::interactionLists::testPointFaceDistance
     );
 }
 
+
 bool Foam::interactionLists::testPointFaceDistance
 (
     const vector& p,
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.H
index a8eeb55ddfa..744b59b067a 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.H
@@ -52,7 +52,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class interactionLists Declaration
+                       Class interactionLists Declaration
 \*---------------------------------------------------------------------------*/
 
 class interactionLists
@@ -71,6 +71,7 @@ class interactionLists
 
         List<receivingReferralList> cellReceivingReferralLists_;
 
+
     // Private Member Functions
 
         //- Build referralLists which define how to send information
@@ -83,6 +84,7 @@ class interactionLists
         //- Disallow default bitwise assignment
         void operator=(const interactionLists&);
 
+
 public:
 
     // Static data members
@@ -90,6 +92,7 @@ public:
         //- Tolerance for checking that faces on a patch segment
         static scalar transTol;
 
+
     // Constructors
 
         //- Construct and create all information from the mesh
@@ -103,6 +106,7 @@ public:
         //- Construct from file
         interactionLists(const polyMesh& mesh);
 
+
     // Destructor
 
         ~interactionLists();
@@ -177,6 +181,7 @@ public:
                 const labelList& segmentPoints
             ) const;
 
+
         // Access
 
             inline const polyMesh& mesh() const;
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralList.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralList.C
index e2db2ae6d72..2f646fcba5f 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralList.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralList.C
@@ -143,7 +143,7 @@ bool operator==
 
 Foam::Istream& Foam::operator>>(Istream& is, receivingReferralList& rRL)
 {
-    is >> rRL.sourceProc_ >> static_cast<labelListList&>(rRL);
+    is  >> rRL.sourceProc_ >> static_cast<labelListList&>(rRL);
 
     is.check
     (
@@ -160,7 +160,7 @@ Foam::Ostream& Foam::operator<<
     const receivingReferralList& rRL
 )
 {
-    os << rRL.sourceProc() << token::SPACE
+    os  << rRL.sourceProc() << token::SPACE
         << static_cast< const labelListList& >(rRL);
 
     os.check
@@ -171,7 +171,5 @@ Foam::Ostream& Foam::operator<<
     return os;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralListI.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralListI.H
index 56134aca58f..084863b01a0 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralListI.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/receivingReferralListI.H
@@ -24,8 +24,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline Foam::label Foam::receivingReferralList::sourceProc() const
@@ -46,7 +44,4 @@ inline bool operator!=
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralList.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralList.C
index e0a77379107..6235ddabfad 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralList.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralList.C
@@ -145,7 +145,7 @@ Foam::Istream& Foam::operator>>
     sendingReferralList& sRL
 )
 {
-    is >> sRL.destinationProc_ >> static_cast<labelList&>(sRL);
+    is  >> sRL.destinationProc_ >> static_cast<labelList&>(sRL);
 
     is.check("Istream& operator<<(Istream& f, const sendingReferralList& sRL");
 
@@ -159,7 +159,7 @@ Foam::Ostream& Foam::operator<<
     const sendingReferralList& rL
 )
 {
-    os << rL.destinationProc() << token::SPACE
+    os  << rL.destinationProc() << token::SPACE
         << static_cast< const labelList& >(rL);
 
     os.check("Ostream& operator<<(Ostream& f, const sendingReferralList& rL");
@@ -168,6 +168,4 @@ Foam::Ostream& Foam::operator<<
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralListI.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralListI.H
index c6479a14cf6..d34ffd35954 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralListI.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referralLists/sendingReferralListI.H
@@ -24,8 +24,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline Foam::label Foam::sendingReferralList::destinationProc() const
@@ -46,6 +44,4 @@ inline bool operator!=
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
index d2a0ecd475e..225ad5902a0 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
@@ -38,7 +38,7 @@ void referredCell::setConstructionData
     const label sourceCell
 )
 {
-    // * * * * * * * * * * * Points * * * * * * * * * * *
+    // Points
 
     const labelList& points = mesh.cellPoints()[sourceCell];
 
@@ -51,7 +51,8 @@ void referredCell::setConstructionData
 
     vertexPositions_ = referPositions(sourceCellVertices);
 
-    // * * * * * * * * * * * Edges * * * * * * * * * * *
+
+    // Edges
 
     const labelList& edges = mesh.cellEdges()[sourceCell];
 
@@ -64,7 +65,8 @@ void referredCell::setConstructionData
 
     locallyMapEdgeList(points, sourceCellEdges);
 
-    // * * * * * * * * * * * Faces * * * * * * * * * * *
+
+    // Faces
 
     labelList faces(mesh.cells()[sourceCell]);
 
@@ -383,8 +385,8 @@ bool referredCell::duplicate(const referredCell& refCellDupl) const
     return
     (
         sourceProc_ == refCellDupl.sourceProc()
-        && sourceCell_ == refCellDupl.sourceCell()
-        && mag(offset_ - refCellDupl.offset()) < interactionLists::transTol
+     && sourceCell_ == refCellDupl.sourceCell()
+     && mag(offset_ - refCellDupl.offset()) < interactionLists::transTol
     );
 }
 
@@ -394,8 +396,8 @@ bool referredCell::duplicate(const label procNo,const label nCells) const
     return
     (
         sourceProc_ == procNo
-        && sourceCell_ < nCells
-        && mag(offset_) < interactionLists::transTol
+     && sourceCell_ < nCells
+     && mag(offset_) < interactionLists::transTol
     );
 }
 
@@ -405,7 +407,7 @@ bool referredCell::duplicate(const label procNo,const label nCells) const
 Istream& operator>>(Istream& is, referredCell& rC)
 {
 
-    is >> rC.sourceProc_
+    is  >> rC.sourceProc_
         >> rC.sourceCell_
         >> rC.vertexPositions_
         >> rC.edges_
@@ -424,7 +426,7 @@ Istream& operator>>(Istream& is, referredCell& rC)
 Ostream& operator<<(Ostream& os, const referredCell& rC)
 {
 
-    os << rC.sourceProc()
+    os  << rC.sourceProc()
         << token::SPACE << rC.sourceCell()
         << token::SPACE << rC.vertexPositions()
         << token::SPACE << rC.edges()
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.H
index 7f2e5bdbe74..666b4f92682 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.H
@@ -53,7 +53,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class referredCell Declaration
+                          Class referredCell Declaration
 \*---------------------------------------------------------------------------*/
 
 class referredCell
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C
index 373385ae4dc..2ba95daa18e 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.C
@@ -357,7 +357,7 @@ void Foam::referredCellList::buildReferredCellList
 
     label iterationNo = 0;
 
-    while(cellsReferredThisIteration)
+    while (cellsReferredThisIteration)
     {
         label refIntListStartSize = referredInteractionList.size();
 
@@ -499,7 +499,10 @@ void Foam::referredCellList::buildReferredCellList
                                 (
                                     meshPointsOnThisSegment,
                                     facePoint
-                                ) == -1)
+                                )
+                             ==
+                                -1
+                            )
                             {
                                 meshPointsOnThisSegment.append(facePoint);
                             }
@@ -610,18 +613,20 @@ void Foam::referredCellList::buildReferredCellList
 
                     forAll(referredCellsFoundInRange,cFIR)
                     {
-                        referredCell& existingRefCell = referredInteractionList
-                        [
-                            referredCellsFoundInRange[cFIR]
-                        ];
+                        referredCell& existingRefCell =
+                            referredInteractionList
+                            [
+                                referredCellsFoundInRange[cFIR]
+                            ];
 
-                        referredCell cellToReRefer = existingRefCell.reRefer
-                        (
-                            patch.faceCentres()[0],
-                            patch.faceCentres()[patch.size()/2],
-                            patch.faceNormals()[0],
-                            patch.faceNormals()[patch.size()/2]
-                        );
+                        referredCell cellToReRefer =
+                            existingRefCell.reRefer
+                            (
+                                patch.faceCentres()[0],
+                                patch.faceCentres()[patch.size()/2],
+                                patch.faceNormals()[0],
+                                patch.faceNormals()[patch.size()/2]
+                            );
 
                         // Test all existing referred and real cells to check
                         // duplicates are not being made or cells aren't being
@@ -705,7 +710,9 @@ void Foam::referredCellList::buildReferredCellList
                                 (
                                     meshEdgesOnThisSegment,
                                     faceEdge
-                                ) == -1
+                                )
+                             ==
+                                -1
                             )
                             {
                                 meshEdgesOnThisSegment.append(faceEdge);
@@ -724,7 +731,10 @@ void Foam::referredCellList::buildReferredCellList
                                 (
                                     meshPointsOnThisSegment,
                                     facePoint
-                                ) == -1)
+                                )
+                             ==
+                                -1
+                            )
                             {
                                 meshPointsOnThisSegment.append(facePoint);
                             }
@@ -823,28 +833,30 @@ void Foam::referredCellList::buildReferredCellList
                     referredInteractionList.shrink();
 
                     referredCellsFoundInRange =
-                    il_.referredCellsInRangeOfSegment
-                    (
-                        referredInteractionList,
-                        meshFacesOnThisSegment,
-                        meshEdgesOnThisSegment,
-                        meshPointsOnThisSegment
-                    );
+                        il_.referredCellsInRangeOfSegment
+                        (
+                            referredInteractionList,
+                            meshFacesOnThisSegment,
+                            meshEdgesOnThisSegment,
+                            meshPointsOnThisSegment
+                        );
 
                     forAll(referredCellsFoundInRange,cFIR)
                     {
-                        referredCell& existingRefCell = referredInteractionList
-                        [
-                            referredCellsFoundInRange[cFIR]
-                        ];
+                        referredCell& existingRefCell =
+                            referredInteractionList
+                            [
+                                referredCellsFoundInRange[cFIR]
+                            ];
 
-                        referredCell cellToReRefer = existingRefCell.reRefer
-                        (
-                            patch.faceCentres()[patch.size()/2],
-                            patch.faceCentres()[0],
-                            patch.faceNormals()[patch.size()/2],
-                            patch.faceNormals()[0]
-                        );
+                        referredCell cellToReRefer =
+                            existingRefCell.reRefer
+                            (
+                                patch.faceCentres()[patch.size()/2],
+                                patch.faceCentres()[0],
+                                patch.faceNormals()[patch.size()/2],
+                                patch.faceNormals()[0]
+                            );
 
                         // Test all existing referred and real cells to check
                         // duplicates are not being made or cells aren't being
@@ -901,15 +913,15 @@ void Foam::referredCellList::buildReferredCellList
             forAll(procPatches,pP)
             {
                 const processorPolyPatch& patch =
-                refCast<const processorPolyPatch>
-                (
-                    mesh.boundaryMesh()[procPatches[pP]]
-                );
+                    refCast<const processorPolyPatch>
+                    (
+                        mesh.boundaryMesh()[procPatches[pP]]
+                    );
 
                 DynamicList<referredCell> referredCellsToTransfer;
 
                 const vectorList& neighbFaceCentres =
-                allNeighbourFaceCentres[pP];
+                    allNeighbourFaceCentres[pP];
 
                 const vectorList& neighbFaceAreas = allNeighbourFaceAreas[pP];
 
@@ -971,7 +983,9 @@ void Foam::referredCellList::buildReferredCellList
                                 (
                                     meshEdgesOnThisSegment,
                                     faceEdge
-                                ) == -1
+                                )
+                             ==
+                                -1
                             )
                             {
                                 meshEdgesOnThisSegment.append(faceEdge);
@@ -990,7 +1004,9 @@ void Foam::referredCellList::buildReferredCellList
                                 (
                                     meshPointsOnThisSegment,
                                     facePoint
-                                ) == -1
+                                )
+                             ==
+                                -1
                             )
                             {
                                 meshPointsOnThisSegment.append(facePoint);
@@ -1032,7 +1048,7 @@ void Foam::referredCellList::buildReferredCellList
                             forAll(realCellsFoundInRange,cFIR)
                             {
                                 const label realCell =
-                                realCellsFoundInRange[cFIR];
+                                    realCellsFoundInRange[cFIR];
 
                                 referredCell cellToRefer
                                 (
@@ -1074,19 +1090,20 @@ void Foam::referredCellList::buildReferredCellList
                         forAll(referredCellsFoundInRange,cFIR)
                         {
                             referredCell& existingRefCell =
-                            referredInteractionList
-                            [
-                                referredCellsFoundInRange[cFIR]
-                            ];
+                                referredInteractionList
+                                [
+                                    referredCellsFoundInRange[cFIR]
+                                ];
 
-                            referredCell cellToReRefer = existingRefCell.reRefer
-                            (
-                                patch.faceCentres()[faceT],
-                                neighbFaceCentres[faceT],
-                                patch.faceNormals()[faceT],
-                                neighbFaceAreas[faceT]
-                                /(mag(neighbFaceAreas[faceT]) + VSMALL)
-                            );
+                            referredCell cellToReRefer =
+                                existingRefCell.reRefer
+                                (
+                                    patch.faceCentres()[faceT],
+                                    neighbFaceCentres[faceT],
+                                    patch.faceNormals()[faceT],
+                                    neighbFaceAreas[faceT]
+                                    /(mag(neighbFaceAreas[faceT]) + VSMALL)
+                                );
 
                             referredCellsToTransfer.append(cellToReRefer);
                         }
@@ -1409,6 +1426,7 @@ void Foam::referredCellList::buildReferredCellList
     }
 }
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::referredCellList::referredCellList
@@ -1557,7 +1575,4 @@ void Foam::referredCellList::referMolecules
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.H
index 54c137ed538..c8a77cb27f3 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCellList/referredCellList.H
@@ -48,7 +48,7 @@ namespace Foam
 class interactionLists;
 
 /*---------------------------------------------------------------------------*\
-                        Class referredCellList Declaration
+                      Class referredCellList Declaration
 \*---------------------------------------------------------------------------*/
 
 class referredCellList
@@ -59,7 +59,8 @@ class referredCellList
 
         const interactionLists& il_;
 
-        // Private Member Functions
+
+    // Private Member Functions
 
         void buildReferredCellList
         (
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.C
index 1b19d21d7f5..c1e2e487695 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.C
@@ -83,6 +83,4 @@ Foam::Ostream& Foam::operator<<
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.H
index 45d342d2edf..27c3c98ee39 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMolecule.H
@@ -45,7 +45,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class referredMolecule Declaration
+                      Class referredMolecule Declaration
 \*---------------------------------------------------------------------------*/
 
 class referredMolecule
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMoleculeI.H b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMoleculeI.H
index 1b9666f20ea..1db2f9a923f 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMoleculeI.H
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredMolecule/referredMoleculeI.H
@@ -45,6 +45,7 @@ Foam::referredMolecule::sitePositions() const
     return sitePositions_;
 }
 
+
 // * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
 
 inline bool Foam::operator==
@@ -71,6 +72,4 @@ inline bool Foam::operator!=
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
index 7d038729506..9781c9d70f4 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
@@ -56,7 +56,7 @@ if (runTime.outputTime())
 
         forAll(singleSpeciesVelocity, sSV)
         {
-            if(allSpeciesN_RU[v][sSV])
+            if (allSpeciesN_RU[v][sSV])
             {
                 singleSpeciesVelocity[sSV] =
                     allSpeciesVelocitySum_RU[v][sSV]
@@ -78,7 +78,7 @@ if (runTime.outputTime())
 
     forAll(totalVelocity.internalField(), tV)
     {
-        if(totalMass_sum[tV] > VSMALL)
+        if (totalMass_sum[tV] > VSMALL)
         {
             totalVelocity.internalField()[tV] =
                 totalMomentum_sum[tV]
@@ -110,14 +110,13 @@ if (runTime.outputTime())
 
         forAll(singleSpeciesTemp, sST)
         {
-            if(allSpeciesN_RU[t][sST])
+            if (allSpeciesN_RU[t][sST])
             {
                 singleSpeciesTemp[sST] =
                     allSpeciesM_RU[t][sST]
                     /allSpeciesN_RU[t][sST]
                     /(3.0 * moleculeCloud::kb * allSpeciesN_RU[t][sST])
-                    *
-                    (
+                   *(
                         allSpeciesVelocityMagSquaredSum_RU[t][sST]
                         -
                         (
@@ -130,11 +129,10 @@ if (runTime.outputTime())
 
                 totalTemperatureVTerms_sum[sST] +=
                     allSpeciesM_RU[t][sST]
-                    /allSpeciesN_RU[t][sST]
-                    *
-                    (
+                   /allSpeciesN_RU[t][sST]
+                   *(
                         allSpeciesVelocityMagSquaredSum_RU[t][sST]
-                        -
+                      -
                         (
                             allSpeciesVelocitySum_RU[t][sST]
                             &
@@ -187,10 +185,9 @@ if (runTime.outputTime())
             {
                 singleSpeciesMeanKE[sSMKE] =
                     allSpeciesM_RU[mKE][sSMKE]
-                    /allSpeciesN_RU[mKE][sSMKE]
-                    /(2.0 * allSpeciesN_RU[mKE][sSMKE])
-                    *
-                    (
+                   /allSpeciesN_RU[mKE][sSMKE]
+                   /(2.0*allSpeciesN_RU[mKE][sSMKE])
+                   *(
                         allSpeciesVelocityMagSquaredSum_RU[mKE][sSMKE]
                     );
 
@@ -198,8 +195,7 @@ if (runTime.outputTime())
                     allSpeciesM_RU[mKE][sSMKE]
                     /allSpeciesN_RU[mKE][sSMKE]
                     /2.0
-                    *
-                    (
+                   *(
                         allSpeciesVelocityMagSquaredSum_RU[mKE][sSMKE]
                     );
             }
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
index bc5848475d3..968cfa93cb8 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
@@ -60,18 +60,15 @@ if (mesh.time().timeIndex() % pacf.sampleSteps() == 0)
     {
         p.x() +=
             mol().mass() * mol().U().y() * mol().U().z()
-            +
-            0.5 * mol().rf().yz();
+          + 0.5*mol().rf().yz();
 
         p.y() +=
             mol().mass() * mol().U().z() * mol().U().x()
-            +
-            0.5 * mol().rf().zx();
+          + 0.5*mol().rf().zx();
 
         p.z() +=
             mol().mass() * mol().U().x() * mol().U().y()
-            +
-            0.5 * mol().rf().xy();
+          + 0.5*mol().rf().xy();
     }
 
     pacf.calculateCorrelationFunction(p);
@@ -93,12 +90,10 @@ if (mesh.time().timeIndex() % hfacf.sampleSteps() == 0)
     {
         s +=
         (
-            0.5 * mol().mass() * magSqr(mol().U())
-            +
-            mol().potentialEnergy()
-        ) * mol().U()
-        +
-        0.5 * ( mol().rf() & mol().U() );
+            0.5*mol().mass()*magSqr(mol().U())
+          + mol().potentialEnergy()
+        )*mol().U()
+      + 0.5*(mol().rf() & mol().U());
     }
 
     hfacf.calculateCorrelationFunction(s);
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateTransportProperties.H b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateTransportProperties.H
index 74f1db9da7f..0ee094ff149 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateTransportProperties.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateTransportProperties.H
@@ -37,7 +37,7 @@ if (writeVacf)
     }
 }
 
-Info << "Diffusion coefficient = "
+Info<< "Diffusion coefficient = "
     << vacf.integral() << endl;
 
 if (writePacf)
@@ -57,13 +57,13 @@ Info<< "Viscosity = "
     << pacf.integral()/averageTemperature/moleculeCloud::kb/meshVolume
     << endl;
 
-if(writeHFacf)
+if (writeHFacf)
 {
     OFstream hfacfFile
     (
         runTime.path()/ + "hfacf"
     );
-    
+
     if (!hfacf.writeAveraged(hfacfFile))
     {
         FatalErrorIn(args.executable())
@@ -73,7 +73,7 @@ if(writeHFacf)
     }
 }
 
-Info << "Thermal conductivity = "
+Info<< "Thermal conductivity = "
     << hfacf.integral()
         /averageTemperature
         /averageTemperature
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/md.H b/src/lagrangian/molecularDynamics/molecule/mdTools/md.H
index ae4ab081242..9a079764ae8 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/md.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/md.H
@@ -1,11 +1,9 @@
 #ifndef md_H
 #define md_H
-
-#   include "potential.H"
-#   include "moleculeCloud.H"
-#   include "correlationFunction.H"
-#   include "distribution.H"
-#   include "reducedUnits.H"
-
+    #include "potential.H"
+    #include "moleculeCloud.H"
+    #include "correlationFunction.H"
+    #include "distribution.H"
+    #include "reducedUnits.H"
 #endif
 
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
index 827ff3ffc26..fb5118bb5a4 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
@@ -186,7 +186,7 @@ if (singleStepNMols)
 }
 else
 {
-    Info << "No molecules in system" << endl;
+    Info<< "No molecules in system" << endl;
 }
 
 
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
index ff274a33366..af0197b5fe4 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
@@ -3,24 +3,24 @@ if (runTime.outputTime())
     allSpeciesN_RU = List< scalarField >
     (
         molecules.potential().nIds(),
-        scalarField (mesh.nCells(), 0.0)
+        scalarField(mesh.nCells(), 0.0)
     );
 
     allSpeciesM_RU = List< scalarField >
     (
         molecules.potential().nIds(),
-        scalarField (mesh.nCells(), 0.0)
+        scalarField(mesh.nCells(), 0.0)
     );
 
     allSpeciesVelocitySum_RU = List< vectorField >
     (
         molecules.potential().nIds(),
-        vectorField (mesh.nCells(), vector::zero)
+        vectorField(mesh.nCells(), vector::zero)
     );
 
     allSpeciesVelocityMagSquaredSum_RU = List< scalarField >
     (
         molecules.potential().nIds(),
-        scalarField (mesh.nCells(), 0.0)
+        scalarField(mesh.nCells(), 0.0)
     );
 }
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
index cd02fcce08a..788763b163d 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
@@ -110,4 +110,5 @@ if (runTime.outputTime())
     accumulatedDOFs = 0;
 }
 
+
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
index 538d4f340cf..ef2de145c46 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
@@ -108,6 +108,7 @@ public:
 
             bool linearMoleculeTest() const;
 
+
     public:
 
         inline constantProperties();
@@ -214,6 +215,7 @@ private:
 
         List<vector> sitePositions_;
 
+
     // Private Member Functions
 
         tensor rotationTensorX(scalar deltaT) const;
@@ -222,6 +224,7 @@ private:
 
         tensor rotationTensorZ(scalar deltaT) const;
 
+
 public:
 
     friend class Cloud<molecule>;
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
index 743d45b7f9b..447a04e4ea3 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
@@ -119,10 +119,8 @@ inline Foam::molecule::constantProperties::constantProperties
         {
             const vector& p(siteReferencePositions_[i]);
 
-            momOfInertia += siteMasses_[i]*diagTensor
-            (
-                0, p.x()*p.x(), p.x()*p.x()
-            );
+            momOfInertia +=
+                siteMasses_[i]*diagTensor(0, p.x()*p.x(), p.x()*p.x());
         }
 
         momentOfInertia_ = diagTensor
@@ -156,8 +154,7 @@ inline Foam::molecule::constantProperties::constantProperties
         {
             FatalErrorIn("molecule::constantProperties::constantProperties")
                 << "An eigenvalue of the inertia tensor is zero, the molecule "
-                << dict.name()
-                << " is not a valid 6DOF shape."
+                << dict.name() << " is not a valid 6DOF shape."
                 << nl << abort(FatalError);
         }
 
@@ -172,7 +169,7 @@ inline Foam::molecule::constantProperties::constantProperties
         // global axes
 
         tensor Q =
-        vector(1,0,0)*e.x() + vector(0,1,0)*e.y() + vector(0,0,1)*e.z();
+            vector(1,0,0)*e.x() + vector(0,1,0)*e.y() + vector(0,0,1)*e.z();
 
         // Transform the site positions
 
@@ -379,7 +376,7 @@ inline bool Foam::molecule::constantProperties::pairPotentialSite
 {
     label s = findIndex(siteIds_, sId);
 
-    if(s == -1)
+    if (s == -1)
     {
         FatalErrorIn("moleculeI.H") << nl
             << sId << " site not found."
@@ -403,10 +400,12 @@ inline bool Foam::molecule::constantProperties::electrostaticSite
 {
     label s = findIndex(siteIds_, sId);
 
-    if(s == -1)
+    if (s == -1)
     {
-        FatalErrorIn("moleculeI.H") << nl
-            << sId << " site not found."
+        FatalErrorIn
+        (
+            "molecule::constantProperties::electrostaticSite(label)"
+        )   << sId << " site not found."
             << nl << abort(FatalError);
     }
 
@@ -616,6 +615,4 @@ inline Foam::label Foam::molecule::id() const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
index f43b4aac6e2..04ae825df59 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
@@ -55,16 +55,16 @@ Foam::molecule::molecule
     {
         if (is.format() == IOstream::ASCII)
         {
-            is >> Q_;
-            is >> v_;
-            is >> a_;
-            is >> pi_;
-            is >> tau_;
-            is >> siteForces_;
-            is >> sitePositions_;
-            is >> specialPosition_;
+            is  >> Q_;
+            is  >> v_;
+            is  >> a_;
+            is  >> pi_;
+            is  >> tau_;
+            is  >> siteForces_;
+            is  >> sitePositions_;
+            is  >> specialPosition_;
             potentialEnergy_ = readScalar(is);
-            is >> rf_;
+            is  >> rf_;
             special_ = readLabel(is);
             id_ = readLabel(is);
         }
@@ -74,18 +74,18 @@ Foam::molecule::molecule
             (
                 reinterpret_cast<char*>(&Q_),
                 sizeof(Q_)
-                + sizeof(v_)
-                + sizeof(a_)
-                + sizeof(pi_)
-                + sizeof(tau_)
-                + sizeof(specialPosition_)
-                + sizeof(potentialEnergy_)
-                + sizeof(rf_)
-                + sizeof(special_)
-                + sizeof(id_)
+              + sizeof(v_)
+              + sizeof(a_)
+              + sizeof(pi_)
+              + sizeof(tau_)
+              + sizeof(specialPosition_)
+              + sizeof(potentialEnergy_)
+              + sizeof(rf_)
+              + sizeof(special_)
+              + sizeof(id_)
             );
 
-            is >> siteForces_ >> sitePositions_;
+            is  >> siteForces_ >> sitePositions_;
         }
     }
 
@@ -176,6 +176,7 @@ void Foam::molecule::writeFields(const moleculeCloud& mC)
         mC.fieldIOobject("piGlobal", IOobject::NO_READ),
         np
     );
+
     IOField<vector> tauGlobal
     (
         mC.fieldIOobject("tauGlobal", IOobject::NO_READ),
@@ -276,17 +277,17 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const molecule& mol)
         (
             reinterpret_cast<const char*>(&mol.Q_),
             sizeof(mol.Q_)
-            + sizeof(mol.v_)
-            + sizeof(mol.a_)
-            + sizeof(mol.pi_)
-            + sizeof(mol.tau_)
-            + sizeof(mol.specialPosition_)
-            + sizeof(mol.potentialEnergy_)
-            + sizeof(mol.rf_)
-            + sizeof(mol.special_)
-            + sizeof(mol.id_)
+          + sizeof(mol.v_)
+          + sizeof(mol.a_)
+          + sizeof(mol.pi_)
+          + sizeof(mol.tau_)
+          + sizeof(mol.specialPosition_)
+          + sizeof(mol.potentialEnergy_)
+          + sizeof(mol.rf_)
+          + sizeof(mol.special_)
+          + sizeof(mol.id_)
         );
-        os << mol.siteForces_ << mol.sitePositions_;
+        os  << mol.siteForces_ << mol.sitePositions_;
     }
 
     // Check state of Ostream
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
index e69f1dfa5d4..b747373e3a7 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
@@ -928,7 +928,6 @@ void Foam::moleculeCloud::initialiseMolecules
 
                     n++;
                 }
-
             }
         }
     }
@@ -1177,7 +1176,7 @@ void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
 {
     OFstream str(fName);
 
-    str<< nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
+    str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
 
     const_iterator mol(this->begin());
 
@@ -1189,7 +1188,7 @@ void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
         {
             const point& sP = mol().sitePositions()[i];
 
-            str<< pot_.siteIdList()[cP.siteIds()[i]]
+            str << pot_.siteIdList()[cP.siteIds()[i]]
                 << ' ' << sP.x()*1e10
                 << ' ' << sP.y()*1e10
                 << ' ' << sP.z()*1e10
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
index 719605a89cc..6863227c12c 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
@@ -52,7 +52,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class moleculeCloud Declaration
+                       Class moleculeCloud Declaration
 \*---------------------------------------------------------------------------*/
 
 class moleculeCloud
@@ -76,6 +76,7 @@ private:
 
         Random rndGen_;
 
+
     // Private Member Functions
 
         void buildConstProps();
@@ -163,6 +164,7 @@ public:
 
         static scalar vacuumPermittivity;
 
+
     // Constructors
 
         //- Construct given mesh and potential references
@@ -180,8 +182,8 @@ public:
             const IOdictionary& mdInitialiseDict
         );
 
-    // Member Functions
 
+    // Member Functions
 
         //- Evolve the molecules (move, calculate forces, control state etc)
         void evolve();
@@ -194,6 +196,7 @@ public:
             const scalar measuredTemperature
         );
 
+
         // Access
 
             inline const polyMesh& mesh() const;
@@ -207,19 +210,18 @@ public:
             inline const List<molecule::constantProperties> constProps() const;
 
             inline const molecule::constantProperties&
-            constProps(label id) const;
+                constProps(label id) const;
 
             inline Random& rndGen();
 
+
     // Member Operators
 
         //- Write fields
-
-            void writeFields() const;
+        void writeFields() const;
 
         //- Write molecule sites in XYZ format
-
-            void writeXYZ(const fileName& fName) const;
+        void writeXYZ(const fileName& fName) const;
 };
 
 
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
index acc33480440..94c9f49286b 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
@@ -32,9 +32,9 @@ inline void Foam::moleculeCloud::evaluatePair
     molecule* molJ
 )
 {
-    const pairPotentialList& pairPot(pot_.pairPotentials());
+    const pairPotentialList& pairPot = pot_.pairPotentials();
 
-    const pairPotential& electrostatic(pairPot.electrostatic());
+    const pairPotential& electrostatic = pairPot.electrostatic();
 
     label idI = molI->id();
 
@@ -67,7 +67,7 @@ inline void Foam::moleculeCloud::evaluatePair
             if (pairPotentialSitesI[sI] && pairPotentialSitesJ[sJ])
             {
                 vector rsIsJ =
-                molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
+                    molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
 
                 scalar rsIsJMagSq = magSqr(rsIsJ);
 
@@ -75,8 +75,9 @@ inline void Foam::moleculeCloud::evaluatePair
                 {
                     scalar rsIsJMag = mag(rsIsJ);
 
-                    vector fsIsJ = (rsIsJ/rsIsJMag)
-                    *pairPot.force(idsI, idsJ, rsIsJMag);
+                    vector fsIsJ =
+                        (rsIsJ/rsIsJMag)
+                       *pairPot.force(idsI, idsJ, rsIsJMag);
 
                     molI->siteForces()[sI] += fsIsJ;
 
@@ -94,7 +95,7 @@ inline void Foam::moleculeCloud::evaluatePair
                     vector rIJ = molI->position() - molJ->position();
 
                     tensor virialContribution =
-                    (rsIsJ * fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
+                        (rsIsJ*fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
 
                     molI->rf() += virialContribution;
 
@@ -121,15 +122,17 @@ inline void Foam::moleculeCloud::evaluatePair
 
                     scalar chargeJ = constPropJ.siteCharges()[sJ];
 
-                    vector fsIsJ = (rsIsJ/rsIsJMag)
-                    *chargeI*chargeJ*electrostatic.force(rsIsJMag);
+                    vector fsIsJ =
+                        (rsIsJ/rsIsJMag)
+                       *chargeI*chargeJ*electrostatic.force(rsIsJMag);
 
                     molI->siteForces()[sI] += fsIsJ;
 
                     molJ->siteForces()[sJ] += -fsIsJ;
 
-                    scalar potentialEnergy = chargeI*chargeJ
-                    *electrostatic.energy(rsIsJMag);
+                    scalar potentialEnergy =
+                        chargeI*chargeJ
+                       *electrostatic.energy(rsIsJMag);
 
                     molI->potentialEnergy() += 0.5*potentialEnergy;
 
@@ -138,7 +141,7 @@ inline void Foam::moleculeCloud::evaluatePair
                     vector rIJ = molI->position() - molJ->position();
 
                     tensor virialContribution =
-                    (rsIsJ * fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
+                        (rsIsJ*fsIsJ)*(rsIsJ & rIJ)/rsIsJMagSq;
 
                     molI->rf() += virialContribution;
 
@@ -153,15 +156,16 @@ inline void Foam::moleculeCloud::evaluatePair
     }
 }
 
+
 inline void Foam::moleculeCloud::evaluatePair
 (
     molecule* molReal,
     referredMolecule* molRef
 )
 {
-    const pairPotentialList& pairPot(pot_.pairPotentials());
+    const pairPotentialList& pairPot = pot_.pairPotentials();
 
-    const pairPotential& electrostatic(pairPot.electrostatic());
+    const pairPotential& electrostatic = pairPot.electrostatic();
 
     label idReal = molReal->id();
 
@@ -194,16 +198,18 @@ inline void Foam::moleculeCloud::evaluatePair
             if (pairPotentialSitesReal[sReal] && pairPotentialSitesRef[sRef])
             {
                 vector rsRealsRef =
-                molReal->sitePositions()[sReal] - molRef->sitePositions()[sRef];
+                    molReal->sitePositions()[sReal]
+                  - molRef->sitePositions()[sRef];
 
                 scalar rsRealsRefMagSq = magSqr(rsRealsRef);
 
-                if(pairPot.rCutSqr(idsReal, idsRef, rsRealsRefMagSq))
+                if (pairPot.rCutSqr(idsReal, idsRef, rsRealsRefMagSq))
                 {
                     scalar rsRealsRefMag = mag(rsRealsRef);
 
-                    vector fsRealsRef = (rsRealsRef/rsRealsRefMag)
-                    *pairPot.force(idsReal, idsRef, rsRealsRefMag);
+                    vector fsRealsRef =
+                        (rsRealsRef/rsRealsRefMag)
+                       *pairPot.force(idsReal, idsRef, rsRealsRefMag);
 
                     molReal->siteForces()[sReal] += fsRealsRef;
 
@@ -216,9 +222,10 @@ inline void Foam::moleculeCloud::evaluatePair
 
                     vector rRealRef = molReal->position() - molRef->position();
 
-                    molReal->rf() += (rsRealsRef * fsRealsRef)
-                    *(rsRealsRef & rRealRef)
-                    /rsRealsRefMagSq;
+                    molReal->rf() +=
+                        (rsRealsRef*fsRealsRef)
+                       *(rsRealsRef & rRealRef)
+                       /rsRealsRefMagSq;
 
                     // molReal->rf() += rsRealsRef * fsRealsRef;
 
@@ -228,11 +235,12 @@ inline void Foam::moleculeCloud::evaluatePair
             if (electrostaticSitesReal[sReal] && electrostaticSitesRef[sRef])
             {
                 vector rsRealsRef =
-                molReal->sitePositions()[sReal] - molRef->sitePositions()[sRef];
+                    molReal->sitePositions()[sReal]
+                  - molRef->sitePositions()[sRef];
 
                 scalar rsRealsRefMagSq = magSqr(rsRealsRef);
 
-                if(rsRealsRefMagSq <= electrostatic.rCutSqr())
+                if (rsRealsRefMagSq <= electrostatic.rCutSqr())
                 {
                     scalar rsRealsRefMag = mag(rsRealsRef);
 
@@ -240,22 +248,25 @@ inline void Foam::moleculeCloud::evaluatePair
 
                     scalar chargeRef = constPropRef.siteCharges()[sRef];
 
-                    vector fsRealsRef = (rsRealsRef/rsRealsRefMag)
-                    *chargeReal*chargeRef
-                    *electrostatic.force(rsRealsRefMag);
+                    vector fsRealsRef =
+                        (rsRealsRef/rsRealsRefMag)
+                       *chargeReal*chargeRef
+                       *electrostatic.force(rsRealsRefMag);
 
                     molReal->siteForces()[sReal] += fsRealsRef;
 
-                    scalar potentialEnergy = chargeReal*chargeRef
-                    *electrostatic.energy(rsRealsRefMag);
+                    scalar potentialEnergy =
+                        chargeReal*chargeRef
+                       *electrostatic.energy(rsRealsRefMag);
 
                     molReal->potentialEnergy() += 0.5*potentialEnergy;
 
                     vector rRealRef = molReal->position() - molRef->position();
 
-                    molReal->rf() += (rsRealsRef * fsRealsRef)
-                    *(rsRealsRef & rRealRef)
-                    /rsRealsRefMagSq;
+                    molReal->rf() +=
+                        (rsRealsRef*fsRealsRef)
+                       *(rsRealsRef & rRealRef)
+                       /rsRealsRefMagSq;
 
                     // molReal->rf() += rsRealsRef * fsRealsRef;
                 }
@@ -271,9 +282,9 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
     molecule* molJ
 ) const
 {
-    const pairPotentialList& pairPot(pot_.pairPotentials());
+    const pairPotentialList& pairPot = pot_.pairPotentials();
 
-    const pairPotential& electrostatic(pairPot.electrostatic());
+    const pairPotential& electrostatic = pairPot.electrostatic();
 
     label idI = molI->id();
 
@@ -306,11 +317,11 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
             if (pairPotentialSitesI[sI] && pairPotentialSitesJ[sJ])
             {
                 vector rsIsJ =
-                molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
+                    molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
 
                 scalar rsIsJMagSq = magSqr(rsIsJ);
 
-                if(pairPot.rCutSqr(idsI, idsJ, rsIsJMagSq))
+                if (pairPot.rCutSqr(idsI, idsJ, rsIsJMagSq))
                 {
                     scalar rsIsJMag = mag(rsIsJ);
 
@@ -321,7 +332,7 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
                     if (rsIsJMag < SMALL)
                     {
                         WarningIn("moleculeCloud::removeHighEnergyOverlaps()")
-                        << "Molecule site pair closer than "
+                            << "Molecule site pair closer than "
                             << SMALL
                             << ": mag separation = " << rsIsJMag
                             << ". These may have been placed on top of each"
@@ -355,11 +366,11 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
             if (electrostaticSitesI[sI] && electrostaticSitesJ[sJ])
             {
                 vector rsIsJ =
-                molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
+                    molI->sitePositions()[sI] - molJ->sitePositions()[sJ];
 
                 scalar rsIsJMagSq = magSqr(rsIsJ);
 
-                if(pairPot.rCutMaxSqr(rsIsJMagSq))
+                if (pairPot.rCutMaxSqr(rsIsJMagSq))
                 {
                     scalar rsIsJMag = mag(rsIsJ);
 
@@ -370,7 +381,7 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
                     if (rsIsJMag < SMALL)
                     {
                         WarningIn("moleculeCloud::removeHighEnergyOverlaps()")
-                        << "Molecule site pair closer than "
+                            << "Molecule site pair closer than "
                             << SMALL
                             << ": mag separation = " << rsIsJMag
                             << ". These may have been placed on top of each"
@@ -414,9 +425,9 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
     referredMolecule* molRef
 ) const
 {
-    const pairPotentialList& pairPot(pot_.pairPotentials());
+    const pairPotentialList& pairPot = pot_.pairPotentials();
 
-    const pairPotential& electrostatic(pairPot.electrostatic());
+    const pairPotential& electrostatic = pairPot.electrostatic();
 
     label idReal = molReal->id();
 
@@ -449,11 +460,12 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
             if (pairPotentialSitesReal[sReal] && pairPotentialSitesRef[sRef])
             {
                 vector rsRealsRef =
-                molReal->sitePositions()[sReal] - molRef->sitePositions()[sRef];
+                    molReal->sitePositions()[sReal]
+                  - molRef->sitePositions()[sRef];
 
                 scalar rsRealsRefMagSq = magSqr(rsRealsRef);
 
-                if(pairPot.rCutSqr(idsReal, idsRef, rsRealsRefMagSq))
+                if (pairPot.rCutSqr(idsReal, idsRef, rsRealsRefMagSq))
                 {
                     scalar rsRealsRefMag = mag(rsRealsRef);
 
@@ -464,7 +476,7 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
                     if (rsRealsRefMag < SMALL)
                     {
                         WarningIn("moleculeCloud::removeHighEnergyOverlaps()")
-                        << "Molecule site pair closer than "
+                            << "Molecule site pair closer than "
                             << SMALL
                             << ": mag separation = " << rsRealsRefMag
                             << ". These may have been placed on top of each"
@@ -499,11 +511,12 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
             if (electrostaticSitesReal[sReal] && electrostaticSitesRef[sRef])
             {
                 vector rsRealsRef =
-                molReal->sitePositions()[sReal] - molRef->sitePositions()[sRef];
+                    molReal->sitePositions()[sReal]
+                  - molRef->sitePositions()[sRef];
 
                 scalar rsRealsRefMagSq = magSqr(rsRealsRef);
 
-                if(pairPot.rCutMaxSqr(rsRealsRefMagSq))
+                if (pairPot.rCutMaxSqr(rsRealsRefMagSq))
                 {
                     scalar rsRealsRefMag = mag(rsRealsRef);
 
@@ -514,7 +527,7 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
                     if (rsRealsRefMag < SMALL)
                     {
                         WarningIn("moleculeCloud::removeHighEnergyOverlaps()")
-                        << "Molecule site pair closer than "
+                            << "Molecule site pair closer than "
                             << SMALL
                             << ": mag separation = " << rsRealsRefMag
                             << ". These may have been placed on top of each"
@@ -539,8 +552,9 @@ inline bool Foam::moleculeCloud::evaluatePotentialLimit
                     (
                         mag
                         (
-                            chargeReal*chargeRef
-                            *electrostatic.energy(rsRealsRefMag)
+                            chargeReal
+                           *chargeRef
+                           *electrostatic.energy(rsRealsRefMag)
                         )
                       > pot_.potentialEnergyLimit()
                     )
@@ -599,6 +613,7 @@ inline Foam::vector Foam::moleculeCloud::equipartitionAngularMomentum
     }
 }
 
+
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline const Foam::polyMesh& Foam::moleculeCloud::mesh() const
diff --git a/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.H b/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.H
index cce0c725f18..acefe4b8151 100644
--- a/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.H
+++ b/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.H
@@ -46,7 +46,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class reducedUnits Declaration
+                         Class reducedUnits Declaration
 \*---------------------------------------------------------------------------*/
 
 class reducedUnits
diff --git a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C
index bc0f50a9442..1dff432741c 100644
--- a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.C
@@ -27,8 +27,6 @@ License
 #include "electrostaticPotential.H"
 #include "mathematicalConstants.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::electrostaticPotential::electrostaticPotential()
diff --git a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.H b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.H
index cee15d771bd..d2c4bb88b91 100644
--- a/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.H
+++ b/src/lagrangian/molecularDynamics/potential/electrostaticPotential/electrostaticPotential.H
@@ -44,7 +44,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class electrostaticPotential Declaration
+                   Class electrostaticPotential Declaration
 \*---------------------------------------------------------------------------*/
 
 class electrostaticPotential
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
index 2110ca84281..df247d84dea 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
@@ -36,8 +36,6 @@ namespace Foam
 defineTypeNameAndDebug(energyScalingFunction, 0);
 defineRunTimeSelectionTable(energyScalingFunction, dictionary);
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::energyScalingFunction::energyScalingFunction
@@ -66,6 +64,7 @@ bool Foam::energyScalingFunction::read
     return true;
 }
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H
index 5055db985f3..8815151bcf0 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H
@@ -48,7 +48,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                Class energyScalingFunction Declaration
+                   Class energyScalingFunction Declaration
 \*---------------------------------------------------------------------------*/
 
 class energyScalingFunction
@@ -144,8 +144,6 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 #endif
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
index e9c03e78c08..ccbdb8c92e7 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
@@ -58,8 +58,8 @@ autoPtr<energyScalingFunction> energyScalingFunction::New
         (
             "energyScalingFunction::New()"
         )   << "Unknown energyScalingFunction type "
-            << energyScalingFunctionTypeName << endl << endl
-            << "Valid  energyScalingFunctions are : " << endl
+            << energyScalingFunctionTypeName << nl << nl
+            << "Valid  energyScalingFunctions are: " << nl
             << dictionaryConstructorTablePtr_->toc()
             << exit(FatalError);
     }
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C
index 6c43a1d63e7..defeb779a06 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C
@@ -57,6 +57,7 @@ scalar doubleSigmoid::sigmoidScale
     return 1.0 / (1.0 + exp( scale * (r - shift)));
 }
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 doubleSigmoid::doubleSigmoid
@@ -67,13 +68,17 @@ doubleSigmoid::doubleSigmoid
 )
 :
     energyScalingFunction(name, energyScalingFunctionProperties, pairPot),
-    doubleSigmoidCoeffs_(energyScalingFunctionProperties.subDict(typeName + "Coeffs")),
+    doubleSigmoidCoeffs_
+    (
+        energyScalingFunctionProperties.subDict(typeName + "Coeffs")
+    ),
     shift1_(readScalar(doubleSigmoidCoeffs_.lookup("shift1"))),
     scale1_(readScalar(doubleSigmoidCoeffs_.lookup("scale1"))),
     shift2_(readScalar(doubleSigmoidCoeffs_.lookup("shift2"))),
     scale2_(readScalar(doubleSigmoidCoeffs_.lookup("scale2")))
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 void doubleSigmoid::scaleEnergy(scalar& e, const scalar r) const
@@ -81,17 +86,19 @@ void doubleSigmoid::scaleEnergy(scalar& e, const scalar r) const
     e *= sigmoidScale(r, shift1_, scale1_) * sigmoidScale(r, shift2_, scale2_);
 }
 
+
 bool doubleSigmoid::read(const dictionary& energyScalingFunctionProperties)
 {
     energyScalingFunction::read(energyScalingFunctionProperties);
 
-    doubleSigmoidCoeffs_ = energyScalingFunctionProperties.subDict(typeName + "Coeffs");
+    doubleSigmoidCoeffs_ =
+        energyScalingFunctionProperties.subDict(typeName + "Coeffs");
 
     doubleSigmoidCoeffs_.lookup("shift1") >> shift1_;
     doubleSigmoidCoeffs_.lookup("scale1") >> scale1_;
     doubleSigmoidCoeffs_.lookup("shift2") >> shift2_;
     doubleSigmoidCoeffs_.lookup("scale2") >> scale2_;
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.H b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.H
index b2b9e189e96..27e75fb1901 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.H
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.H
@@ -46,7 +46,7 @@ namespace energyScalingFunctions
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class doubleSigmoid Declaration
+                        Class doubleSigmoid Declaration
 \*---------------------------------------------------------------------------*/
 
 class doubleSigmoid
@@ -62,6 +62,7 @@ class doubleSigmoid
         scalar shift2_;
         scalar scale2_;
 
+
     // Private Member Functions
 
         scalar sigmoidScale
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/noScaling/noScaling.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/noScaling/noScaling.C
index 4b89cb174e7..412f7538876 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/noScaling/noScaling.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/noScaling/noScaling.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -60,15 +58,17 @@ noScaling::noScaling
     energyScalingFunction(name, energyScalingFunctionProperties, pairPot)
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 void noScaling::scaleEnergy(scalar& e, const scalar r) const
 {}
 
+
 bool noScaling::read(const dictionary& energyScalingFunctionProperties)
 {
     energyScalingFunction::read(energyScalingFunctionProperties);
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.C
index 9b4c5a4b9ce..d6866cfc8f9 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -61,6 +59,7 @@ shifted::shifted
     e_at_rCut_(pairPot.unscaledEnergy(pairPot.rCut()))
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 void shifted::scaleEnergy(scalar& e, const scalar r) const
@@ -68,10 +67,11 @@ void shifted::scaleEnergy(scalar& e, const scalar r) const
     e -= e_at_rCut_;
 }
 
+
 bool shifted::read(const dictionary& energyScalingFunctionProperties)
 {
     energyScalingFunction::read(energyScalingFunctionProperties);
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.H b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.H
index 1177a35febc..01b0b413f34 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.H
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.H
@@ -57,6 +57,7 @@ class shifted
 
         scalar e_at_rCut_;
 
+
 public:
 
     //- Runtime type information
@@ -79,6 +80,7 @@ public:
         ~shifted()
         {}
 
+
     // Member Functions
 
         void scaleEnergy(scalar& e, const scalar r) const;
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.C
index da2b2baaf04..72041de3e05 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -63,6 +61,7 @@ shiftedForce::shiftedForce
     de_dr_at_rCut_(pairPot.energyDerivative(rCut_, false))
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 void shiftedForce::scaleEnergy(scalar& e, const scalar r) const
@@ -70,10 +69,11 @@ void shiftedForce::scaleEnergy(scalar& e, const scalar r) const
     e -= ( e_at_rCut_ + de_dr_at_rCut_ * (r - rCut_) );
 }
 
+
 bool shiftedForce::read(const dictionary& energyScalingFunctionProperties)
 {
     energyScalingFunction::read(energyScalingFunctionProperties);
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.H b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.H
index 2ae26169ab5..f6d97d002b6 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.H
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.H
@@ -46,7 +46,7 @@ namespace energyScalingFunctions
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class shiftedForce Declaration
+                       Class shiftedForce Declaration
 \*---------------------------------------------------------------------------*/
 
 class shiftedForce
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C
index 443fbb0ade9..c689608172a 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C
@@ -45,6 +45,7 @@ addToRunTimeSelectionTable
     dictionary
 );
 
+
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
 
 scalar sigmoid::sigmoidScale
@@ -57,6 +58,7 @@ scalar sigmoid::sigmoidScale
     return 1.0 / (1.0 + exp( scale * (r - shift)));
 }
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 sigmoid::sigmoid
@@ -67,11 +69,15 @@ sigmoid::sigmoid
 )
 :
     energyScalingFunction(name, energyScalingFunctionProperties, pairPot),
-    sigmoidCoeffs_(energyScalingFunctionProperties.subDict(typeName + "Coeffs")),
+    sigmoidCoeffs_
+    (
+        energyScalingFunctionProperties.subDict(typeName + "Coeffs")
+    ),
     shift_(readScalar(sigmoidCoeffs_.lookup("shift"))),
     scale_(readScalar(sigmoidCoeffs_.lookup("scale")))
 {}
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 void sigmoid::scaleEnergy(scalar& e, const scalar r) const
@@ -79,15 +85,17 @@ void sigmoid::scaleEnergy(scalar& e, const scalar r) const
     e *= sigmoidScale(r, shift_, scale_);
 }
 
+
 bool sigmoid::read(const dictionary& energyScalingFunctionProperties)
 {
     energyScalingFunction::read(energyScalingFunctionProperties);
 
-    sigmoidCoeffs_ = energyScalingFunctionProperties.subDict(typeName + "Coeffs");
+    sigmoidCoeffs_ =
+        energyScalingFunctionProperties.subDict(typeName + "Coeffs");
 
     sigmoidCoeffs_.lookup("shift") >> shift_;
     sigmoidCoeffs_.lookup("scale") >> shift_;
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
index d9092c1a24f..2986a0e5394 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
@@ -54,8 +54,8 @@ autoPtr<pairPotential> pairPotential::New
         (
             "pairPotential::New()"
         )   << "Unknown pairPotential type "
-            << pairPotentialTypeName << endl << endl
-            << "Valid  pairPotentials are : " << endl
+            << pairPotentialTypeName << nl << nl
+            << "Valid  pairPotentials are: " << nl
             << dictionaryConstructorTablePtr_->toc()
             << exit(FatalError);
     }
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
index e1ddc7b5448..9be12ebd0c8 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
@@ -54,7 +54,7 @@ namespace Foam
 class energyScalingFunction;
 
 /*---------------------------------------------------------------------------*\
-                Class pairPotential Declaration
+                     Class pairPotential Declaration
 \*---------------------------------------------------------------------------*/
 
 class pairPotential
@@ -80,6 +80,7 @@ protected:
 
         bool writeTables_;
 
+
     // Private Member Functions
 
         void scaleEnergy(scalar& e, const scalar r) const;
@@ -160,7 +161,7 @@ public:
 
         inline bool writeTables() const;
 
-        virtual scalar unscaledEnergy (const scalar r) const = 0;
+        virtual scalar unscaledEnergy(const scalar r) const = 0;
 
         scalar scaledEnergy(const scalar r) const;
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
index dffe4233b40..a07f21beceb 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
@@ -38,12 +38,12 @@ bool Foam::pairPotential::writeEnergyAndForceTables(Ostream& os) const
 
     forAll(eTab, e)
     {
-        os<< eTab[e].first()
-          << token::SPACE
-          << eTab[e].second()
-          << token::SPACE
-          << fTab[e].second()
-          << nl;
+        os  << eTab[e].first()
+            << token::SPACE
+            << eTab[e].second()
+            << token::SPACE
+            << fTab[e].second()
+            << nl;
     }
 
     return os.good();
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C
index 2d990c110b9..2e44f617da3 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -71,6 +69,7 @@ azizChen::azizChen
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar azizChen::unscaledEnergy(const scalar r) const
@@ -84,15 +83,16 @@ scalar azizChen::unscaledEnergy(const scalar r) const
         F = exp(-pow(((D_ / x) - 1.0),2));
     }
 
-    return epsilon_ *
-    (
-        A_ * Foam::pow(x, gamma_) * exp(-alpha_ * x)
-      - (
-            (C6_/ Foam::pow(x, 6))
-          + (C8_/ Foam::pow(x, 8))
-          + (C10_/ Foam::pow(x, 10))
-        )
-      * F
+    return
+        epsilon_
+       *(
+            A_ * Foam::pow(x, gamma_)*exp(-alpha_*x)
+          - (
+                (C6_/ Foam::pow(x, 6))
+              + (C8_/ Foam::pow(x, 8))
+              + (C10_/ Foam::pow(x, 10))
+            )
+           *F
     );
 }
 
@@ -112,7 +112,7 @@ bool azizChen::read(const dictionary& azizChen)
     azizChenCoeffs_.lookup("C10") >> C10_;
     azizChenCoeffs_.lookup("D") >> D_;
     azizChenCoeffs_.lookup("gamma") >> gamma_;
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
index 5af682d87a6..53f93481281 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
@@ -85,6 +85,7 @@ class azizChen
         scalar D_;
         scalar gamma_;
 
+
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C
index 21444b215f1..7dd02320322 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.C
@@ -47,9 +47,7 @@ addToRunTimeSelectionTable
 );
 
 scalar coulomb::oneOverFourPiEps0 =
-1.0/(4.0 * mathematicalConstant::pi * 8.854187817e-12);
-
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
+    1.0/(4.0 * mathematicalConstant::pi * 8.854187817e-12);
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
@@ -65,6 +63,7 @@ coulomb::coulomb
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar coulomb::unscaledEnergy(const scalar r) const
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H
index cb3eada59e5..f1e06712bb7 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H
@@ -56,7 +56,8 @@ class coulomb
 public:
 
     //- Runtime type information
-        TypeName("coulomb");
+    TypeName("coulomb");
+
 
     // Static data members
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C
index 711c2a45112..fd771e1854e 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C
@@ -47,9 +47,7 @@ addToRunTimeSelectionTable
 );
 
 scalar dampedCoulomb::oneOverFourPiEps0 =
-1.0/(4.0 * mathematicalConstant::pi * 8.854187817e-12);
-
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
+    1.0/(4.0 * mathematicalConstant::pi * 8.854187817e-12);
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
@@ -70,6 +68,7 @@ dampedCoulomb::dampedCoulomb
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar dampedCoulomb::unscaledEnergy(const scalar r) const
@@ -83,7 +82,7 @@ bool dampedCoulomb::read(const dictionary& pairPotentialProperties)
     pairPotential::read(pairPotentialProperties);
 
     dampedCoulombCoeffs_ =
-    pairPotentialProperties.subDict(typeName + "Coeffs");
+        pairPotentialProperties.subDict(typeName + "Coeffs");
 
     dampedCoulombCoeffs_.lookup("alpha") >> alpha_;
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H
index eb44399dbe6..377b531824e 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H
@@ -46,7 +46,7 @@ namespace pairPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class dampedCoulomb Declaration
+                         Class dampedCoulomb Declaration
 \*---------------------------------------------------------------------------*/
 
 class dampedCoulomb
@@ -59,15 +59,18 @@ class dampedCoulomb
 
         scalar alpha_;
 
+
 public:
 
     //- Runtime type information
-        TypeName("dampedCoulomb");
+    TypeName("dampedCoulomb");
+
 
     // Static data members
 
         static scalar oneOverFourPiEps0;
 
+
     // Constructors
 
         //- Construct from components
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C
index a303935b1e8..ae34ef4cdbc 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -57,13 +55,17 @@ exponentialRepulsion::exponentialRepulsion
 )
 :
     pairPotential(name, exponentialRepulsion),
-    exponentialRepulsionCoeffs_(exponentialRepulsion.subDict(typeName + "Coeffs")),
+    exponentialRepulsionCoeffs_
+    (
+        exponentialRepulsion.subDict(typeName + "Coeffs")
+    ),
     rm_(readScalar(exponentialRepulsionCoeffs_.lookup("rm"))),
     epsilon_(readScalar(exponentialRepulsionCoeffs_.lookup("epsilon")))
 {
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar exponentialRepulsion::unscaledEnergy(const scalar r) const
@@ -76,7 +78,8 @@ bool exponentialRepulsion::read(const dictionary& exponentialRepulsion)
 {
     pairPotential::read(exponentialRepulsion);
 
-    exponentialRepulsionCoeffs_ = exponentialRepulsion.subDict(typeName + "Coeffs");
+    exponentialRepulsionCoeffs_ =
+        exponentialRepulsion.subDict(typeName + "Coeffs");
 
     exponentialRepulsionCoeffs_.lookup("rm") >> rm_;
     exponentialRepulsionCoeffs_.lookup("epsilon") >> epsilon_;
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.H
index 148ea002cfd..8ce1ee4a0f9 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.H
@@ -46,7 +46,7 @@ namespace pairPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class exponentialRepulsion Declaration
+                   Class exponentialRepulsion Declaration
 \*---------------------------------------------------------------------------*/
 
 class exponentialRepulsion
@@ -60,6 +60,7 @@ class exponentialRepulsion
         scalar rm_;
         scalar epsilon_;
 
+
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C
index 4e3e6349305..d5a1deb88e6 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -64,6 +62,7 @@ lennardJones::lennardJones
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar lennardJones::unscaledEnergy(const scalar r) const
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.H
index 92dc4b5f558..2ae3c036ae4 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.H
@@ -46,7 +46,7 @@ namespace pairPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class lennardJones Declaration
+                         Class lennardJones Declaration
 \*---------------------------------------------------------------------------*/
 
 class lennardJones
@@ -60,6 +60,7 @@ class lennardJones
         scalar sigma_;
         scalar epsilon_;
 
+
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C
index 6ae3c92add6..7545573591b 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -66,6 +64,7 @@ maitlandSmith::maitlandSmith
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar maitlandSmith::unscaledEnergy(const scalar r) const
@@ -90,7 +89,7 @@ bool maitlandSmith::read(const dictionary& maitlandSmith)
     maitlandSmithCoeffs_.lookup("gamma") >> gamma_;
     maitlandSmithCoeffs_.lookup("rm") >> rm_;
     maitlandSmithCoeffs_.lookup("epsilon") >> epsilon_;
-    
+
     return true;
 }
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
index 37468b2daf5..cdeb01211b5 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
@@ -72,7 +72,7 @@ namespace pairPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class maitlandSmith Declaration
+                       Class maitlandSmith Declaration
 \*---------------------------------------------------------------------------*/
 
 class maitlandSmith
@@ -88,6 +88,7 @@ class maitlandSmith
         scalar rm_;
         scalar epsilon_;
 
+
 public:
 
     //- Runtime type information
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.C
index d3c08871eb2..3326fd7fe1f 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -61,6 +59,7 @@ noInteraction::noInteraction
     setLookupTables();
 }
 
+
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 scalar noInteraction::unscaledEnergy(const scalar r) const
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.H
index 938f2a30a9c..5d3fd5742db 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/noInteraction/noInteraction.H
@@ -46,7 +46,7 @@ namespace pairPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class noInteraction Declaration
+                       Class noInteraction Declaration
 \*---------------------------------------------------------------------------*/
 
 class noInteraction
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
index 0172cf94c07..2d77c4ce595 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
@@ -170,6 +170,7 @@ void Foam::pairPotentialList::readPairPotentialDict
     rCutMaxSqr_ = rCutMax_*rCutMax_;
 }
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::pairPotentialList::pairPotentialList()
@@ -177,6 +178,7 @@ Foam::pairPotentialList::pairPotentialList()
     PtrList<pairPotential>()
 {}
 
+
 Foam::pairPotentialList::pairPotentialList
 (
     const List<word>& idList,
@@ -319,6 +321,5 @@ Foam::scalar Foam::pairPotentialList::energy
     return e;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H
index 19e678eb229..b4193a46ae4 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H
@@ -47,7 +47,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class pairPotentialList Declaration
+                      Class pairPotentialList Declaration
 \*---------------------------------------------------------------------------*/
 
 class pairPotentialList
@@ -64,6 +64,7 @@ class pairPotentialList
 
         autoPtr<pairPotential> electrostaticPotential_;
 
+
     // Private Member Functions
 
         inline label pairPotentialIndex
@@ -85,6 +86,7 @@ class pairPotentialList
         //- Disallow default bitwise copy construct
         pairPotentialList(const pairPotentialList&);
 
+
 public:
 
     // Constructors
@@ -99,10 +101,12 @@ public:
             const polyMesh& mesh
         );
 
+
     // Destructor
 
         ~pairPotentialList();
 
+
     // Member Functions
 
         void buildPotentials
@@ -112,6 +116,7 @@ public:
             const polyMesh& mesh
         );
 
+
         // Access
 
             inline scalar rCutMax() const;
@@ -134,13 +139,13 @@ public:
                 const scalar rIJMagSqr
             ) const;
 
-            scalar rMin (const label a, const label b) const;
+            scalar rMin(const label a, const label b) const;
 
-            scalar dr (const label a, const label b) const;
+            scalar dr(const label a, const label b) const;
 
-            scalar rCutSqr (const label a, const label b) const;
+            scalar rCutSqr(const label a, const label b) const;
 
-            scalar rCut (const label a, const label b) const;
+            scalar rCut(const label a, const label b) const;
 
             scalar force
             (
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
index 0e296697f10..c14aa3695e1 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
@@ -56,6 +56,7 @@ inline Foam::label Foam::pairPotentialList::pairPotentialIndex
     return index;
 }
 
+
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline Foam::scalar Foam::pairPotentialList::rCutMax() const
diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.H b/src/lagrangian/molecularDynamics/potential/potential/potential.H
index 5c8569cb0cc..32f9b2a1d29 100644
--- a/src/lagrangian/molecularDynamics/potential/potential/potential.H
+++ b/src/lagrangian/molecularDynamics/potential/potential/potential.H
@@ -49,7 +49,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class potential Declaration
+                         Class potential Declaration
 \*---------------------------------------------------------------------------*/
 
 class potential
@@ -74,6 +74,7 @@ class potential
 
         vector gravity_;
 
+
     // Private Member Functions
 
         void setSiteIdList(const IOdictionary& moleculePropertiesDict);
@@ -108,6 +109,7 @@ public:
             IOdictionary& idListDict
         );
 
+
     // Destructor
 
         ~potential();
diff --git a/src/lagrangian/molecularDynamics/potential/potential/potentialI.H b/src/lagrangian/molecularDynamics/potential/potential/potentialI.H
index 0b72556152c..38ba6344557 100644
--- a/src/lagrangian/molecularDynamics/potential/potential/potentialI.H
+++ b/src/lagrangian/molecularDynamics/potential/potential/potentialI.H
@@ -24,8 +24,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 inline Foam::label Foam::potential::nIds() const
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
index d8c4e575326..85c8a703596 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
@@ -39,7 +39,11 @@ autoPtr<tetherPotential> tetherPotential::New
     const dictionary& tetherPotentialProperties
 )
 {
-    word tetherPotentialTypeName(tetherPotentialProperties.lookup("tetherPotential"));
+    word
+        tetherPotentialTypeName
+        (
+            tetherPotentialProperties.lookup("tetherPotential")
+        );
 
     Info<< nl << "Selecting tether potential "
         << tetherPotentialTypeName << " for "
@@ -54,8 +58,8 @@ autoPtr<tetherPotential> tetherPotential::New
         (
             "tetherPotential::New()"
         )   << "Unknown tetherPotential type "
-            << tetherPotentialTypeName << endl << endl
-            << "Valid  tetherPotentials are : " << endl
+            << tetherPotentialTypeName << nl << nl
+            << "Valid  tetherPotentials are: " << nl
             << dictionaryConstructorTablePtr_->toc()
             << exit(FatalError);
     }
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H
index a70da011778..f65e5bb6b85 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H
@@ -48,7 +48,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                Class tetherPotential Declaration
+                      Class tetherPotential Declaration
 \*---------------------------------------------------------------------------*/
 
 class tetherPotential
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.H
index 90b3251c171..4af51cfdff8 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.H
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.H
@@ -46,7 +46,7 @@ namespace tetherPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class harmonicSpring Declaration
+                       Class harmonicSpring Declaration
 \*---------------------------------------------------------------------------*/
 
 class harmonicSpring
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.H
index f78a3aa7c26..2bb98e39bd2 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.H
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.H
@@ -46,7 +46,7 @@ namespace tetherPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class pitchForkRing Declaration
+                       Class pitchForkRing Declaration
 \*---------------------------------------------------------------------------*/
 
 class pitchForkRing
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C
index 289190798f0..5396013a173 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C
@@ -45,8 +45,6 @@ addToRunTimeSelectionTable
     dictionary
 );
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -88,6 +86,7 @@ scalar restrainedHarmonicSpring::energy(const vector r) const
     }
 }
 
+
 vector restrainedHarmonicSpring::force(const vector r) const
 {
     scalar magR = mag(r);
@@ -102,7 +101,11 @@ vector restrainedHarmonicSpring::force(const vector r) const
     }
 }
 
-bool restrainedHarmonicSpring::read(const dictionary& tetherPotentialProperties)
+
+bool restrainedHarmonicSpring::read
+(
+    const dictionary& tetherPotentialProperties
+)
 {
     tetherPotential::read(tetherPotentialProperties);
 
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.H
index 028809010ab..1711c4f5f3e 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.H
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.H
@@ -46,7 +46,7 @@ namespace tetherPotentials
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class restrainedHarmonicSpring Declaration
+                  Class restrainedHarmonicSpring Declaration
 \*---------------------------------------------------------------------------*/
 
 class restrainedHarmonicSpring
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C
index d0b514b9b59..93498b8f711 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C
@@ -154,6 +154,5 @@ Foam::scalar Foam::tetherPotentialList::energy
     return (*this)[tetherPotentialIndex(a)].energy(rIT);
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H
index cb9bf9633b1..8ca770f5235 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H
@@ -57,6 +57,7 @@ class tetherPotentialList
 
         List<label> idMap_;
 
+
     // Private Member Functions
 
         inline label tetherPotentialIndex
@@ -92,10 +93,12 @@ public:
             const List<word>& tetherSiteIdList
         );
 
+
     // Destructor
 
         ~tetherPotentialList();
 
+
     // Member Functions
 
         void buildPotentials
-- 
GitLab