<jupyter_start><jupyter_text>Table of Contents<jupyter_code>pwd
import numpy as np
%matplotlib inline
import sys
sys.path.append("../")
from optimize_dhamed import *<jupyter_output><empty_output><jupyter_text>this should form as the basis of a test.<jupyter_code>c_l = [np.genfromtxt("count_matrix_1.txt")]
v_ar = np.genfromtxt("wfile.txt")[:,1].reshape((9,1))
og = run_dhamed(c_l, -np.log(v_ar), g_init=-(np.zeros(9))*-1.0, numerical_gradients=False,  maxiter=10000)
ref_f = np.genfromtxt("us_dt-e4_2_p1.out")
py_rna = og*-1 - (og[-1]*-1)
f_rna = ref_f[:,-1] - ref_f[-1,-1]
fig, ax = plt.subplots(figsize=(5,3))
plt.plot(py_rna, "o")
plt.plot(f_rna)
ax.set_xlabel("Reaction coordinate")
ax.set_ylabel("PMF ($\mathrm{k_BT}$)")

ax.legend()
fig.tight_layout()
np.testing.assert_almost_equal(f_rna, py_rna)
f_rna - py_rna<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18492343934040048, 'fraction_numerical': 0.027090694935217905, 'mean_word_length': 6.87037037037037, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '666434', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 395, 'n_tokens_neox': 383, 'n_words': 57, 'path': 'pydhamed/tests/test_rna/RNA_test.ipynb', 'repo_name': 'bio-phys/pyDHAMed', 'size': '849'}