pytraj.analysis.dssp_analysis.
dssp
(traj=None, mask='', frame_indices=None, dtype='ndarray', simplified=False, top=None)¶return dssp profile for frame/traj
Parameters: | traj : Trajectory-like mask: str
frame_indices : {None, array-like}, default None, optional
dtype : str, default ‘ndarray’
simplified : bool, default False
|
---|---|
Returns: | out_0: ndarray, shape=(n_residues,)
out_1: ndarray, shape=(n_frames, n_residues)
out_2 : pytraj.DatasetList
|
Notes
Character | Integer | DSSP_Char | Secondary structure type |
---|---|---|---|
0 | 0 | ‘0’ | None |
b | 1 | ‘E’ | Parallel Beta-sheet |
B | 2 | ‘B’ | Anti-parallel Beta-sheet |
G | 3 | ‘G’ | 3-10 helix |
H | 4 | ‘H’ | Alpha helix |
I | 5 | ‘I’ | Pi (3-14) helix |
T | 6 | ‘T’ | Turn |
S | 7 | ‘S’ | Bend |
Simplified codes:
- 'H': include 'H', 'G', 'I' (helix)
- 'E': include 'E', 'B' (strand)
- 'C': include 'T', 'S' or '0' (coil)
Simplified codes will be mostly used for visualization in other packages.
Examples
>>> import pytraj as pt
>>> traj = pt.load_pdb_rcsb('1l2y')
>>> residues, ss, _ = pt.dssp(traj, ":2-10")
>>> residues
array(['LEU:2', 'TYR:3', 'ILE:4', 'GLN:5', 'TRP:6', 'LEU:7', 'LYS:8',
'ASP:9', 'GLY:10'],
dtype='<U6')
>>> ss
array([['0', 'H', 'H', ..., 'H', 'T', '0'],
['0', 'H', 'H', ..., 'H', 'T', '0'],
['0', 'H', 'H', ..., 'H', 'T', '0'],
...,
['0', 'H', 'H', ..., 'H', 'T', '0'],
['0', 'H', 'H', ..., 'H', 'H', '0'],
['0', 'H', 'H', ..., 'H', 'T', '0']],
dtype='<U1')
>>> residues, ss, _ = pt.dssp(traj, mask=range(100))
>>> traj = pt.fetch_pdb('1l2y')
>>> residues, ss, _ = pt.dssp(traj, simplified=True)
>>> ss[0].tolist() # first frame
['C', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'C', 'C', 'H', 'H', 'H', 'H', 'C', 'C', 'C', 'C', 'C', 'C']
pytraj.analysis.dssp_analysis.
dssp_allatoms
(traj, *args, **kwd)¶calculate dssp for all atoms
Returns: | ndarray, shape=(n_frames, n_atoms) |
---|
See also
Notes
this method is not well optimized for speed.
Examples
>>> import pytraj as pt
>>> traj = pt.fetch_pdb('1l2y')
>>> x = pt.dssp_allatoms(traj, simplified=True)
>>> x[0, :3].tolist()
['C', 'C', 'C']
pytraj.analysis.dssp_analysis.
dssp_allresidues
(traj, *args, **kwd)¶calculate dssp for all residues. Mostly used for visualization.
Returns: | ndarray, shape=(n_frames, n_residues) |
---|
See also
Notes
this method is not well optimized for speed.
Examples
>>> import pytraj as pt
>>> traj = pt.datafiles.load_dpdp()
>>> x = pt.dssp_allresidues(traj, simplified=True)
>>> x[0].tolist()
['C', 'E', 'E', 'E', 'E', 'C', 'C', 'C', 'C', 'E', 'E', 'E', 'E', 'E', 'C', 'C', 'E', 'E', 'E', 'E', 'C', 'C']
>>> len(x[0]) == traj.top.n_residues
True
>>> # load trajectory having waters
>>> traj = pt.datafiles.load_tz2_ortho()
>>> x = pt.dssp_allresidues(traj, simplified=True)
>>> len(x[0]) == traj.top.n_residues
True
>>> len(x[0])
1704
>>> # only calculate protein residues, use `pytraj.dssp`
>>> y = pt.dssp(traj, simplified=True)
>>> len(y[0])
13