Advertisement
shihab2196

REACTER_reactionVStime_A0003_variable_Rmax

Dec 8th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Author: Shihab Ahmed
  4. Created on Sat Dec  7 22:11:41 2024
  5. """
  6.  
  7. import magnolia.log_parser_FHB as lfp
  8. import matplotlib.pyplot as plt
  9.  
  10. # mplt.custom_plot_features(minorticks=True)
  11. plt.style.use('default')
  12. plt.rcParams['font.size']=16
  13.  
  14.  
  15. fig, ax = plt.subplots(dpi=300)
  16. tsds={'1.39':1, '1.50':2, '1.70':3, '1.90':4, '1.80':5}
  17. sorted_tsds=sorted(tsds,reverse=True)
  18.  
  19. for tsd in sorted_tsds:
  20.     dirr = rf"C:\Users\arup2\OneDrive - University of California Merced\Desktop\LAMMPS\borgstore\REACTER\PAOr+Antioixdants\set001\A0003\Reaction\Sim-{tsds[tsd]}_TSD={tsd}"
  21.     filename = r'\log.lammps'
  22.     logfile = dirr+filename
  23.     thermo = lfp.thermo_panda(logfile, serial='all', zero_ref='energy+time')
  24.     prop_1 = 'Time'
  25.     prop_2 = 'v_rxn1'
  26.     x, y = thermo[prop_1]/1000, thermo[prop_2]
  27.     start = 0
  28.     end   = 100000
  29.     x, y = x.iloc[start:end], y.iloc[start:end]
  30.    
  31.     ax.plot(x,y, label=tsd)
  32.    
  33. ax.set_xlabel('Time (ns)')
  34. ax.set_ylabel('Number of reactions')
  35. ax.legend(ncol=2, fontsize=13, loc='upper left',title='R$_{max}$')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement