<jupyter_start><jupyter_text>Moliere PotentialSimulation data from Figure 8 of [Vorberger et al](https://doi.org/10.1016/j.hedp.2012.12.009)The YAML input file can be found at [input_file](https://raw.githubusercontent.com/murillo-group/sarkas/master/docs/examples/Moliere/input_files/moliere_mks.yaml) and this notebook at [notebook](https://raw.githubusercontent.com/murillo-group/sarkas/master/docs/examples/Moliere/Moliere_Simulation.ipynb).<jupyter_code># Import the usual packages.
%pylab
%matplotlib inline
import os
import pandas as pd

from sarkas.processes import PreProcess, Simulation, PostProcess

# Set the plotting style
plt.style.use('MSUstyle')

# Link to the input file.
input_file = os.path.join('input_files', 'moliere_mks.yaml')<jupyter_output>Using matplotlib backend: Qt5Agg
Populating the interactive namespace from numpy and matplotlib<jupyter_text>Simulation<jupyter_code>sim = Simulation(input_file)
sim.setup(read_yaml = True)
sim.run()<jupyter_output>[38;2;83;80;84m





 __            _             
/ _\ __ _ _ __| | ____ _ ___ 
\ \ / _` | '__| |/ / _` / __|
_\ \ (_| | |  |   < (_| \__ \
\__/\__,_|_|  |_|\_\__,_|___/
                             

[0m
An open-source pure-python molecular dynamics suite for non-ideal plasmas.





* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
                                   Simulation                                   
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Job ID:  Moliere_mks
Job directory:  Simulations/Moliere_mks

Equilibration dumps directory: 
 Simulations/Moliere_mks/Simulation/Equilibration/dumps
Production dumps directory: 
 Simulations/Moliere_mks/Simulation/Production/dumps

Equilibration Thermodynamics file: 
 Simulations/Moliere_mks/Simulation/Equilibration/EquilibrationEnergy_Moliere_mks.csv
Production Thermodynamics file: 
 Simulations/Moliere_mks/Simulation/Produc[...]<jupyter_text>Post Processing<jupyter_code>postproc = PostProcess(input_file)
postproc.setup(read_yaml = True)
postproc.run()
postproc.rdf.plot(scaling= postproc.rdf.a_ws,
                 xlabel = r'$r/a_{ws}$',
                 title = 'Pair Distribution Function')
from sarkas.potentials import moliere as mol
from sarkas.potentials import coulomb as coul
r_array = postproc.parameters.box_lengths[0] * np.linspace(0.001, 1, 1000)
mol_potential = np.zeros(len(r_array))
coul_potential = np.zeros(len(r_array))

# I need to do this, because Numba compiled the function to take in a float and an array not two arrays
for (ir, r) in enumerate(r_array):
    mol_potential[ir], _ = mol.moliere_force(r, postproc.potential.matrix[:,0, 0])
    coul_potential[ir], _ = coul.coulomb_force(r, postproc.potential.matrix[:,0, 0])
pot_const = postproc.potential.matrix[0,0,0]
plt.plot(r_array/postproc.parameters.a_ws, mol_potential/pot_const, label = 'Moliere')
plt.plot(r_array/postproc.parameters.a_ws, coul_potential/pot_const, label = 'Coulomb')
plt.legend()
plt.yscale('log')
plt.ylabel(r'$U(r)$   [$Q^2/(4\pi \epsilon_0)$]')
plt.xlabel(r'$r/a_{\rm ws}$')
plt.xlim(0,10)
plt.ylim(1e5,1e11)
plt.title('Potential Plot')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14591078066914498, 'fraction_numerical': 0.01703841387856258, 'mean_word_length': 3.713868613138686, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '453420', 'license': 'MIT', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1179, 'n_words': 191, 'path': 'docs/examples/Moliere/Moliere_Simulation.ipynb', 'repo_name': 'lucianogsilvestri/sarkas', 'size': '3228'}