<jupyter_start><jupyter_text>Ideas- Sería muy buena idea ver el tamaño del hueco mayor en la distribución según el sampleador.- Hacer un estudio de la desviación estandard de la densidad de puntos según sampleador y número de puntos y número de bins.- Tratamiento de datos de la distancia de un punto a cualquier otro.- Tratamiento de datos de la distancia de un punto al más próximo.- Tratamiento de datos de las alpha espheras- Tratamiento de datos de las teselations de voronoy y/o Delaunay- Ver el area solapada de las esferas con un determinado radioLa idea sería determinar cual puede ser el mejor sampleador para poner las pseudo-partículas en el plano 2D.  Sampling a conformational region<jupyter_code>n_sequence = 997 # 97, 997, 9973, 99929
box_sampled = np.array([[0.0, 1.0], [0.0, 1.0]])
def show_sequence(coordinates, title):
    
    plt.title(title)
    plt.scatter(coordinates[:,0], coordinates[:,1], marker=".", alpha=0.5)
    plt.axis('square')
    plt.xlim([0.0, 1.0])
    plt.ylim([0.0, 1.0])
    
    return plt.show()<jupyter_output><empty_output><jupyter_text>Pseudo-random uniform samplingpseudo-random sequence (pseudo-random meaning “as close to randomness as we can get with a computer”)a low discrepancy sequence gives, on average, better results for stochastic sampling problems than does a truly stochastic (really pseudo-random) sampling approach.<jupyter_code>pseudo_random_generator = np.random.default_rng()
coordinates = np.zeros([n_sequence,2])
coordinates[:,0] = pseudo_random_generator.uniform(0.0, 1.0, n_sequence)
coordinates[:,1] = pseudo_random_generator.uniform(0.0, 1.0, n_sequence)

show_sequence(coordinates, 'Pseudo-random sequence')<jupyter_output><empty_output><jupyter_text>Halton's low discrepancy sequencesQuai-random number sequencepseudo-stochastic sampling methods (also called “quasi-Monte Carlo” methods).<jupyter_code>space = skopt.Space(box_sampled)
halton_generator = skopt.sampler.Halton()
coordinates = halton_generator.generate(space.dimensions, n_sequence)
coordinates = np.array(coordinates)
show_sequence(coordinates, "Halton's sequence")<jupyter_output><empty_output><jupyter_text>Sobol's low discrepancy sequences<jupyter_code>space = skopt.Space(box_sampled)
sobol_generator = skopt.sampler.Sobol()
coordinates = sobol_generator.generate(space.dimensions, n_sequence)
coordinates = np.array(coordinates)
show_sequence(coordinates, "Sobol's sequence")<jupyter_output><empty_output><jupyter_text>Grid<jupyter_code>space = skopt.Space(box_sampled)
grid_generator = skopt.sampler.Grid(use_full_layout=False)
coordinates = grid_generator.generate(space.dimensions, n_sequence)
coordinates = np.array(coordinates)
show_sequence(coordinates, "grid's sequence")<jupyter_output><empty_output><jupyter_text>Maximin optimized hypercube sampling<jupyter_code>space = skopt.Space(box_sampled)
lhs_generator = skopt.sampler.Lhs(criterion="maximin", iterations=10000)
coordinates = lhs_generator.generate(space.dimensions, n_sequence)
coordinates = np.array(coordinates)

show_sequence(coordinates, "Maximin LHS")<jupyter_output><empty_output><jupyter_text>Ratio optimized hypercube sampling<jupyter_code>space = skopt.Space(box_sampled)
lhs_generator = skopt.sampler.Lhs(criterion="ratio", iterations=10000)
coordinates = lhs_generator.generate(space.dimensions, n_sequence)
coordinates = np.array(coordinates)

show_sequence(coordinates, "ratio LHS")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10011641443538999, 'fraction_numerical': 0.017171129220023285, 'mean_word_length': 7.362530413625304, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '649750', 'license': 'MIT', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1134, 'n_words': 266, 'path': 'docs/contents/lennard_jones_fluid/Random_sampling.ipynb', 'repo_name': 'dprada/OpenMolecularSystems', 'size': '3436'}