Adding Custom Spin Labels

[1]:
import numpy as np
import chilife as xl
C:\Program Files\Python310\lib\site-packages\tqdm\auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
C:\Program Files\Python310\lib\site-packages\memoization\memoization.py:112: SyntaxWarning: Expected custom_key_maker to have the same signature as the function being cached. Call memoization.suppress_warnings() before using @cached to remove this message.
  warnings.warn('Expected custom_key_maker to have the same signature as the function being cached. '
[2]:
weights = np.loadtxt('R3A/weights.txt')
xl.create_library('R3A', 'R3A/R3A_Ensemble.pdb', site=2,
                  dihedral_atoms=[['N', 'CA', 'CB', 'SG'],
                                  ['CA', 'CB', 'SG', 'CD'],
                                  ['CB', 'SG', 'CD', 'C3'],
                                  ['SG', 'CD', 'C3', 'C4']],
                  spin_atoms=['N1', 'O1'],
                  weights=weights)

weights = np.loadtxt('NBA/weights.txt')
xl.create_library('NBA', 'NBA/NBA_Ensemble.pdb',
                  site=2,
                  dihedral_atoms=[['N', 'CA', 'C01', 'C07'],
                                  ['CA', 'C01', 'C07', 'C08'],
                                  ['C03', 'C04', 'C09', 'C13'],
                                  ['C10', 'C11', 'N01', 'C14'],
                                  ['N01', 'C14', 'C15', 'C16']],
                  spin_atoms={'N02': 0.5, 'O01': 0.5},
                  weights=weights)

weights = np.loadtxt('GD3/weights.txt')
xl.create_library('GD3', 'GD3/GD3_Ensemble.pdb',
                  dihedral_atoms=[['N', 'CA', 'CB', 'SG'],
                                  ['CA', 'CB', 'SG', 'C18'],
                                  ['CB', 'SG', 'C18', 'C19'],
                                  ['C17', 'C16', 'C9', 'N1'],
                                  ['C16', 'C9', 'N1', 'C8']],
                  spin_atoms='Gd1',
                  weights=weights)




T4L = xl.fetch('2lzm')
T109R3A = xl.SpinLabel('R3A', 109, T4L, rotlib='R3A_rotlib.npz')
T109NBA = xl.SpinLabel('NBA', 109, T4L, rotlib='NBA')
T109GD3 = xl.SpinLabel('GD3', 109, T4L, sample=5000)

xl.save(T109R3A, T109NBA, T109GD3, T4L)

WARNING:py.warnings:C:\Users\mhtes\AppData\Roaming\Python\Python310\site-packages\MDAnalysis\core\universe.py:645: UserWarning: Reader has no dt information, set to 1.0 ps
  dt=self.trajectory.ts.dt * step,

labels