Secondary structure database¶
Under the hood, pmlbeta maintains a database of secondary structures, which is essentially a bunch of backbone dihedral angle triplets with labels. This is stored in the form of a Python dict, mapping string labels to tuples of floating point numbers.
By default the following are defined:
DEFAULT_HELIXTYPES = {
'Z6M': (126.7, 62.6, 152.7),
'Z6P': (-126.7, -62.6, -152.7),
'Z8M': (47.5, 53.5, -104.3),
'Z8P': (-47.5, -53.5, 104.3),
'H8M': (76.8, -120.6, 52.7),
'H8P': (-76.8, 120.6, -52.7),
'H10M': (-77.5, -51.8, -75.1),
'H10P': (77.5, 51.8, 75.1),
'H12M': (92.3, -90.0, 104.6),
'H12P': (-92.3, 90.0, -104.6),
'H14M': (-140.3, 66.5, -136.8),
'H14P': (140.3, -66.5, 136.8),
'SM': (70.5, 176.2, 168.9),
'SP': (-70.5, -176.2, -168.9),
'Straight': (180, 180, 180),
'Straight alpha': (180, None, 180),
'Alpha-helix': (-57, None, -47),
'3_10-helix': (-49, None, -26),
'P-beta-sheet': (-119, None, 113),
'AP-beta-sheet': (-139, None, 135),
}
Corresponding to the following:
Abbreviation | phi | theta | psi | Comments |
---|---|---|---|---|
Z6M | 126.7° | 62.6° | 152.7° | from Beke et. al.(2006) |
Z6P | -126.7° | -62.6° | -152.7° | |
Z8M | 47.5° | 53.5° | -104.3° | |
Z8P | -47.5° | -53.5° | 104.3° | |
H8M | 76.8° | -120.6° | 52.7° | |
H8P | -76.8° | 120.6° | -52.7° | |
H10M | -77.5° | -51.8° | -75.1° | |
H10P | 77.5° | 51.8° | 75.1° | |
H12M | 92.3° | -90.0° | 104.6° | |
H12P | -92.3° | 90.0° | -104.6° | |
H14M | -140.3° | 66.5° | -136.8° | |
H14P | 140.3° | -66.5° | 136.8° | |
SM | 70.5° | 176.2° | 168.9° | |
SP | -70.5° | -176.2° | -168.9° | |
Straight | 180° | 180° | 180° | |
Straight alpha | 180° | — | 180° | |
Alpha-helix | -57° | — | -47° | from PyMOL |
P-beta-sheet | -119° | — | 113° | |
AP-beta-sheet | -139° | — | 135° | |
3_10-helix | -49° | — | -26° |
Editing this list is possible by the corresponding GUI utility, or by the ssdb_* commands.
Changes to the secondary structure database are remembered in the next PyMOL session.
Python API documentation¶
Implement a database of secondary structures using the plugin preference store of PyMOL
-
class
pmlbeta.secstructdb.
SecondaryStructureDB
[source] A database of the known secondary structures and the corresponding dihedral angles
-
classmethod
add
(name: str, phi: float, theta: float, psi: float)[source] Add or edit an entry in the secondary structure torsion angle database
Parameters: - name (str) – the name of the secondary structure
- phi (float) – the first torsion angle
- theta (float or None) – the second torsion angle (None for alpha-amino acid secondary structures)
- psi (float) – the third torsion angle
-
classmethod
addDefaults
()[source] Add the default secondary structure types to the list
-
classmethod
dihedrals
(name: str) → Tuple[float, Optional[float], float][source] Get the dihedral angles corresponding to a secondary structure.
Parameters: name (str) – the name of the secondary structure Returns: the dihedral angles corresponding to that secondary structure, in degrees Return type: a tuple of three floats, the central one can be None Raises: KeyError – if the named entry does not exist
-
classmethod
find
(phi: float, theta: Optional[float], psi: float, tolerance: float = 0.5) → Optional[str][source] Try to find a secondary structure in the database which matches the given torsion angles
Parameters: - phi (float) – the first torsion angle
- theta (float or None) – the second torsion angle (None for alpha-amino acids)
- psi (float) – the third torsion angle
- tolerance (float) – absolute tolerance in each angle
Returns: the name of the closest matching secondary structure or None if no match
Return type: str or None
-
classmethod
getAll
(alpha: bool = True, beta: bool = True) → Dict[str, Tuple[float, float, float]][source] Get the list of secondary structures from the PyMOL plugin preferences
Parameters: - alpha (bool) – if secondary structures for alpha-peptides are requested
- beta (bool) – if secondary structures for beta-peptides are requested
Returns: the known secondary structures and their backbone torsion angles
Return type: a dict mapping names to triplets of floats
-
classmethod
remove
(name: str)[source] Remove an entry in the secondary structure torsion angle database
Parameters: name (str) – the name of the secondary structure
-
classmethod
-
pmlbeta.secstructdb.
ssdb_add
(entryname: str, phi: Union[str, float], theta: Union[str, float], psi: Union[str, float, None] = None, _self=None)[source] DESCRIPTION
Add/modify an entry in the secondary structure databaseUSAGE
ssdb_add entryname, phi, theta, psi # for beta-amino acids
or
ssdb_add entryname, phi, psi # for alpha-amino acids
ARGUMENTS
entryname = string: the name of the entry
- phi = float: the first (N-terminal) backbone dihedral angle: (C-, N, CA, C) for alpha-amino acids and
- (C-, N, CB, CA) for beta-amino acids
theta = float: the middle backbone dihedral angle for beta-amino acids: (N, CB, CA, C)
- psi = float: the last (C-terminal) backbone dihedral angle: (N, CA, C, N+) for alpha-amino acids and
- (CB, CA, C, N+) for beta-amino acids
NOTES
changes are automatically saved for further PyMOL sessions.SEE ALSO
ssdb_del, ssdb_list, ssdb_resetdefaults, ssdb_dihedrals
-
pmlbeta.secstructdb.
ssdb_del
(entryname: str, _self=None)[source] DESCRIPTION
Remove an entry from the secondary structure databaseUSAGE
ssdb_del entrynameARGUMENTS
entryname = string: the name of the entryNOTES
changes are automatically saved for further PyMOL sessions.SEE ALSO
ssdb_add, ssdb_list, ssdb_resetdefaults, ssdb_dihedrals
-
pmlbeta.secstructdb.
ssdb_dihedrals
(entryname: str, _self=None)[source] DESCRIPTION
- Print the dihedral angles corresponding to a given entry
- secondary structure database
USAGE
ssdb_dihedrals entrynameARGUMENTS
entryname = string: the name of the entrySEE ALSO
ssdb_add, ssdb_del, ssdb_list, ssdb_resetdefaults
-
pmlbeta.secstructdb.
ssdb_list
(_self=None)[source] DESCRIPTION
Lists the entries in the secondary structure databaseUSAGE
ssdb_listSEE ALSO
ssdb_add, ssdb_del, ssdb_resetdefaults, ssdb_dihedrals
-
pmlbeta.secstructdb.
ssdb_resetdefaults
(_self=None)[source] DESCRIPTION
Add back the default entries to the secondary structure databaseUSAGE
ssdb_resetdefaultsNOTES
changes are automatically saved for further PyMOL sessions.SEE ALSO
ssdb_add, ssdb_del, ssdb_list, ssdb_dihedrals