Advertisement
shihab2196

Compare_Densities_Old_and_New_Simulations_Specific_A0002

Oct 22nd, 2024
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.48 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Author: Shihab Ahmed
  4. Created on Tue Oct 22 01:46:52 2024
  5. """
  6.  
  7.  
  8. import magnolia.log_parser_FHB as lfp
  9. import matplotlib.pyplot as plt
  10. import pandas as pd
  11.  
  12. # mplt.custom_plot_features(minorticks=True)
  13. plt.style.use('default')
  14. plt.rcParams['font.size']=15
  15.  
  16. fig, ax = plt.subplots(dpi=350)
  17.  
  18. #---NPT1:600K,2atm(100ps)
  19. dirr=r"C:\Users\arup2\OneDrive - University of California Merced\Desktop\LAMMPS\borgstore\ARLOI\ARLOI-V1\7_A0001-5_eq_NPT-NPT-NVT_Pro_2ramp\A0002\Equilibration"
  20. logfile = dirr+r'\log.lammps'
  21. thermo1 = lfp.thermo_panda(logfile, serial=2, timestep=0.25, zero_ref='time')
  22. #---NPT2:600->300K,2->1atm(50ps)---NPT3:300K,1atm(100ps)
  23. dirr=r"C:\Users\arup2\OneDrive - University of California Merced\Desktop\LAMMPS\borgstore\ARLOI\ARLOI-V1\8_ARLOI_Down_to_300K\A0002\Equilibration\Sim-1"
  24. logfile = dirr+r'\log.lammps'
  25. thermo2 = lfp.thermo_panda(logfile, serial=[1,2], timestep=0.25)
  26.  
  27. thermo=pd.concat([thermo1, thermo2], axis='rows')
  28. ax.plot(thermo['Time'],thermo['Density'], label='Eq$_{new}$')
  29.  
  30. #---NPT:300K,1atm(400ps)
  31. dirr=r"C:\Users\arup2\OneDrive - University of California Merced\Desktop\LAMMPS\borgstore\ARLOI\ARLOI-V1\4_ARLOI_24-09-07--22-34-03\20_PAO-OH_15_A0001\Equilibrate\Sim-1"
  32. logfile = dirr+r'\log.lammps'
  33. thermo = lfp.thermo_panda(logfile, serial=3, timestep=0.25, zero_ref='time')
  34. ax.plot(thermo['Time'],thermo['Density'], label='Eq$_{old}$')
  35.  
  36. ax.set_xlabel('Time (ps)')
  37. ax.set_ylabel('Density (g/cm$^3$)')
  38. plt.legend()
  39. plt.grid()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement