External packages
Because ProtoSyn does not exist in an isolated bubble but, instead, in a flourishing and ever-growing sea of novel applications and tools for computational chemistry, the External packages submodules attempts to link structures (and simulations) from ProtoSyn to any file format or input type for common and useful external packages.
Gromacs
Gromacs is "a free and open-source software suite for high-performance molecular dynamics and output analysis". ProtoSyn makes available tools to automatically export Pose
structures to the correct input formats for Gromacs (including the definition of .itp files with the forcefield parameters for molecular dynamics), or even employ Gromacs tools to manipulate structures directly.
ProtoSyn.GMX.generate_gmx_itp
— Functiongenerate_gmx_itp(pose::Pose, selection::Opt{AbstractSelection}; atomtypes_itp_filename::String = "atomtypes.itp", molecule_itp_filename::String = "molecule.itp", overwrite::Bool = true, keep_temp_files::Bool = false)
Generate an .itp
file for the Fragment
given by applying the AbstractSelection
selection
on the given Pose
pose
. If no selection
is provided, the whole Pose
pose
will be considered as a single entity for .itp
generation. This function assumes the selected Fragment
is an unusual organic chemical compound and uses acpype
external software to identify atomtypes and write an .itp
with AMBER forcefield parameters for usage in GROMACS simulations. By default, acpype
prints 2 files: the requested .itp
(to a file named molecule_itp_filename
) and an .itp
file with all atomtypes retrieved (to a file named atomtypes_itp_filename
). These atomtypes can sometimes be useful to verify the acpype
automatic attribution or to include in the final topology
. In any of these files are found in the current working directory, the function raises an error. If overwrite
is set to true
(is, by default), the existing files are overwritten instead. Any temporary files (starting with "jl") and directories and deleted after completion, unless `keeptemp_filesis set to
true(
false, by default). It is reccomended that this function is not used to specific organic polymers, such as proteins. Specific ProtoSyn modules (such as
Peptides, in this example) should provide more accurate
.itp` generation methods.
Other modules, such as Peptides, may provide generate_gmx_itp
methods for specific molecule types (proteins and peptides, in this example).
Examples
julia> ProtoSyn.GMX.generate_gmx_itp(pose, rn"CBZ")
(...)
ProtoSyn.GMX.add_bounding_box
— Functionadd_bounding_box(input_filename::String, output_filename::String, size::T, [shape::String = "cubic"], [verbose::Bool = true]) where {T <: AbstractFloat}
Employ gmx editconf
to add a bouding box to a given input file (input_filename
), outputs to output_filename
. The box has the provided shape
and size
(in nm). If verbose
is set to false
(true
, by default), hide the GROMACS output.
Examples
julia> ProtoSyn.GMX.add_bounding_box("md.pdb", "md_box.pdb", 1.0)
(...)
ProtoSyn.GMX.add_solvent
— Functionadd_solvent(input_filename::String, output_filename::String, [solvent_type::String = "spc216"], [topol_filename::String = "topol.top"], [verbose::Bool = true])
Employ gmx solvate
to add a solvent to a given input file (input_filename
), outputs to output_filename
. The file contents should be incorporated in a bounding box (see add_bounding_box
). The solvent used in given by solvent_type
(GROMCAS searchs the current working directory and the default instalation directory for .gro
files with this name containing structural information of the solvent molecule). Add solvent information (such as number of added molecules) to the given topol_filename
. If verbose
is set to false
(true
, by default), hide the GROMACS output.
Examples
julia> ProtoSyn.GMX.add_solvent("md_box.pdb", "md_sol.pdb")
(...)
ProtoSyn.GMX.add_ions
— Functionadd_ions(input_filename::String, output_filename::String; [mdp::String = joinpath(ProtoSyn.resource_dir, "ExternalPackages/GROMACS/mdps/ions.mdp")], [topol_filename::String = "topol.top"], [tpr_filename::String = "ions.tpr"], [positive_ion::String = "NA"], [negative_ion::String = "CL"], [number_of_positive_ions::Int = 0], [number_of_negative_ions::Int = 0], [neutral::Bool = true], [attempt_auto::Opt{Int} = nothing], [verbose::Bool = true])
Employ `gmx genion` to add ions to a given input file
(input_filename
), outputs to output_filename
. The file contents should be incorporated in a solvated bounding box (see add_bounding_box
and add_solvent
). Adds number_of_negative_ions
of negative_ion
and number_of_positive_ions
of positive_ion
. Optionally, if neutral
is set to true
, gmx genion
will add either positive_ion
or negative_ion
instances until neutral charge is achieved (reccomended). As a middle step, gmx genion
uses the given ions mdp
file and writes a temporary tpr_filename
. Add ions information (such as number of added molecules) to the given topol_filename
. If verbose
is set to false
(true
, by default), hide the GROMACS output. If an attempt_auto
is given, automatically chooses the SOL group for ion replacement (interactive, by default). Note that depending on the system, the SOL group number changes. For example, for a protein with ligand, the SOL group should be 15.
Examples
julia> ProtoSyn.GMX.add_ions("md_sol.pdb", "md_ready.pdb", attempt_auto = 15)
(...)