Loading README.md +3 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ The data is written to `data_elastic_constants`. Plot the data and fit a 2nd ord ## Running NVE/NPT simulations Run using: `python3 deform_cnt_nve.py` (make sure to run this one first, the second script is relying on the minimized structure generated in the first script) and `python3 deform_cnt_npt.py` the results are written to the folders `data_cnt_sim/nve_deform/cnt_nve_data.csv` and `data_cnt_sim/npt_deform/cnt_npt_data.csv` accordingly. `python3 deform_cnt_nvt.py` the results are written to the folders `data_cnt_sim/nve_deform/cnt_nve_data.csv` and `data_cnt_sim/nvt_deform/cnt_nvt_data.csv` accordingly. deform_cnt_npt.py→deform_cnt_nvt.py +3 −3 Original line number Diff line number Diff line Loading @@ -101,15 +101,15 @@ if __name__ == '__main__': cnt = traj_relax_read[-1] cnt.calc = BrennerPotential() #when reading from trajectory the potential gets lost... why? no idea dyn = Langevin(cnt, timestep=timestep*units.fs,temperature_K=300, friction=0.1/units.fs) dyn = Langevin(cnt, timestep=timestep*units.fs,temperature_K=300, friction=0.01/units.fs) data = {'time':[],'temperature':[], 'epot':[],'ekin':[], 'etot': []} cnt_array_original = cnt.cell[:] run_simulation(loop_number, step_number, timestep, eps, start_deform) with open(f'{data_directory}data.json', 'r') as fp: data = json.load(fp) df = pd.DataFrame.from_dict(data) df.to_csv(f'{data_directory}cnt_npt_data.csv') print(f'Saving data to {data_directory}cnt_npt_data.csv') df.to_csv(f'{data_directory}cnt_nvt_data.csv') print(f'Saving data to {data_directory}cnt_nvt_data.csv') print('done') Loading Loading
README.md +3 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ The data is written to `data_elastic_constants`. Plot the data and fit a 2nd ord ## Running NVE/NPT simulations Run using: `python3 deform_cnt_nve.py` (make sure to run this one first, the second script is relying on the minimized structure generated in the first script) and `python3 deform_cnt_npt.py` the results are written to the folders `data_cnt_sim/nve_deform/cnt_nve_data.csv` and `data_cnt_sim/npt_deform/cnt_npt_data.csv` accordingly. `python3 deform_cnt_nvt.py` the results are written to the folders `data_cnt_sim/nve_deform/cnt_nve_data.csv` and `data_cnt_sim/nvt_deform/cnt_nvt_data.csv` accordingly.
deform_cnt_npt.py→deform_cnt_nvt.py +3 −3 Original line number Diff line number Diff line Loading @@ -101,15 +101,15 @@ if __name__ == '__main__': cnt = traj_relax_read[-1] cnt.calc = BrennerPotential() #when reading from trajectory the potential gets lost... why? no idea dyn = Langevin(cnt, timestep=timestep*units.fs,temperature_K=300, friction=0.1/units.fs) dyn = Langevin(cnt, timestep=timestep*units.fs,temperature_K=300, friction=0.01/units.fs) data = {'time':[],'temperature':[], 'epot':[],'ekin':[], 'etot': []} cnt_array_original = cnt.cell[:] run_simulation(loop_number, step_number, timestep, eps, start_deform) with open(f'{data_directory}data.json', 'r') as fp: data = json.load(fp) df = pd.DataFrame.from_dict(data) df.to_csv(f'{data_directory}cnt_npt_data.csv') print(f'Saving data to {data_directory}cnt_npt_data.csv') df.to_csv(f'{data_directory}cnt_nvt_data.csv') print(f'Saving data to {data_directory}cnt_nvt_data.csv') print('done') Loading