Pose

Included in the Peptides are a set of methods who primarily act on a Pose instance, expanding on the list of availabe Core functions (See Pose methods). These are subdivided by topics, for organization purposes:

Appending and inserting fragments

Expanding on the homologous Core functions, the next methods allow the user to append and insert Fragment instances in Pose instances (from Fragment instances or from a derivation (for example, seq"AAA", a triplet of alanine aminoacids)). These expanded methods all add the possibility to set the Secondary Structure of the appendage (using the setss! method) and correct certain bond orientation artifacts introduced by the Core functions, specific to peptidic structures.

ProtoSyn.Peptides.append_fragment!Method
append_fragment!(pose::Pose{Topology}, residue::Residue, grammar::LGrammar, frag::Pose{Segment}; [ss::Opt{SecondaryStructureTemplate} = nothing], [op = "α"])

Add the Fragment frag to the given Pose pose, appending it after the given Residue residue. This residue and the new Fragment frag will be connected using operation op ("α" by default) of the given LGrammar grammar. If given, a SecondaryStructureTemplate ss can be applied to the new appendage (using the setss! method). In either case, the C=O bond position is re-calculated and set (in the first residue of the appendage). Request internal to cartesian coordinate conversion and return the altered Pose pose.

Note:

This function is an extension of ProtoSyn.append_fragment!.

See also

insert_fragment!

Examples

julia> ProtoSyn.Peptides.append_fragment!(pose, pose.graph[1][end], res_lib, frag)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 373
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source

ProtoSyn Peptides Append

Figure 1 | Two example applications of the append_fragment! method. 1 - Appending a new Fragment (which can be one or more aminoacids) to the end of a peptidic structure (the Fragment is displayed in dark grey). The Residue instances are re-indexed (using the reindex! method) and inserted in the Pose graph (sharing the root). 2 - A Fragment can also be appended to a severed cut (using the unbond! method or the fragment! method, for example). In this case, naturally, the downstream Residue instances are connected to the Pose root. Note that the appended aminoacids are ordered in such a way as to continue numerate (on index) from the Residue instance appended to.

ProtoSyn.Peptides.insert_fragment!Method
insert_fragment!(pose::Pose{Topology}, residue::Residue, grammar::LGrammar, frag::Pose{Segment}; ss::Opt{SecondaryStructureTemplate} = nothing, op = "α")

Insert the Fragment frag in the given pose, on the position of the provided Residue instance residue (the residue gets shifted downstream). This first downstream Residue and the new Fragment will be connected using operation op ("α" by default) from [LGrammar] grammar. Also connects to the upstream Residue instance, using the same operation. If given, a SecondaryStructureTemplate ss can be applied to the new appendage (using the setss! method). If the appendage is not being inserted at the root, the C=O bond position is re-calculated and set (in the anchor for the first residue of the appendage). If the appendage is being inserted at the root, perform a soft uncap of the terminal hydrogen atoms (removes "H2" and "H3", leaves "H1", renames it to "H") and recalculate the N-H bond position (at the first downstream Residue). Request internal to cartesian coordinate conversion and return the altered Pose pose.

Note:

This function is an extension of ProtoSyn.insert_fragment!.

See also

append_fragment!

Examples

julia> ProtoSyn.Peptides.insert_fragment!(pose, pose.graph[1][1], res_lib, frag)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 373
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source

ProtoSyn Peptides Insert

Figure 2 | Two example applications of the insert_fragment! method. 1 - Inserting a new Fragment (which can be one or more aminoacids) to the middle of a peptidic structure (the Fragment is displayed in dark grey). The Residue instances are re-indexed (using the reindex! method) and inserted in the Pose graph (sharing the root), while being connected in both upstream and downstream ends. 2 - A Fragment can also be inserted at position 1 of the peptidic chain (in the beginning).

Mutating an aminoacid

In a design effort, the objetive is to change the nature of an aminoacid (i.e.: change its sidechain), in order to stabilize a given interaction or conformation. Naturally, the main component necessary in such an algorithm is the ability to mutate an aminoacid, as explored in the next section.

ProtoSyn.Peptides.mutate!Function
mutate!(pose::Pose{Topology}, residue::Residue, grammar::LGrammar, derivation)

Mutate the given Pose pose at Residue residue, changing it's aminoacid to be derivation, as given by the template at grammar. This function changes the sidechain only (± 7x faster than force_mutate!). When mutating to Proline, falls back to force_mutate!. If ignore_existing_sidechain is set to true (false by default), existing sidechains are first removed and then re-added, regardless of being of the same type (which normally are ignored, if no mutation is required).

