Graph

This section lists functions that work on the system Graph, expanding on the Core methods (See Graph methods).

ProtoSyn.Peptides.assign_default_atom_names!Function
assign_default_atom_names!(pose::Pose, [selection::Opt{AbstractSelection} = nothing], [grammar::LGrammar = Peptides.grammar]; [force_rename::Bool = false])

Assigns the default Atom names to the given Pose pose. If an AbstractSelection selection is provided, only rename the selected Residue instances (any given selection will be promoted to be of Residue level using ProtoSyn.promote). The Atom default names are retrieved from the given LGrammar grammar (Peptides.grammar, by default). Both the given Pose and the built template from the grammar's Graph are travelled to generate a 1-to-1 correspondence between Atom instances (the Pose Atom names are then renamed to match the template, uses the ProtoSyn.travel_graph method with the ProtoSyn.Peptides.IUPAC search algorithm). This approach may sometimes fail, for example, when tautomers are present, in wich case this method attempts to find tautomer candidates in a Residue by Residue case. This method also attempts to verify if terminal Residue instances are capped, in which case the correct naming attribution is automatically taken into consideration.

Note:

Some methods (such as, for example, the assign_default_charges! method) expect default atom names. Consider using ProtoSyn.Peptides.diagnose to check whether the current Atom names are known.

See also

rename!

Examples

julia> ProtoSyn.Peptides.assign_default_atom_names!(pose)
Pose{Topology}(Topology{/2a3d:42429}, State{Float64}:
 Size: 1140
 i2c: false | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.unbond!Function
unbond!(pose::Pose, residue_1::Residue, residue_2::Residue; [keep_downstream_position::Bool = true])

Unbond the two provided residues by severing the peptidic bond between the C atom of residue_1 and the N atom of residue_2. In order to do this, perform the following steps: unset parent/children, unbond neighbours, remove from Graph, remove from State, update the containers itemsbyname field. If keep_downstream_position is set to true (is, by default), the downstream Residue position is maintained (by calling request_c2i! and sync! methods).

Examples

julia> ProtoSyn.Peptides.unbond!(pose, pose.graph[1][2], pose.graph[1][3]; keep_downstream_position = true)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 343
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.travel_graphFunction
travel_graph(start::Atom; [stop::Opt{Atom} = nothing], [search_algorithm::F = Peptides.IUPAC]) where {F <: SearchAlgorithm})

Overload of the travel_graph method, where the default search_algorithm is IUPAC.

Examples

julia> Peptides.travel_graph(pose.graph[1][1]["CA"])
15-element Vector{Atom}:
 Atom{/test:37905/A:1/MET:1/CA:5}
 Atom{/test:37905/A:1/MET:1/HA:6}
 Atom{/test:37905/A:1/MET:1/CB:8}
 Atom{/test:37905/A:1/MET:1/HB3:10}
 Atom{/test:37905/A:1/MET:1/HB2:11}
 Atom{/test:37905/A:1/MET:1/CG:12}
 Atom{/test:37905/A:1/MET:1/HG3:13}
 Atom{/test:37905/A:1/MET:1/HG2:14}
 Atom{/test:37905/A:1/MET:1/SD:15}
 Atom{/test:37905/A:1/MET:1/CE:16}
 Atom{/test:37905/A:1/MET:1/HE3:17}
 Atom{/test:37905/A:1/MET:1/HE2:18}
 Atom{/test:37905/A:1/MET:1/HE1:19}
 Atom{/test:37905/A:1/MET:1/C:7}
 Atom{/test:37905/A:1/MET:1/O:9}
source
ProtoSyn.Peptides.IUPACConstant
(ProtoSyn.IUPAC)(atom::Atom, stack::Vector{Atom})

IUPAC-like search algorithm for travel_graph. Correctly sorts the given Atom atom children instances and concatenates with the current stack. This method attempts to identify each Residue sidechain (from alpha-carbon CA children names) and sorts sidechain before the remaining backbone (C=O & N, etc). Consider using assign_default_atom_names! to make sure all Atom names are as expected.

Examples

julia> ProtoSyn.Peptides.IUPAC(pose.graph[1][1]["CA"], Vector{Atom}())
3-element Vector{Atom}:
 Atom{/test:36441/A:1/MET:1/HA:6}
 Atom{/test:36441/A:1/MET:1/CB:8}
 Atom{/test:36441/A:1/MET:1/C:7}
source