pylimer-tools Output Reader

Read output from pylimer-tools’ own simulators.

Relevant documentation: read_avg_file()

plot pylimer tools output reader
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/pylimer_tools/io/read_pylimer_tools_output_file.py:50: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing `errors` and catch exceptions explicitly instead
  result = df.apply(pd.to_numeric, errors="ignore")
Simulation steps: 100

import os

import matplotlib.pyplot as plt

from pylimer_tools.io.read_pylimer_tools_output_file import read_avg_file

example_file = os.path.join(
    os.getcwd(),
    "..",
    "dpd_simulations/dpd_simulation_avg_output.txt",
)

# Read pylimer-tools averages file
pylimer_data = read_avg_file(example_file)

# Data is automatically grouped by OutputStep
print(f"Simulation steps: {pylimer_data['Step'].nunique()}")

# Access specific measurements
plt.plot(pylimer_data["Step"], pylimer_data["Temperature"])
plt.xlabel("Output Step")
plt.ylabel("Temperature")
plt.show()

Total running time of the script: (0 minutes 0.052 seconds)

Gallery generated by Sphinx-Gallery