示例#1
0
def evaluate_pathway_AT_with_SP(src_dir,
                                data_dir,
                                top_n=5,
                                flag="",
                                n_traj=10000,
                                atom_followed="C",
                                traj_max_t=100.0,
                                tau=10.0,
                                begin_t=0.0,
                                end_t=1.0,
                                top_n_s=10,
                                spe_oriented=True,
                                end_s_idx=None,
                                species_path=False):
    """
    evaluate pathway probability
    top_n_s is top N species number
    num_t is number of time points
    """
    os.chdir(src_dir)

    if spe_oriented is True:
        if end_s_idx is None or end_s_idx is []:
            end_s_idx, _, _ = trajectory.get_species_with_top_n_concentration(
                data_dir,
                exclude=None,
                top_n=top_n_s,
                traj_max_t=traj_max_t,
                tau=tau,
                end_t=end_t,
                tag="M",
                atoms=[atom_followed])
        n_path = ppnt.prepare_pathway_name(data_dir,
                                           top_n=top_n,
                                           flag=flag,
                                           end_s_idx=end_s_idx,
                                           species_path=species_path)

        us.update_eval_path_AT_with_SP(data_dir,
                                       top_n=n_path,
                                       n_traj=n_traj,
                                       tau=tau,
                                       begin_t=begin_t,
                                       end_t=end_t)
    else:
        n_path = ppnt.prepare_pathway_name(data_dir,
                                           top_n=top_n,
                                           flag=flag,
                                           end_s_idx=None,
                                           species_path=species_path)
        us.update_eval_path_AT_with_SP(data_dir,
                                       top_n=n_path,
                                       n_traj=n_traj,
                                       tau=tau,
                                       begin_t=begin_t,
                                       end_t=end_t)

    make_run(src_dir, data_dir)
示例#2
0
def evaluate_pathway_probability(src_dir,
                                 data_dir,
                                 top_n=5,
                                 num_t=1,
                                 flag="",
                                 n_traj=10000,
                                 atom_followed="C",
                                 init_spe=114,
                                 traj_max_t=100.0,
                                 tau=10.0,
                                 begin_t=0.0,
                                 end_t=1.0,
                                 top_n_s=10,
                                 spe_oriented=True,
                                 end_s_idx=None,
                                 species_path=False,
                                 path_reg=None,
                                 no_path_reg=None,
                                 spe_idx=None,
                                 spe_production_oriented=False,
                                 fixed_t0_or_tf=None,
                                 same_path_list=False):
    """
    evaluate pathway probability
    top_n_s is top N species number
    num_t is number of time points
    """
    os.chdir(src_dir)

    if spe_oriented is True:
        if end_s_idx is None or end_s_idx is []:
            end_s_idx, _, _ = trajectory.get_species_with_top_n_concentration(
                data_dir,
                exclude=None,
                top_n=top_n_s,
                traj_max_t=traj_max_t,
                tau=tau,
                end_t=end_t,
                tag="M",
                atoms=[atom_followed])

        n_path = ppnt.prepare_pathway_name(
            data_dir,
            top_n=top_n,
            flag=flag,
            end_s_idx=end_s_idx,
            species_path=species_path,
            path_reg=path_reg,
            no_path_reg=no_path_reg,
            spe_idx=spe_idx,
            spe_production_oriented=spe_production_oriented,
            same_path_list=same_path_list)

        ppnt.prepare_pathway_time(data_dir,
                                  top_n=n_path,
                                  num=num_t,
                                  flag=flag,
                                  begin_t=begin_t,
                                  end_t=end_t,
                                  species_path=species_path,
                                  fixed_t0_or_tf=fixed_t0_or_tf)

        us.update_eval_path_integral(data_dir,
                                     top_n=n_path,
                                     n_traj=n_traj,
                                     atom_followed=atom_followed,
                                     init_spe=init_spe,
                                     tau=tau,
                                     begin_t=begin_t,
                                     end_t=end_t,
                                     species_path=species_path)

    else:
        n_path = ppnt.prepare_pathway_name(
            data_dir,
            top_n=top_n,
            flag=flag,
            end_s_idx=end_s_idx,
            species_path=species_path,
            path_reg=path_reg,
            no_path_reg=no_path_reg,
            spe_idx=spe_idx,
            spe_production_oriented=spe_production_oriented,
            same_path_list=same_path_list)
        ppnt.prepare_pathway_time(data_dir,
                                  top_n=n_path,
                                  num=num_t,
                                  flag=flag,
                                  begin_t=begin_t,
                                  end_t=end_t,
                                  species_path=species_path,
                                  fixed_t0_or_tf=fixed_t0_or_tf)

        us.update_eval_path_integral(data_dir,
                                     top_n=n_path,
                                     n_traj=n_traj,
                                     atom_followed=atom_followed,
                                     init_spe=init_spe,
                                     tau=tau,
                                     begin_t=begin_t,
                                     end_t=end_t,
                                     species_path=species_path)
    make_run(src_dir, data_dir)