<jupyter_start><jupyter_text>Center<jupyter_code>molecular_system = msm.demo['pentalanine']['traj.h5']
molecular_system = msm.convert(molecular_system, to_form='molsysmt.MolSys')
n_frames = msm.get(molecular_system, n_frames=True)
origin = np.zeros([n_frames, 1, 3])*msm.puw.unit('nanometers')
geometric_center = msm.structure.get_geometric_center(molecular_system)
plt.plot(geometric_center[:,0,0])
plt.plot(geometric_center[:,0,1])
plt.plot(geometric_center[:,0,2])
plt.show()
distance_before = msm.structure.get_distances(molecular_system, group_behavior='geometric_center', molecular_system_2=origin)
molecular_system = msm.structure.center(molecular_system)
distance_after = msm.structure.get_distances(molecular_system, group_behavior='geometric_center', molecular_system_2=origin)
plt.plot(distance_before[:,0,0], label='Before centering')
plt.plot(distance_after[:,0,0], label='After centering')
plt.legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14629049111807732, 'fraction_numerical': 0.01567398119122257, 'mean_word_length': 13.088235294117647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '68167', 'license': 'MIT', 'n_tokens_mistral': 361, 'n_tokens_neox': 333, 'n_words': 36, 'path': 'docs/contents/structure/center.ipynb', 'repo_name': 'dprada/molsysmt', 'size': '957'}