-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread_isotopes.py
More file actions
53 lines (41 loc) · 1.64 KB
/
read_isotopes.py
File metadata and controls
53 lines (41 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from nugridpy import nugridse as mp
import numpy as np
import pandas as pd
run1=mp.se('../mppnp/z1m2/m2z1m2/H5_surf','surf.h5')
run2=mp.se('../mppnp/z2m2/m2z2m2/H5_surf','surf.h5')
run3=mp.se('../mppnp/z3m2/m2z3m2/H5_surf','surf.h5')
run4=mp.se('../mppnp/z1m2/m3z1m2/H5_surf','surf.h5')
run5=mp.se('../mppnp/z2m2/m3z2m2/H5_surf','surf.h5')
run6=mp.se('../mppnp/z3m2/m3z3m2/H5_surf','surf.h5')
run7=mp.se('../mppnp/z2m2/m3z2m2_hCBM_TDUx4p3/H5_surf','surf.h5')
run8=mp.se('../mppnp/z3m2/m3z3m2_hCBM_TDUx4p3/H5_surf','surf.h5')
label=['specie','m2z1m2','m2z2m2','m2z3m2','m3z1m2','m3z2m2','m3z3m2','m3z2m2_hCBM','m3z3m2_hCBM']
iso1 = []
ts = []
for j in run1.se.isotopes:
iso1.append(float(run1.se.get(run1.se.cycles[-1],'iso_massf',j)))
ts.append(j)
iso2 = []
for j in run2.se.isotopes:
iso2.append(float(run2.se.get(run2.se.cycles[-1],'iso_massf',j)))
iso3 = []
for j in run3.se.isotopes:
iso3.append(float(run3.se.get(run3.se.cycles[-1],'iso_massf',j)))
iso4 = []
for j in run4.se.isotopes:
iso4.append(float(run4.se.get(run4.se.cycles[-1],'iso_massf',j)))
iso5 = []
for j in run5.se.isotopes:
iso5.append(float(run5.se.get(run5.se.cycles[-1],'iso_massf',j)))
iso6 = []
for j in run6.se.isotopes:
iso6.append(float(run6.se.get(run6.se.cycles[-1],'iso_massf',j)))
iso7 = []
for j in run7.se.isotopes:
iso7.append(float(run7.se.get(run7.se.cycles[-1],'iso_massf',j)))
iso8 = []
for j in run8.se.isotopes:
iso8.append(float(run8.se.get(run8.se.cycles[-1],'iso_massf',j)))
a = [ts,iso1,iso2,iso3,iso4,iso5,iso6,iso7,iso8]
df = pd.DataFrame(a).T
df.to_csv('X_i.txt',sep='\t')