<jupyter_start><jupyter_text>Tutorial 1 - Reading dataThe HISTORY, ARCHIVE and CONFIG classes expects two things, the filename of the history file and a list of atoms to read. They will return a `polypy.read.Trajectory` object, which stores the the atom labels (`Trajectory.atom_list`), datatype (`Trajectory.datatype`), cartesian coordinates (`Trajectory.cartesian_coordinates`), fractiona coordinates (`Trajectory.fractional_coordinates`), reciprocal lattice vectors (`Trajectory.reciprocal_lv`), lattice vectors (`Trajectory.lv`) cell lengths (`Trajectory.cell_lengths`), total atoms in the file (`Trajectory.atoms_in_history`), timesteps (`Trajectory.timesteps`), total atoms per timestep (`Trajectory.total_atoms`).  HISTORY Files<jupyter_code>from polypy import read as rd
history = rd.History("../example_data/HISTORY_CaF2", ["CA", "F"])
print(history.trajectory.fractional_trajectory)
print(history.trajectory.timesteps)
print(history.trajectory.atoms_in_history)
print(history.trajectory.total_atoms)<jupyter_output>1500<jupyter_text>It is often necessary to remove the equilibriation timesteps from the simulation. This can be accomlished with the remove_initial_timesteps method to remove timesteps at the start of the simulation and the remove_final_timesteps, to remove timesteps at the end of the simulation.<jupyter_code>new_history = history.trajectory.remove_initial_timesteps(10)
print(new_history.timesteps)
new_history = new_history.remove_final_timesteps(10)
print(new_history.timesteps)<jupyter_output>480<jupyter_text>It is possible to return the trajectory for a single timestep within the history file or to return the trajectory for a single atom.<jupyter_code>config_ca = history.trajectory.get_atom("CA")

print(config_ca.fractional_trajectory)
config_1 = history.trajectory.get_config(1)

print(config_1.fractional_trajectory)<jupyter_output>[[0.53227339 0.51016082 0.50950292]
 [0.52116228 0.62894737 0.61761696]
 [0.62240497 0.50526316 0.6056652 ]
 ...
 [0.39444444 0.44974415 0.45102339]
 [0.45599415 0.37865497 0.39890351]
 [0.36343202 0.49309211 0.3690424 ]]<jupyter_text>CONFIG Files<jupyter_code>config = rd.Config("../example_data/CONFIG", ["CA", "F"])
print(config.trajectory.fractional_trajectory)<jupyter_output>[[0.51666667 0.51666667 0.51666667]
 [0.51666667 0.61666667 0.61666667]
 [0.61666667 0.51666667 0.61666667]
 ...
 [0.36666667 0.46666667 0.46666667]
 [0.46666667 0.36666667 0.36666667]
 [0.36666667 0.46666667 0.36666667]]<jupyter_text>DLMONTE<jupyter_code>archive = rd.Archive("../example_data/ARCHIVE_Short", ["AL"])
print(archive.trajectory.timesteps)<jupyter_output>1000
{'fraction_non_alphanumeric': 0.10742857142857143, 'fraction_numerical': 0.13028571428571428, 'mean_word_length': 7.104938271604938, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '648992', 'license': 'MIT', 'n_tokens_mistral': 1168, 'n_tokens_neox': 928, 'n_words': 200, 'path': 'examples/notebooks/.ipynb_checkpoints/Tutorial_1_Reading_Data-checkpoint.ipynb', 'repo_name': 'symmy596/Polypy', 'size': '2625'}