forked from Steelangel/CarBoNpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommand_line_parser.py
41 lines (29 loc) · 1.26 KB
/
command_line_parser.py
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
import argparse
import CarBoN_Input_Processor as carbon
import pandas as pd
###############################################################################
# Parser setup
###############################################################################
parser = argparse.ArgumentParser()
parser.add_argument("reac", help="path to KIDA reactions file",
type=str)
parser.add_argument("spec", help="path to KIDA species file",
type=str)
args = parser.parse_args()
###############################################################################
# Parser Execution with KIDA class Network tool
###############################################################################
reac = args.reac
spec = args.spec
kida_file = carbon.Kida(r"" + reac, r"" + spec)
kida_file.read_species()
kida_file.read_reactions()
reactions = kida_file.reactions_dataframe()
species = kida_file.species_dataframe()
dictionary = kida_file.species_dictionary()
print(reactions)
###############################################################################
# These are the paths used
###############################################################################
# data/kida_reac_C_O_only.dat
# data/kida_spec_C_O_only.dat