mutate!(pose::Pose{Topology}, sele::AbstractSelection, grammar::LGrammar, derivation)

Mutate the given Pose pose at Residue residue selected by the AbstractSelection sele. Note that this selection can only return a single aminoacid at a time.

Note:

Sidechains are selected based on the Atom.name (backbone Atom instances must be named N, H, CA, C and O, exclusively. Non backbone Atom instances should have other names, such as HB1, HB2, etc.) This function attempts to keep terminal caps intact (doesn't remove any atom named H1, H2, etc or OXT).

See also

force_mutate!

Examples

julia> ProtoSyn.Peptides.mutate!(pose, pose.graph[1][3], res_lib, seq"K")
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 354
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.force_mutate!Function
force_mutate!(pose::Pose{Topology}, residue::Residue, grammar::LGrammar, derivation, op = "α")

Mutate the given Pose pose at Residue residue, changing it's aminoacid to be derivation, as given by the template at grammar. This function changes the whole residue (backbone included). By default, the user should use mutate! instead of this function, except for uncommon aminoacids.

See also mutate!

Examples

julia> ProtoSyn.Peptides.force_mutate!(pose, pose.graph[1][3], res_lib, seq"K")
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 354
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source

ProtoSyn Mutate

Figure 3 | Example of an aminoacid mutation cycle.

Removing and adding sidechains

Certain coarse-grain EnergyFunctionComponent instances might not require an explicit sidechain. In certain algorithms, it might be, therefore, useful to remove the sidechains, lowering the degrees of freedom of a system and reducing the amount of particles simulated. In the next section, the methods used in ProtoSyn to remove and add sidechains in peptidic systems are explored.

ProtoSyn.Peptides.remove_sidechains!Function
remove_sidechains!(pose::Pose{Topology}, res_lib::LGrammar, Opt{AbstractSelection} = nothing)

Removes the sidechain atoms of the given Pose pose. If an AbstractSelection selection is provided, only the sidechain atoms belonging to the Residue instances of that selection are considered for possible removal. Essentially, the selected Residue instances are mutated to Glycine, based on the provided residue library res_lib, without changing the peptide sequence. Therefore, the original sequence can be recovered using the add_sidechains! method and energy components such as neighbour_vector can perform correctly.

Note:

Proline residues are ignored.

Note:

Caping Atom instances (N-terminal -NH3 and C-terminal -CO2) are also removed by this function. See cap! to recover from this.

See also

force_remove_sidechains!

Examples

julia> ProtoSyn.Peptides.remove_sidechains!(pose, res_lib)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 147
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)

julia> ProtoSyn.Peptides.remove_sidechains!(pose, res_lib, rn"ALA")
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 147
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.force_remove_sidechains!Function
force_remove_sidechains!(pose::Pose{Topology}, selection::Opt{AbstractSelection} = nothing)

Removes the sidechain Atom instances of the given Pose pose. If an AbstractSelection selection is provided, only the sidechain Atom instances belonging to that selection are considered for possible removal. This function completly removes any atom other than backbone atoms (may break Cα coordination, consider using the remove_sidechains! method instead).

Note:

Proline residues are ignored.

Note:

Caping Atom instances (N-terminal -NH3 and C-terminal -CO2) are also removed by this function. See cap! to recover from this.

See also

remove_sidechains!

Examples

julia> ProtoSyn.Peptides.force_remove_sidechains!(pose)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 105
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)

julia> ProtoSyn.Peptides.force_remove_sidechains!(pose, rn"ALA")
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 105
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.add_sidechains!Function
add_sidechains!(pose::Pose{Topology}, grammar::LGrammar, selection::Opt{AbstractSelection} = nothing)

Add the sidechain Atom instances to the given Pose pose, based on the templates of the provided grammar. If an AbstractSelection selection is given, only the residues of that selection (promoted to Residue instances, using the default aggregator function) are considered for sidechain addition. The addition is performed using the mutate! function, and follows the current Pose sequence.

Examples

julia> ProtoSyn.Peptides.add_sidechains!(pose, res_lib)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 343
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)

julia> ProtoSyn.Peptides.add_sidechains!(pose, res_lib, rn"ALA")
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 343
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source

ProtoSyn Remove Sidechains

Figure 4 | Example of application of the remove_sidechains! and [add_sidechains!] methods. Note that, when re-adding the sidechains, the Rotamer conformation is set to be a default position, not recovering the initial conformation without further processing.

