def run_model_params(params): run_model({ "obj_function": params["obj_function"], "search_parameters": { "pop_max_size": 1, "k_to_replace": 1, }, "action_space_parameters": { "atoms": params["atoms"] }, "io_parameters": { "model_path": join(output_results_prefix_path, params["name"]), "save_n_steps": 1, } })
"count_N"), {"type": "linear_combination", "functions": [(count_nitrogen, "count_N"), "qed", "clscore"], "coef": [0.5, 0.5, 0]}, {"type": "product_sigm_lin", "functions": ["h**o", "clscore"], "a": [-1, -1], "b": [-7, 1.5], "lambda": [1, 10]}, ] for i, eval_fun in enumerate(eval_functions): run_model({ "obj_function": eval_fun, "optimization_parameters": { "pop_max_size": 10, "k_to_replace": 2, "max_steps": 10 if eval_fun == "h**o" or eval_fun == "lumo" or isinstance(eval_fun, dict) else 50, "problem_type": "min" if eval_fun == "sascore" or eval_fun == "lumo" else "max" }, "action_space_parameters": { "atoms": "C,N,O,F" if eval_fun == "h**o" or eval_fun == "lumo" or isinstance(eval_fun, dict) else "C,N,O,F,P,S,Cl,Br" }, "io_parameters": { "model_path": '1_test_evaluation_functions/' + str(i) + "_" + str(eval_fun), "dft_working_dir": "/home/jleguy/dft_comput/", "dft_cache_files": ["/home/jleguy/Documents/these/prod/data/00_datasets/DFT/cache_OPT.json"] } })
from evomol import run_model run_model({ "obj_function": "entropy_shg_1", "optimization_parameters": { "max_steps": 100, "pop_max_size": 1000 }, "io_parameters": { "model_path": "4_entropy/" }, })
from evomol import run_model run_model({ "obj_function": "guacamol", "optimization_parameters": { "max_steps": 100, "pop_max_size": 1000, "guacamol_init_top_100": False }, "io_parameters": { "model_path": "2_guacamol/" }, })
# "record_history": True # } # }) # # exploration_graph(model_path=model_path, layout="neato") # # Plotting small exploration tree with images and actions model_path = "3_plot_exploration_tree_images/" run_model({ "obj_function": "qed", "optimization_parameters": { "max_steps": 10, "pop_max_size": 10, "k_to_replace": 2, "mutable_init_pop": False }, "io_parameters": { "model_path": model_path, "record_history": True, "smiles_list_init_path": "acetylsalicylic_acid.smi" } }) exploration_graph(model_path=model_path, layout="dot", draw_actions=True, plot_images=True, draw_scores=True, root_node="O=C(C)Oc1ccccc1C(=O)O", legend_scores_keys_strat=["total"], mol_size=0.3, legend_offset=(-0.007, -0.05), figsize=(20, 20/1.5), legends_font_size=13)