@@ -0,0 +1,749 @@
+__author__ = 'zhideng'%0A%0Afrom monty.os import cd%0Aimport glob%0Aimport json%0A%0Adef get_cpu_time(h2_output_file=%22H2.nwout%22,%0A                 n2_output_file=%22N2.nwout%22,%0A                 nh3_output_file=%22H3N1.nwout%22):%0A    output_files = %5Bh2_output_file,n2_output_file,%0A                    nh3_output_file%5D%0A    cpu_time = 0%0A    for output in output_files:%0A        f = open(output,'r')%0A        lastline = f.readlines()%5B-1%5D.split()%0A        cpu_time += float(lastline%5B3%5D%5B:-1%5D)%0A    return cpu_time%0A%0Aif __name__ == %22__main__%22:%0A    with cd(%22Q5%22):%0A        for dir_name in sorted(glob.glob(%22*%22)):%0A            with cd(dir_name):%0A                cpu_time = get_cpu_time()%0A                with open(%22cpu_time.json%22,'w') as jf:%0A                    json.dump(cpu_time,jf)%0A

add cpu_time calculator