6
6
#include < iomanip>
7
7
8
8
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)
10
10
{
11
11
size_t NumberOfAtoms = 0 ;
12
12
for (size_t i = 0 ; i < SystemComponents.NComponents .x ; i++)
@@ -44,7 +44,7 @@ static inline void WriteBox_LAMMPS(Atoms* System, Components SystemComponents, F
44
44
}
45
45
}
46
46
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)
48
48
{
49
49
textrestartFile << ' \n ' << " Atoms" << ' \n ' << ' \n ' ;
50
50
size_t Atomcount=0 ; size_t Molcount=0 ;
@@ -83,7 +83,7 @@ static inline void WriteAtoms_LAMMPS(Atoms* System, Components SystemComponents,
83
83
}
84
84
}
85
85
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)
87
87
{
88
88
textrestartFile << " Reactions: 0" << " \n " ;
89
89
// size_t Atomcount=0;
@@ -116,7 +116,7 @@ static inline void WriteAtoms_Restart(Atoms* System, Components SystemComponents
116
116
}
117
117
}
118
118
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)
120
120
{
121
121
textrestartFile << " Components: " << SystemComponents.NComponents .x - SystemComponents.NumberOfFrameworks << " (Adsorbates " << SystemComponents.TotalNumberOfMolecules -SystemComponents.NumberOfFrameworks << " , Cations 0)" << " \n " ;
122
122
textrestartFile << " ========================================================================\n " ;
@@ -145,7 +145,7 @@ static inline void WriteComponent_Restart(Atoms* System, Components SystemCompon
145
145
}
146
146
}
147
147
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)
149
149
{
150
150
// size_t Atomcount=0;
151
151
textrestartFile << " Cell info:\n " ;
@@ -219,7 +219,7 @@ static inline void copyFile(const std::string& sourcePath, const std::string& de
219
219
// return true;
220
220
}
221
221
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)
223
223
{
224
224
std::ofstream textrestartFile{};
225
225
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
239
239
textrestartFile.close ();
240
240
}
241
241
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)
243
243
{
244
244
// size_t Atomcount=0;
245
245
Atoms Data = System[i];
@@ -251,7 +251,7 @@ static inline void WriteAllData(Atoms* System, Components SystemComponents, std:
251
251
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 ' ;
252
252
}
253
253
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)
255
255
{
256
256
// std::ofstream textrestartFile{};
257
257
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
272
272
273
273
// Zhao's note on 112623, moved the following to fxn_main.h//
274
274
/*
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)
276
276
{
277
277
std::ofstream textrestartFile{};
278
278
std::filesystem::path cwd = std::filesystem::current_path();
@@ -308,7 +308,7 @@ static inline void Write_Lambda(size_t Cycle, Components SystemComponents, size_
308
308
textrestartFile.close();
309
309
}
310
310
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)
312
312
{
313
313
std::ofstream textTMMCFile{};
314
314
std::filesystem::path cwd = std::filesystem::current_path();
0 commit comments