Beispiel #1
0
def main():
    args = sys.argv[1:]
    argc_ok = 0
    argc = len(args)
    if (argc != argc_ok):
        print('usage: ./cycle.py')
        sys.exit(1)

    n = [0.01, 0.02, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]
    T = [
        0.01, 0.02, 0.04, 0.065, 0.1, 0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2,
        1.4, 1.6, 2, 3.2, 6.4, 12.8, 25.6
    ]

    n = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]
    T = [0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2]

    n = [0.2, 0.3]
    T = [1, 2]

    n = [0.02, 0.05, 0.1, 0.2, 0.25, 0.3, 0.4, 0.5]
    T = [0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.5, 1.75, 2, 2.5, 3, 4]

    #base_path = os.path.join('/home', 'ypolyach', '\\!molecules', 'RES', 'DATA')
    base_path = os.path.join('~', '\\!molecules', 'RES', 'DATA')
    for ni in n:
        for Ti in T:
            new_name = 'N2048/n' + str(my.str_sgn_round(ni, 5)) + '_Tmp' + str(
                my.str_sgn_round(Ti, 5))

            main_path = os.path.join(base_path, new_name)
            if (not my.run_it('mkdir --parents ' +
                              os.path.join(main_path, 'graph'))):
                return
            if (not my.run_it('cp -av ' +
                              os.path.join('.', new_name, '*.dat') + ' ' +
                              main_path)):
                return
            if (not my.run_it('cp -av ' +
                              os.path.join('.', new_name, '*.log') + ' ' +
                              main_path)):
                return
            if (not my.run_it('cp -av ' +
                              os.path.join('.', new_name, '*.txt') + ' ' +
                              main_path)):
                return
            if (not my.run_it('cp -av ' +
                              os.path.join('.', new_name, 'graph/*') + ' ' +
                              os.path.join(main_path, 'graph'))):
                return
Beispiel #2
0
def main():
    args = sys.argv[1:]
    argc_min = 0
    argc = len(args)
    if(argc < argc_min):
        print('usage: ./cycle.py')
        sys.exit(1)
            
    n = [0.01, 0.02, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]
    T = [0.01, 0.02, 0.04, 0.065, 0.1, 0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.4, 1.6, 2, 3.2, 6.4, 12.8, 25.6]
    
    n = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]
    T = [0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2]    
    
    n = [0.2, 0.3]
    T = [1, 2]
    
    n = [0.01, 0.02, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]
    T = [0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.4, 1.6, 2, 3.2]
    
    n = [0.02, 0.05, 0.1, 0.2, 0.25, 0.3, 0.4, 0.5]
    #T = [0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.5, 1.75, 2, 2.5, 3, 4]       
    T = [0.2, 0.4, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.5, 1.75, 2]
    
    for ni in n:
        for Ti in T:
            new_name = 'N2048/n' + my.str_sgn_round(ni, 3) + '_Tmp' + my.str_sgn_round(Ti, 3)
            
            #os.system('./E.py ' + new_name + ' -')
            
            if(not my.run_it('./diffusion.py ' + new_name + ' -pics-percent')):
                return
def main():
    args = sys.argv[1:]
    argc_min = 1
    if len(args) < argc_min:
        print(
            'usage: ./full_proc.py      model_name     [keys,    N0,     N1, ...]'
        )
        sys.exit(1)

    model_name, keys, graph_dir, time_gaps_str, N0, N1, Nfrm, E, Tmp, Tmp_av, t, stabTind, params = my.std_start(
        args, 0, 1, 2, 3)
    # std_start(args, model_i, N0_i, N1_i):
    # model_name, keys, graph_dir, time_gaps_str, N0, N1, Nfrm, E, Tmp, Tmp_av, t, stabTind, params

    extra_args_str = ''
    for i in range(1, len(args)):
        extra_args_str += (args[i] + ' ')

    if (my.find_key(keys, 'energy')):
        my.run_it('./E.py ' + model_name + ' ' + extra_args_str)

    if (my.find_key(keys, 'maxwell')):
        if (extra_args_str):
            command_to_run = './maxwell.py ' + model_name + ' 100 ' + extra_args_str
        else:
            command_to_run = './maxwell.py ' + model_name + ' 100 ' + str(
                stabTind)
        my.run_it(command_to_run)

    if (my.find_key(keys, 'diff') or my.find_key(keys, 'diffusion')):
        my.run_it('./diffusion.py ' + model_name + ' ' + extra_args_str)

    if (my.find_key(keys, 'cond') or my.find_key(keys, 'condition')):
        if (extra_args_str):
            command_to_run = './condition.py ' + model_name + ' ' + extra_args_str
        else:
            command_to_run = './condition.py ' + model_name + ' ' + str(
                stabTind)
        my.run_it(command_to_run)