diff --git a/applications/solvers/molecularDynamics/gnemdFoam/gnemdFoam.C b/applications/solvers/molecularDynamics/gnemdFoam/gnemdFoam.C
old mode 100755
new mode 100644
diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C b/applications/solvers/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C
old mode 100755
new mode 100644
diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H b/applications/solvers/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index 567f7a10defa3445265239cb9018bddfeed28790..0a5e86bdefa2e0948fb0d6ad077e436ae7cc518f 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -5,4 +5,6 @@ wmake libso basic
 wmake libso solidParticle
 wmake libso intermediate
 wmake libso dieselSpray
-wmake libso molecule
+(cd molecularDynamics && wmake libso potential)
+(cd molecularDynamics && wmake libso molecule)
+
diff --git a/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.C b/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.H b/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorI.H b/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorIO.C b/src/lagrangian/molecularDynamics/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorIO.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/distribution/distribution.C b/src/lagrangian/molecularDynamics/molecule/distribution/distribution.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/distribution/distribution.H b/src/lagrangian/molecularDynamics/molecule/distribution/distribution.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/distribution/distributionI.H b/src/lagrangian/molecularDynamics/molecule/distribution/distributionI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/distribution/distributionIO.C b/src/lagrangian/molecularDynamics/molecule/distribution/distributionIO.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/md.H b/src/lagrangian/molecularDynamics/molecule/mdTools/md.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureEquilibration.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureEquilibration.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudApplyConstraintsAndThermostats.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudApplyConstraintsAndThermostats.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellInteractionLists.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellInteractionLists.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellReferralLists.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellReferralLists.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildDirectInteractionList.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildDirectInteractionList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildReferredInteractionList.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildReferredInteractionList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateExternalForce.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateExternalForce.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateForce.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateForce.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForce.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForce.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCells.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCells.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCellsCalculationStep.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCellsCalculationStep.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceReferredCells.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculatePairForceReferredCells.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateTetherForce.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCalculateTetherForce.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCodeSnippets.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudCodeSnippets.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudIntegrateEquationsOfMotion.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudIntegrateEquationsOfMotion.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudReadMDParameters.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudReadMDParameters.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRealCellsInRangeOfSegment.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRealCellsInRangeOfSegment.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudReferredCellsInRangeOfSegment.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudReferredCellsInRangeOfSegment.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlaps.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlaps.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCells.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCells.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCellsCalculationStep.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCellsCalculationStep.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsReferredCells.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsReferredCells.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudTestEdgeEdgeDistance.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudTestEdgeEdgeDistance.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudTestPointFaceDistance.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudTestPointFaceDistance.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralList.C b/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralList.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralList.H b/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralListI.H b/src/lagrangian/molecularDynamics/molecule/referralLists/receivingReferralListI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralList.C b/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralList.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralList.H b/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralListI.H b/src/lagrangian/molecularDynamics/molecule/referralLists/sendingReferralListI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCell/referredCell.C b/src/lagrangian/molecularDynamics/molecule/referredCell/referredCell.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCell/referredCell.H b/src/lagrangian/molecularDynamics/molecule/referredCell/referredCell.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCell/referredCellI.H b/src/lagrangian/molecularDynamics/molecule/referredCell/referredCellI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellList.C b/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellList.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellList.H b/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellListI.H b/src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellListI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMolecule.C b/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMolecule.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMolecule.H b/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMolecule.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMoleculeI.H b/src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMoleculeI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialI.H b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialI.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
old mode 100755
new mode 100644
index 32e01958c8bffe064164afee03db05202bd98b50..1a9ff953b2de7d0a896b539c01dfae45e78d0f76
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialListI.H
@@ -36,12 +36,12 @@ inline Foam::label Foam::pairPotentialList::pairPotentialIndex
 
     if (a < b)
     {
-        index = a*(2*nIds() - a - 1) / 2 + b;
+        index = a*(2*nIds() - a - 1)/2 + b;
     }
 
     else
     {
-        index = b*(2*nIds() - b - 1) / 2 + a;
+        index = b*(2*nIds() - b - 1)/2 + a;
     }
 
     if (index > size() - 1)
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.C
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialList.H
old mode 100755
new mode 100644
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialListI.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/tetherPotentialList/tetherPotentialListI.H
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/constant/polyMesh/blockMeshDict b/tutorials/gnemdFoam/constrictedChannel/constant/polyMesh/blockMeshDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/controlDict b/tutorials/gnemdFoam/constrictedChannel/system/controlDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/fvSchemes b/tutorials/gnemdFoam/constrictedChannel/system/fvSchemes
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/fvSolution b/tutorials/gnemdFoam/constrictedChannel/system/fvSolution
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/mdSolution b/tutorials/gnemdFoam/constrictedChannel/system/mdSolution
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/molConfigDict b/tutorials/gnemdFoam/constrictedChannel/system/molConfigDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/constrictedChannel/system/potentialDict b/tutorials/gnemdFoam/constrictedChannel/system/potentialDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/constant/polyMesh/blockMeshDict b/tutorials/gnemdFoam/nanoNozzle/constant/polyMesh/blockMeshDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/controlDict b/tutorials/gnemdFoam/nanoNozzle/system/controlDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/decomposeParDict b/tutorials/gnemdFoam/nanoNozzle/system/decomposeParDict
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/fvSchemes b/tutorials/gnemdFoam/nanoNozzle/system/fvSchemes
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/fvSolution b/tutorials/gnemdFoam/nanoNozzle/system/fvSolution
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/mdSolution b/tutorials/gnemdFoam/nanoNozzle/system/mdSolution
old mode 100755
new mode 100644
diff --git a/tutorials/gnemdFoam/nanoNozzle/system/molConfigDict b/tutorials/gnemdFoam/nanoNozzle/system/molConfigDict
old mode 100755
new mode 100644