From 39d1d56e808c0581a93cd0cf2a54535454a67a01 Mon Sep 17 00:00:00 2001 From: martinachondo Date: Wed, 2 Oct 2024 10:36:42 -0300 Subject: [PATCH 1/2] paper results --- papers/PINN_PB_paper/main.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/papers/PINN_PB_paper/main.py b/papers/PINN_PB_paper/main.py index 1967837..6ed6680 100644 --- a/papers/PINN_PB_paper/main.py +++ b/papers/PINN_PB_paper/main.py @@ -4,10 +4,14 @@ from xppbe import Simulation yaml_path = 'path_to_input_file.yaml' # example 'input_files/BI/BI_WA_TF_FF_SI_SO.yaml' +yaml_path = 'input_files/BI/BI_WA_TF_FF_SI_SO.yaml' + molecule_dir = None # Use default molecule directory if None, calling xppbe/Molecules/ +results_path = f'results/{yaml_path.split("/")[-1].replace(".yaml","")}' # example to use the name of the .yaml file + # Creation of the simulation object -simulation = Simulation(yaml_path, molecule_dir) +simulation = Simulation(yaml_path, molecule_dir, results_path) # Setup the PINN model and parameters from the YAML configuration simulation.create_simulation() @@ -30,15 +34,25 @@ post.plot_G_solv_history(); # Different plots of the reaction field -post.plot_phi_line(value='react'); +import numpy as np +post.plot_phi_line(value='react', theta=0, phi=np.pi/2); post.plot_phi_contour(value='react'); +post.plot_interface_3D(value='react', ext='png'); post.plot_interface_3D(value='react', ext='html'); # Save relevant information post.save_values_file() post.save_model_summary(); - +# To compare to a known method, use known_method as 'analytic_Born_Ion', 'Spherical_Harmonics', 'PBJ', 'APBS' +known_method = 'analytic_Born_Ion' +post.values_for_paper(err_method=known_method) +post.plot_G_solv_history(known_method); +post.plot_phi_line_aprox_known(known_method, value='react',theta=0, phi=np.pi/2) +post.plot_phi_line_aprox_known(known_method, value='react',theta=np.pi/2, phi=np.pi/2) +post.plot_phi_line_aprox_known(known_method, value='react', theta=np.pi/2, phi=np.pi) +post.plot_interface_error(known_method, type_e='absolute', scale='log', ext='png') +post.plot_interface_error(known_method, type_e='absolute', scale='linear', ext='png') From f826c8574813a10f39f305d27bdba67432a3063e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Achondo=20Mercado?= Date: Wed, 2 Oct 2024 16:06:30 -0300 Subject: [PATCH 2/2] Update main.py --- papers/PINN_PB_paper/main.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/papers/PINN_PB_paper/main.py b/papers/PINN_PB_paper/main.py index 6ed6680..1a33ad1 100644 --- a/papers/PINN_PB_paper/main.py +++ b/papers/PINN_PB_paper/main.py @@ -52,7 +52,3 @@ post.plot_phi_line_aprox_known(known_method, value='react',theta=np.pi/2, phi=np.pi/2) post.plot_phi_line_aprox_known(known_method, value='react', theta=np.pi/2, phi=np.pi) post.plot_interface_error(known_method, type_e='absolute', scale='log', ext='png') -post.plot_interface_error(known_method, type_e='absolute', scale='linear', ext='png') - - -