Advertisement
shihab2196

REACTER_reactionVStime_A0001_variable_Rmax

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