Removing and adding N- and C- terminal caps

When extending a peptide (by appending new Residue instances, for example), it might be useful to remove the N- and C-terminal caps, as well as add them back at a later point in the algorithm or design process. In this section, two methods for this task are explored.

ProtoSyn.Peptides.identify_c_terminalFunction
identify_c_terminal(seg::Segment; supress_warn::Bool = false)

Attempts to identify the C terminal of a given Segment seg, using the following criteria:

  • Bonding patter: the C terminal follows the bonding pattern C-C-N-C, there the C-terminal is the first C atom of the pattern.
  • Bond number: the C terminal must not exceed 3 bonds.
  • By atom name: the C terminal must be bonded to an atom named CA

As such, this method does not use parenthood relationships to identify the C terminal. If the supress_warn is set to true (false, by default), any generated warnings are ignored.

Examples

julia> ProtoSyn.Peptides.identify_c_terminal(pose.graph[1])
Atom{/2a3d:40139/A:1/ASN:73/C:1138}
source
ProtoSyn.Peptides.uncap!Function
uncap!(pose::Pose, selection::Opt{AbstractSelection} = nothing)

Remove all bonded Atom instances to the N- and C-terminal (except Cα) of the provided Pose pose. If an AbstractSelections selection is provided, search for terminal residues only in the given selection. A terminal is identified based on the following criteria (see is_N_terminal and is_C_terminal methods):

  • Is a child of the Pose pose root;
  • Has no children;

Return the modified (in-place) Pose pose. Does not sync!.

Examples

julia> ProtoSyn.Peptides.uncap!(pose)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 341
 i2c: true | c2i: false
 Energy: Dict(:Total => Inf)
)
source
ProtoSyn.Peptides.cap!Function
cap!(pose::Pose, selection::Opt{AbstractSelection} = nothing)

Add template terminals to the N- and C- terminals of the given Pose pose. If an AbstractSelection selection is provided, search for terminal residues only in the given selection. A terminal is identified based on the following criteria (see is_N_terminal and is_C_terminal methods):

  • Is a child of the Pose pose root;
  • Has no children;

Return the modified (in-place) Pose pose. Performs sync! operation.

Examples

julia> ProtoSyn.Peptides.cap!(pose)
Pose{Topology}(Topology{/UNK:1}, State{Float64}:
 Size: 346
 i2c: false | c2i: false
 Energy: Dict(:Total => Inf)
)
source

ProtoSyn Remove Caps

Figure 5 | Example of application of the uncap! and [cap!] methods. Uncapping a terminal end of a peptide is usefull when appending new Residue instances, extending or adding an appendage.

Diagnosing poses

The following methods extend the usage of Diagnosing poses methods (from the Core module) to include Peptides specific standards.

ProtoSyn.Peptides.diagnoseFunction
diagnose(pose::Pose; [return_issues::Bool = false], [atom_order_search_algorithm::F = Peptides.IUPAC], [res_lib::LGrammar = Peptides.grammar]) where {F <: ProtoSyn.SearchAlgorithm}

Measure several agreement criteria on the given Pose pose:

  1. All diagnostics from ProtoSyn.diagnose, except using the given atom_order_search_algorithm (Peptides.IUPAC, by default)
  2. Check if Atom and Residue names are in accordance to the templates in the provided [LGrammar] res_lib
  3. Check for missing hydrogens (in comparison with the templates in the provided [LGrammar] res_lib)

If return_issues is set to true (false, by default) doesn't print results to stdout, returns them as a Vector{String} instead.

Examples

julia> ProtoSyn.Peptides.diagnose(pose)
 ⬤   Diagnosing pose 2a3d ...
 |
 ├──  • Residue-level graph OK
 |
 ├──  • Pose indexation OK
 |
 ├──  • Atom-level graph OK
 |
 ├──  • Pose synchronization status (1 issue identified)
 |    └── Pose is requesting internal to cartesian coordinates synchronization. Consider using the sync! function.
 |
 ├──  • Pose charges (1 issue identified)
 |    └── Sum of charges in the pose is not 0.0.
 |
 ├──  • (Peptides only) Residue and atom naming OK
 |
 └──  • (Peptides only) Missing atoms (1 issue identified)
      └── Pose seems to be missing hydrogens. Suggested fix: Consider using ProtoSyn.add_hydrogens!
source

Other

The following as miscellaneous methods that may help workflows in the Peptides module.