%load_ext autoreload
%autoreload 2
import molsysmt as msm
import numpy as np
import matplotlib.pyplot as plt
Get angles#
get_angles#
molecular_system = msm.systems['pentalanine']['traj_pentalanine.h5']
molecular_system = msm.convert(molecular_system, to_form='molsysmt.MolSys')
msm.info(molecular_system, element='atom', selection=[0,1,2])
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | H1 | H | 0 | 1 | ACE | terminal capping | 0 | 0 | 0 | peptide | 0 | peptide 0 |
1 | 1 | CH3 | C | 0 | 1 | ACE | terminal capping | 0 | 0 | 0 | peptide | 0 | peptide 0 |
2 | 2 | H2 | H | 0 | 1 | ACE | terminal capping | 0 | 0 | 0 | peptide | 0 | peptide 0 |
msm.get(molecular_system, n_structures=True)
5000
angles = msm.structure.get_angles(molecular_system, [0,1,2])
angles.shape
(5000, 1)
plt.plot(angles[:,0])
plt.show()
/home/diego/Myopt/miniconda3/envs/MolSysMT@uibcdf_3.12/lib/python3.12/site-packages/matplotlib/cbook.py:1345: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
return np.asarray(x, float)
