Get dihedral quartets#

Getting the quartets of atoms defining dihedral angles in a molecular system.

The function molsysmt.topology.get_dihedral_quartets() identifies atom quartets defining standard backbone (\(\\phi, \\psi, \\omega\)) or sidechain (\(\\chi_1, \\chi_2, \\chi_3, \\chi_4, \\chi_5\)) dihedral angles.

Added in version 1.0.0.

Basic usage#

Let’s show how to extract backbone and sidechain dihedral quartets using TcTIM (PDB ID: 1TCD):

import molsysmt as msm
molsys = msm.convert(msm.systems['TcTIM']['1tcd.h5msm'])

We extract quartets for all \(\\phi\) backbone angles across the system using molsysmt.topology.get_dihedral_quartets():

phi_quartets = msm.topology.get_dihedral_quartets(molsys, phi=True)
print('Total phi quartets found:', len(phi_quartets))
print('First 5 phi quartets:', phi_quartets[:5])
Total phi quartets found: 495
First 5 phi quartets: [[2, 9, 10, 11], [11, 16, 17, 18], [18, 25, 26, 27], [27, 32, 33, 34], [34, 40, 41, 42]]

We can restrict the search to specific residue selections (e.g. residues 10 to 15):

phi_subset = msm.topology.get_dihedral_quartets(molsys, selection='group_index in [10, 11, 12, 13, 14, 15]', phi=True)
print('Residues 10-15 phi quartets:', phi_subset)
Residues 10-15 phi quartets: [[79, 86, 87, 88], [88, 92, 93, 94], [94, 100, 101, 102], [102, 104, 105, 106], [106, 110, 111, 112]]

Sidechain dihedral angles (such as \(\\chi_5\)) can also be queried:

chi5_quartets = msm.topology.get_dihedral_quartets(molsys, chi5=True)
print('Total chi5 quartets found:', len(chi5_quartets))
print('First 3 chi5 quartets:', chi5_quartets[:3])
Total chi5 quartets found: 26
First 3 chi5 quartets: [[391, 392, 393, 394], [516, 517, 518, 519], [731, 732, 733, 734]]

Multiple dihedral angles can be queried simultaneously:

phi_q, psi_q, omega_q, chi1_q = msm.topology.get_dihedral_quartets(molsys, selection='group_index==10', phi=True, psi=True, omega=True, chi1=True)
print('phi:', phi_q)
print('psi:', psi_q)
print('omega:', omega_q)
print('chi1:', chi1_q)
phi: []
psi: []
omega: []
chi1: [[77, 78, 81, 82]]

Summary of dihedral angle definitions#

The tables below summarize the standard atom quartet definitions used by MolSysMT:

Angle

Atoms Definition

Standard Range

\(\\phi\)

\(C_{i-1} - N_i - C\\alpha_i - C_i\)

\([-180^\\circ, 180^\\circ]\)

\(\\psi\)

\(N_i - C\\alpha_i - C_i - N_{i+1}\)

\([-180^\\circ, 180^\\circ]\)

\(\\omega\)

\(C\\alpha_i - C_i - N_{i+1} - C\\alpha_{i+1}\)

\([-180^\\circ, 180^\\circ]\)

\(\\chi_1\)

\(N_i - C\\alpha_i - C\\beta_i - C\\gamma_i\)

\([-180^\\circ, 180^\\circ]\)

Extracting atom blocks attached to dihedral quartets#

Using with_blocks=True, molsysmt.topology.get_dihedral_quartets() returns both the dihedral quartet and the two sets of atoms that move rigidly as blocks around the rotatable bond:

molsys_peptide = msm.convert(msm.systems['Met-enkephalin']['met_enkephalin.h5msm'])
phi_chains, phi_blocks = msm.topology.get_dihedral_quartets(molsys_peptide, with_blocks=True, phi=True)
print('Quartet 1 atom indices:', phi_chains[1])
print(f'Block 0 contains {len(phi_blocks[1][0])} atoms.')
print(f'Block 1 contains {len(phi_blocks[1][1])} atoms.')
Quartet 1 atom indices: [26, 28, 30, 33]
Block 0 contains 30 atoms.
Block 1 contains 42 atoms.

We can visualize the peptide with MolSysViewer:

msm.view(molsys_peptide)