External packages
The External packages 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.
As futher explained in the Core module External packages section, ProtoSyn makes available tools to define and manipulate input structures for common and useful external packages.
Gromacs
For the Gromacs simulation suite, the Peptides module introduces methods to define .itp files for protein structures, as well as manipulate the Pose
graph to match both the Atom
names and Atom
order expected by Gromacs.
ProtoSyn.Peptides.GMX.generate_gmx_itp
— Functiongenerate_gmx_itp(pose::Pose, [selection::Opt{AbstractSelection} = nothing]; [molecule_itp_filename::String = "protein.itp"], [overwrite::Bool = true], [keep_temp_files::Bool = false], [gmx_histidine_type::Int = 0], [gmx_water_model::String = "tip3p"], [gmx_forcefield::String = "amber99sb-ildn"])
Generate a protein .itp file for usage in Gromacs using the gmx pdb2gmx
utility program with forcefield parameters for the given Pose
pose
. If an AbstractSelection
selection
is provided, only the selected Atom
instances will be considered (in a Fragment
) for .itp generation. Note that since gmx pdb2gmx
is being used, non-protein Residue
instance may cause problems or undesired parameters in the resulting .itp file. It is reccomended to select protein Residue
instances only. The .itp data will be written to molecule_itp_filename
(if file exists, setting overwrite
to true
will overwrite any existing file with the same name, set to true
by default). Setting keep_temp_files
to true
(false
, by default) prevents ProtoSyn from deleting any temporary files and directories generated during the method call (this includes Gromacs backups ending with "#" and any file or directory starting with "jl_"). During gmx pdb2gmx
call, automatically sets:
- Histidines to be of type
gmx_histidine_type
(default: 0); - Water model to be of type
gmx_water_model
(default: "tip3p"); - Forcefield to be of type
gmx_forcefield
(default: "amber99sb-ildn").
See also
Examples
julia> ProtoSyn.Peptides.GMX.generate_gmx_itp(pose)
✓ All necessary packages were found!
(...)
ProtoSyn.Peptides.GMX.generate_gmx_topology
— Functiongenerate_gmx_topology(pose::Pose; [protein_itp_filename::String = "protein.itp"], [atomtypes_itp_filename::String = "atomtypes.itp"], [molecule_itp_filename::String = "molecule.itp"], [overwrite::Bool = true], [keep_temp_files::Bool = false], [gmx_histidine_type::Int = 0], [gmx_water_model::String = "tip3p"], [gmx_forcefield::String = "amber99sb-ildn"], [topology_filename::String = "topol.top"], [include_atomtypes::Bool = false])
Generate a system .top file for usage in Gromacs (using the gmx pdb2gmx
and acpype
utility programs) with forcefield parameters for the given Pose
pose
. This method automatically tries to select protein Residue
instances using the ProteinSelection
. The selected Residue
instances forcefield parameters will be compiled into protein_itp_filename
using the gmx pdb2gmx
utility program (if file exists, setting overwrite
to true
will overwrite any existing file with the same name, set to true
by default). During gmx pdb2gmx
call, automatically sets:
- Histidines to be of type
gmx_histidine_type
(default: 0); - Water model to be of type
gmx_water_model
(default: "tip3p"); - Forcefield to be of type
gmx_forcefield
(default: "amber99sb-ildn").
Any remaining Residue
instances will be considered as ligand molecules, and the forcefield information will be compiled into molecule_itp_filename
and atomtypes_itp_filename
using the acpype
utility program. Setting keep_temp_files
to true
(false
, by default) prevents ProtoSyn from deleting any temporary files and directories generated during the method call (this includes Gromacs backups ending with "#" and any file or directory starting with "jl"). The resulting .itp files are combined into the final `topologyfilename.top file (if
include_atomtypesis set to
true, the ligand molecule's atomtypes file is also included in the topology,
false` by default).
This method is untested on proteins with multiple ligands and may fail. This may change in future versions of ProtoSyn.
See also
generate_gmx_itp
generate_gmx_files
Examples
julia> ProtoSyn.Peptides.GMX.generate_gmx_topology(pose)
✓ All necessary packages were found!
(...)
ProtoSyn.Peptides.GMX.sort_atoms_and_graph_gmx!
— Functionsort_atoms_and_graph_gmx!(pose::Pose)
Sorts Atom
instances in the encompassing AbstractContainer
structures and the resulting Graph for Gromacs simulations (Gromacs expects a given atom order to match with the gmx pdb2gmx
and acpype
generated .itp and .top files - this does not necessarilly match the IUPAC conventions).
See also
assign_gmx_atom_names!
generate_gmx_files
Examples
julia> ProtoSyn.Peptides.GMX.sort_atoms_and_graph_gmx!(pose)
Pose{Topology}(Topology{/2a3d:60945}, State{Float64}:
Size: 1140
i2c: false | c2i: false
Energy: Dict(:Total => Inf)
)
ProtoSyn.Peptides.GMX.GMXS
— Constant(ProtoSyn.Peptides.GMX.GMXS)(atom::Atom, stack::Vector{Atom})
Gromacs-like algorithm for travel_graph
. Correctly sorts the given Atom
atom
children instances and concatenates with the current stack
as expected by the Gromacs external package.
Examples
julia> ProtoSyn.Peptides.GMX.GMXS(pose.graph[1, 1, 1], Vector{Atom}())
4-element Vector{Atom}:
Atom{/2a3d:34300/A:1/MET:1/H1:2}
Atom{/2a3d:34300/A:1/MET:1/H2:3}
Atom{/2a3d:34300/A:1/MET:1/H3:4}
Atom{/2a3d:34300/A:1/MET:1/CA:5}
ProtoSyn.Peptides.GMX.assign_gmx_atom_names!
— Functionassign_gmx_atom_names!(pose::Pose, selection::Opt{AbstractSelection} = nothing)
Rename Atom
instances in the given Pose
pose
to match with the gmx pdb2gmx
and acpype
generated .itp and .top files - this does not necessarilly match the IUPAC conventions. If an AbstractSelection
selection
is provided, consider only the selected Atom
instances (any given selection
will be promoted to be of Atom
type - see ProtoSyn.promote
).
See also
assign_default_atom_names!
rename!
sort_atoms_and_graph_gmx!
generate_gmx_files
Examples
julia> ProtoSyn.Peptides.GMX.assign_gmx_atom_names!(pose)
Pose{Topology}(Topology{/2a3d:55318}, State{Float64}:
Size: 1140
i2c: false | c2i: false
Energy: Dict(:Total => Inf)
)
ProtoSyn.Peptides.GMX.generate_gmx_files
— Functiongenerate_gmx_files(pose::Pose; protein_itp_filename::String ="protein.itp", output_pdb_filename::String ="system.pdb", atomtypes_itp_filename::String ="atomtypes.itp", molecule_itp_filename::String ="molecule.itp", overwrite::Bool =true, keep_temp_files::Bool =false, gmx_histidine_type::Int =0, gmx_water_model::String ="tip3p", gmx_forcefield::String ="amber99sb-ildn", topology_filename::String ="topol.top", include_atomtypes::Bool =false)
Generate all the necessary files to launch a Gromacs MD simulation (.top, .itp and correctly ordered/named .pdb files). For topology generation, please check generate_gmx_topology
documentation: all arguments used in that method are also input arguments of this one. For .pdb generation, ProtoSyn attempts to sort (using sort_atoms_and_graph_gmx!
) and rename (using assign_gmx_atom_names!
) Atom
instances in accordance to the expected values in Gromacs before exporting the given Pose
pose
to a output_pdb_filename
file. Check these methods documentation for more details.
Examples
julia> ProtoSyn.Peptides.GMX.generate_gmx_files(pose)
✓ All necessary packages were found!
(...)