Rotamers
The Rotamers is a submodule of
ProtoSyn.Peptides
module. As such, the following section introduces both new types and methods that work together, in a generally independent way from the rest of the module, and require an unique exploratory section on their own.
A Rotamer
is a collection of chi angles for a specific conformation for the sidechain of an aminoacid. Although virtually all dihedral angles are allowed, for each chi dihedral, certain conformations are energetically more favourable and therefore have a higher natural probability of observation. The allowed Rotamers can be further dependent on certain backbone dihedral angles (for the phi and psi dihedrals). All this information can be gathered in a Rotamer Library, a useful tool when trying to answer the question: "What set of sidechain conformations stabilize the protein structure?", sometimes also referred to as the sidechain packaging problem. Multiple such rotamer libraries have been proposed. ProtoSyn makes available a set of types and methods that allow the manipulation and application of rotamer libraries, while using, as a default, the 2011 Dunbrack library. This is further explored in the following section, sub-divided as follows for organizational purposes:
Organizing a Rotamer Library
ProtoSyn.Peptides.Rotamer
— TypeRotamer{T <: AbstractFloat}(name::String, chis::Dict{AbstractSelection, Tuple{T, T}})
A Rotamer
holds information regarding a single conformation for all chi dihedral angles of a sidechain belonging to an aminoacid identified by the given name
. The chis
list is, therefore, a dictionary, where the key is the AbstractSelection
(chi1, chi2, chi3 or chi4) and the value is a Tuple{T, T}
, where the first entry is the average dihedral angle and the second entry is the standard deviation expected for that dihedral angle.
See also
Examples
julia> rot_lib["LYS"][35°, -35°][1]
Rotamer{Float64}: LYS | Chi1: -67.5° ± 6.9 | Chi2: -179.6° ± 9.7 | Chi3: -179.7° ± 11.8 | Chi4: 178.5° ± 12.0
ProtoSyn.Peptides.BBI_RotamerLibrary
— TypeBBI_RotamerLibrary{T <: AbstractFloat}(rotamers::Vector{Rotamer{T}}, weights::Weights{T, T, Array{T, 1}})
A BBI_RotamerLibrary
is a backbone-independent list of Rotamer
instances, ordered based on the natural probability of occurrence, where each position in the rotamers
list has a corresponding position in the weights
list.
See also
Examples
julia> rot_lib["VAL"][35°, -35°]
+---------------------------------------------------------------------------------------------------------------------------+
| Index | Probability | Rotamer description |
+---------------------------------------------------------------------------------------------------------------------------+
| 1 | 82.07% | VAL | Chi1: 175.8° ± 5.6 | Chi2: -- | Chi3: -- | Chi4: -- |
| 2 | 13.74% | VAL | Chi1: 64.7° ± 7.5 | Chi2: -- | Chi3: -- | Chi4: -- |
| 3 | 4.18% | VAL | Chi1: -61.6° ± 6.4 | Chi2: -- | Chi3: -- | Chi4: -- |
+---------------------------------------------------------------------------------------------------------------------------+
ProtoSyn.Peptides.BBD_RotamerLibrary
— TypeBBD_RotamerLibrary{T <: AbstractFloat}(name::String, phis::Vector{T}, psis::Vector{T}, rotamer_stacks::Matrix{BBI_RotamerLibrary}) where {T <: AbstractFloat}
A BBD_RotamerLibrary
is a 2D backbone dependent matrix of BBI_RotamerLibrary
instances (rotamer_stacks
), indexed by both the list of backbone phi dihedrals (phis
) and the list of backbone psi dihedrals (psis
). Each BBD_RotamerLibrary
only hold information regarding one type of aminoacid, identified by the name
. Each entry in the rotamer_stacks
matrix only holds information of the list of rotamers available/plausible for a specific set of phi and psi backbone dihedrals.
See also
Examples
julia> rot_lib["VAL"]
Name: VAL | Shape: (37, 37)
Figure 1 | A diagram representation of a ProtoSyn Rotamer Library organization. For each entry in a dictionary (where the keys are the aminoacid names with a rotatable sidechain), a BBD_RotamerLibrary
can be queried for with the backbone phi and psi dihedral angles, retrieving the backbone dependent BBI_RotamerLibrary
. This object organizes all the plausible Rotamer
conformations, based on the probability of natural occurrence, from where a specific Rotamer
can be sampled. Finally, a Rotamer
is simply a list of chi dihedral angles (and the corresponding standard deviation), and can be applied to a Pose
(using the apply!
method).
Applying a Rotamer Library
ProtoSyn.Peptides.apply!
— Functionapply!(state::State, rotamer::Rotamer, residue::Residue)
Apply the given Rotamer
rotamer
to the sidechain of Residue
residue
, on the provided State
state
. Return the applied Rotamer
rotamer
, without applying the sync!
method to the State
state
.
Examples
julia> ProtoSyn.Peptides.apply!(pose.state, rot_lib["GLU"][35°, -35°][1], pose.graph[1][2])
Rotamer{Float64}: GLU | Chi1: -55.6° ± 0.0 | Chi2: 187.7° ± 0.0 | Chi3: -2.6° ± 0.0 | Chi4: --
ProtoSyn.Peptides.sample_rotamer
— Functionsample_rotamer(rs::BBI_RotamerLibrary{T}, [n::Int = -1]) where {T <: AbstractFloat}
Sample a Rotamer
instance from the given BBI_RotamerLibrary
rs
, taking the natural probability of occurrence into consideraction. If a n
value is given, sample only from the n
most likely Rotamer
instances. If n
is 0 or lower (-1, by default), sample from all Rotamer
instances. Return the sampled Rotamer
instance.
Examples
julia> ProtoSyn.Peptides.sample_rotamer(rot_lib["GLU"][35°, -35°])
Rotamer{Float64}: GLU | Chi1: -66.8° ± 8.2 | Chi2: 179.1° ± 11.8 | Chi3: -35.0° ± 8.5 | Chi4: --
sample_rotamer(rl::Dict{String, BBI_RotamerLibrary}, residue::Residue, n::Int = -1)
Sample a Rotamer
instance from the corresponding BBI_RotamerLibrary
for the given Residue
residue
name. This method takes the natural probability of occurrence into consideraction. If a n
value is given, sample only from the n
most likely Rotamer
instances. If n
is 0 or lower (-1, by default), sample from all Rotamer
instances. Return the sampled Rotamer
instance.
Examples
julia> ProtoSyn.Peptides.sample_rotamer(rot_lib, pose.graph[1][24])
Rotamer{Float64}: SER | Chi1: 179.7° ± 8.4 | Chi2: -- | Chi3: -- | Chi4: --
sample_rotamer(pose::Pose, rl::Dict{String, BBD_RotamerLibrary}, residue::Residue, [n::Int = -1], [random_inexistent_phi_psi::Bool = false])
Sample a Rotamer
instance from the corresponding BBD_RotamerLibrary
for the given Residue
residue
name. Since the BBD_RotamerLibrary
is backbone-dependent, the current State of the provided Pose
pose
is read to sample a Rotamer
. This method takes the natural probability of occurrence into consideraction. If a n
value is given, sample only from the n
most likely Rotamer
instances. If n
is 0 or lower (-1, by default), sample from all Rotamer
instances. If random_inexistent_phi_psi
is set to true
(false
, by default), randomly assigns a phi or psi angle value when none exists (for example, in terminal Residue
instances), allowing for a Rotamer
to still be sampled. Return the sampled Rotamer
instance.
Examples
julia> ProtoSyn.Peptides.sample_rotamer(pose, rot_lib, pose.graph[1][6])
Rotamer{Float64}: GLU | Chi1: -65.5° ± 9.5 | Chi2: 81.7° ± 9.6 | Chi3: 7.3° ± 8.5 | Chi4: --
ProtoSyn.Peptides.get_rotamer
— Functionget_rotamer(pose::Pose, residue::Residue)
Measure the existent chi dihedral angles in Residue
residue
on the given Pose
pose
, saving the information in a new Rotamer
instance.
Examples
julia> ProtoSyn.Peptides.get_rotamer(pose, pose.graph[1][2])
Rotamer{Float64}: GLU | Chi1: 180.0° ± 0.0 | Chi2: -180.0° ± 0.0 | Chi3: 90.0° ± 0.0 | Chi4: --
Loading a Rotamer Library
ProtoSyn.Peptides.load_dunbrack
— Functionload_dunbrack([::Type{T}], [filename::String]) where {T <: AbstractFloat}
Load a Dunbrack styled rotamer library from file filename
(if no filename
is given, will load the default rotamer library from the resources directory). If no type T
is provided, will use ProtoSyn.Units.defaultFloat
. Return a dictionary where each key is the name of an aminoacid type and the value is the corresponding loaded BBD_RotamerLibrary
instance. Note that not all aminoacid types have sidechains, and therefore, have an associated BBD_RotamerLibrary
instance.
Examples
julia> rot_lib = ProtoSyn.Peptides.load_dunbrack(Float64)
Dict{String, ProtoSyn.Peptides.BBD_RotamerLibrary} with 19 entries:
"GLN" => Name: GLN | Shape: (37, 37)…
"LYS" => Name: LYS | Shape: (37, 37)…
"ASN" => Name: ASN | Shape: (37, 37)…
"TRP" => Name: TRP | Shape: (37, 37)…
"THR" => Name: THR | Shape: (37, 37)…
"VAL" => Name: VAL | Shape: (37, 37)…
"HIS" => Name: HIS | Shape: (37, 37)…
"SER" => Name: SER | Shape: (37, 37)…
"PRO" => Name: PRO | Shape: (37, 37)…
"ASP" => Name: ASP | Shape: (37, 37)…
"PHE" => Name: PHE | Shape: (37, 37)…
"ILE" => Name: ILE | Shape: (37, 37)…
"TYR" => Name: TYR | Shape: (37, 37)…
"HIE" => Name: HIS | Shape: (37, 37)…
"ARG" => Name: ARG | Shape: (37, 37)…
"LEU" => Name: LEU | Shape: (37, 37)…
"MET" => Name: MET | Shape: (37, 37)…
⋮ => ⋮