Natural frequency
The Natural frequency Calculators module introduces a measure of how likely a given peptide sequence is based on the natural distribution of aminoacids in nature, according to Krick et al. (See this paper).
ProtoSyn.Peptides.Calculators.calc_aa_frequency — Functioncalc_aa_frequency([::Type{A}], pose::Pose, selection::Opt{AbstractSelection}, update_forces::Bool; [aa_frequency_map::Dict{Char, T} = default_aa_frequencies]) where {A <: ProtoSyn.AbstractAccelerationType, T <: AbstractFloat}Calculates an energy value based on the total number of Residue instances in the given Pose of a single type. For each Residue type, a corrresponding value should be provided in aa_frequency_map (this method adds the inverse of that value as an energy reward). By default, aa_frequency_map reflects the natural distribution of aminoacids, according to Krick et al. (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4209132/). Different aa_frequency_map instances can introduce bias towards certain types of aminoacids in simulations. If provided, an AbstractSelection selection limits the subset of considered Residue instances for aminoacid frequency calculation (selection is promoted to Residue level using the promote method). update_forces has no effect and exists only in order to standardize calls between Calculators. An optional parameter Type{<: AbstractAccelerationType} can be provided, stating the acceleration type used to calculate this energetic contribution (See ProtoSyn acceleration types, if not provided defaults to ProtoSyn.acceleration.active).
See also
Examples
julia> ProtoSyn.Peptides.Calculators.calc_aa_frequency(pose, nothing, false)
(-456.50000000000017, nothing)ProtoSyn.Peptides.Calculators.get_default_aa_frequency — Functionget_default_aa_frequency(;[α::T = 1.0]) where {T <: AbstractFloat}Return the default natural frequency energy EnergyFunctionComponent. α sets the component weight (on an EnergyFunction instance, 1.0 by default). This function employs calc_aa_frequency as the :calc function.
Settings
aa_frequency_map::Dict{Char, T}- A mapping betweenResiduetypes (in 1-letter code format) and the natural frequency of aminoacids of that type;
See also
Examples
julia> ProtoSyn.Peptides.Calculators.get_default_aa_frequency()
🞧 Energy Function Component:
+---------------------------------------------------+
| Name | Natural_AA_Freq |
| Alpha (α) | 1.0 |
| Update forces | false |
| Calculator | calc_aa_frequency |
+---------------------------------------------------+
| +----------------------------------------------------------------------------------+
├── ● Settings | Value |
| +----------------------------------------------------------------------------------+
| | aa_frequency_map | Dict{Char, Float64}(20 components) |
| +----------------------------------------------------------------------------------+
|
└── ○ Selection: nothing