66#include < iomanip>
77
88
9- static inline void WriteBox_LAMMPS (Atoms* System, Components SystemComponents, ForceField FF, Boxsize Box, std::ofstream& textrestartFile, std::vector<std::string> AtomNames)
9+ static inline void WriteBox_LAMMPS (Atoms* System, Components& SystemComponents, ForceField& FF, Boxsize& Box, std::ofstream& textrestartFile, std::vector<std::string>& AtomNames)
1010{
1111 size_t NumberOfAtoms = 0 ;
1212 for (size_t i = 0 ; i < SystemComponents.NComponents .x ; i++)
@@ -44,7 +44,7 @@ static inline void WriteBox_LAMMPS(Atoms* System, Components SystemComponents, F
4444 }
4545}
4646
47- static inline void WriteAtoms_LAMMPS (Atoms* System, Components SystemComponents, Boxsize Box, std::ofstream& textrestartFile, std::vector<std::string> AtomNames)
47+ static inline void WriteAtoms_LAMMPS (Atoms* System, Components& SystemComponents, Boxsize& Box, std::ofstream& textrestartFile, std::vector<std::string>& AtomNames)
4848{
4949 textrestartFile << ' \n ' << " Atoms" << ' \n ' << ' \n ' ;
5050 size_t Atomcount=0 ; size_t Molcount=0 ;
@@ -83,7 +83,7 @@ static inline void WriteAtoms_LAMMPS(Atoms* System, Components SystemComponents,
8383 }
8484}
8585
86- static inline void WriteAtoms_Restart (Atoms* System, Components SystemComponents, std::ofstream& textrestartFile, std::vector<std::string> AtomNames)
86+ static inline void WriteAtoms_Restart (Atoms* System, Components& SystemComponents, std::ofstream& textrestartFile, std::vector<std::string>& AtomNames)
8787{
8888 textrestartFile << " Reactions: 0" << " \n " ;
8989 // size_t Atomcount=0;
@@ -116,7 +116,7 @@ static inline void WriteAtoms_Restart(Atoms* System, Components SystemComponents
116116 }
117117}
118118
119- static inline void WriteComponent_Restart (Atoms* System, Components SystemComponents, std::ofstream& textrestartFile, Boxsize& Box)
119+ static inline void WriteComponent_Restart (Atoms* System, Components& SystemComponents, std::ofstream& textrestartFile, Boxsize& Box)
120120{
121121 textrestartFile << " Components: " << SystemComponents.NComponents .x - SystemComponents.NumberOfFrameworks << " (Adsorbates " << SystemComponents.TotalNumberOfMolecules -SystemComponents.NumberOfFrameworks << " , Cations 0)" << " \n " ;
122122 textrestartFile << " ========================================================================\n " ;
@@ -145,7 +145,7 @@ static inline void WriteComponent_Restart(Atoms* System, Components SystemCompon
145145 }
146146}
147147
148- static inline void WriteCellInfo_Restart (Atoms* System, Components SystemComponents, std::ofstream& textrestartFile, Boxsize& Box)
148+ static inline void WriteCellInfo_Restart (Atoms* System, Components& SystemComponents, std::ofstream& textrestartFile, Boxsize& Box)
149149{
150150 // size_t Atomcount=0;
151151 textrestartFile << " Cell info:\n " ;
@@ -219,7 +219,7 @@ static inline void copyFile(const std::string& sourcePath, const std::string& de
219219 // return true;
220220}
221221
222- static inline void create_Restart_file (size_t Cycle, Atoms* System, Components SystemComponents, ForceField FF, Boxsize Box, std::vector<std::string> AtomNames, size_t SystemIndex)
222+ static inline void create_Restart_file (size_t Cycle, Atoms* System, Components& SystemComponents, ForceField& FF, Boxsize& Box, std::vector<std::string>& AtomNames, size_t SystemIndex)
223223{
224224 std::ofstream textrestartFile{};
225225 std::string dirname=" Restart/System_" + std::to_string (SystemIndex) + " /" ;
@@ -239,7 +239,7 @@ static inline void create_Restart_file(size_t Cycle, Atoms* System, Components S
239239 textrestartFile.close ();
240240}
241241
242- static inline void WriteAllData (Atoms* System, Components SystemComponents, std::ofstream& textrestartFile, std::vector<std::string> AtomNames, size_t i)
242+ static inline void WriteAllData (Atoms* System, Components& SystemComponents, std::ofstream& textrestartFile, std::vector<std::string>& AtomNames, size_t i)
243243{
244244 // size_t Atomcount=0;
245245 Atoms Data = System[i];
@@ -251,7 +251,7 @@ static inline void WriteAllData(Atoms* System, Components SystemComponents, std:
251251 textrestartFile << " " << Data.MolID [j] << " " << j - Data.MolID [j]*molsize << " " << Data.pos [j].x << " " << Data.pos [j].y << " " << Data.pos [j].z << " " << Data.charge [j] << " " << Data.scale [j] << " " << Data.scaleCoul [j] << " " << Data.Type [j] << ' \n ' ;
252252}
253253
254- static inline void Write_All_Adsorbate_data (size_t Cycle, Atoms* System, Components SystemComponents, ForceField FF, Boxsize Box, std::vector<std::string> AtomNames, size_t SystemIndex)
254+ static inline void Write_All_Adsorbate_data (size_t Cycle, Atoms* System, Components& SystemComponents, ForceField& FF, Boxsize& Box, std::vector<std::string>& AtomNames, size_t SystemIndex)
255255{
256256 // std::ofstream textrestartFile{};
257257 std::filesystem::path cwd = std::filesystem::current_path ();
@@ -272,7 +272,7 @@ static inline void Write_All_Adsorbate_data(size_t Cycle, Atoms* System, Compone
272272
273273// Zhao's note on 112623, moved the following to fxn_main.h//
274274/*
275- static inline void Write_Lambda(size_t Cycle, Components SystemComponents, size_t SystemIndex)
275+ static inline void Write_Lambda(size_t Cycle, Components& SystemComponents, size_t SystemIndex)
276276{
277277 std::ofstream textrestartFile{};
278278 std::filesystem::path cwd = std::filesystem::current_path();
@@ -308,7 +308,7 @@ static inline void Write_Lambda(size_t Cycle, Components SystemComponents, size_
308308 textrestartFile.close();
309309}
310310
311- static inline void Write_TMMC(size_t Cycle, Components SystemComponents, size_t SystemIndex)
311+ static inline void Write_TMMC(size_t Cycle, Components& SystemComponents, size_t SystemIndex)
312312{
313313 std::ofstream textTMMCFile{};
314314 std::filesystem::path cwd = std::filesystem::current_path();
0 commit comments