Input and Output (IO)

The following methods allow the user to load and export models and data from and to files, and build on top of the Core methods (See Input and Output (IO)). The main different in comparison with the Core module IO methods is the addition of parenthood inference and graph sorting according to IUPAC conventions.

ProtoSyn.Peptides.loadFunction
load([::Type{T}], filename::AbstractString; [bonds_by_distance::Bool = false], [alternative_location::String = "A"], [include_residues::Vector{String} = Vector{String}()], [ignore_residues::Vector{String} = Vector{String}()], [ignore_chains::Vector{String} = Vector{String}()], [sort_atoms_by_graph::Bool = false]) where {T <: AbstractFloat}

Load the given filename into a Pose, parametrized by T. If this is not provided, the default ProtoSyn.Units.defaultFloat is used instead. The file format is infered from the extension (See ProtoSyn.supported_formats for all supported formats). If bonds_by_distance is set to true (false, by default), the CONECT records will be complemented with bonds infered by distance. The threshold distances for each pair of atoms is defined in ProtoSyn.bond_lengths. Infers parenthood and ascedence from bonds (N-Residue instances have the connected C-Residue as child). By default, and when available, ProtoSyn will use alternative_location A, unless specified in the flag alternative_location. If the input file if of type PDB and a trajectory, returns a vector of Pose instances instead. If provided, ProtoSyn will ignore any Residue and Segment instances in ignore_residues and ignore_chains, respectivelly (by name). If a Residue instance is not found in ProtoSyn.Peptides.available_aminoacids (for example, a ligand or a non-canonical aminoacid), ProtoSyn will skip setting inter-residue parenthoods. This can be overwritten by adding the Residue name in include_residues, in which case ProtoSyn will attempt to find and established all possible inter-residue parenthood relationships. In more complex cases this should be manually checked. Despite the overall Pose's Graph, Atom order in the encompassing AbstractContainer is, by default, maintained the same as the input filename. This can se re-ordered to match the infered parenthood by setting the sort_atoms_by_graph flag to true (false, by default), in which case the ProtoSyn.sort_atoms_by_graph! method will be used (employing the ProtoSyn.Peptides.IUPAC search algorithm).

Note:

This function is an extension of ProtoSyn.load.

Examples

julia> ProtoSyn.Peptides.load("1ctf.pdb", bonds_by_distance = true)
Pose{Topology}(Topology{/2a3d:61708}, State{Float64}:
 Size: 1140
 i2c: false | c2i: false
 Energy: Dict(:Total => Inf)
)
source
Base.downloadFunction
ProtoSyn.Peptides.download([::Type{T}], pdb_code::String; [bonds_by_distance::Bool = false], [include_residues::Vector{String} = Vector{String}()], [ignore_residues::Vector{String} = Vector{String}()], [ignore_chains::Vector{String} = Vector{String}()], [sort_atoms_by_graph::Bool = true]) where {T <: AbstractFloat}

Download the PDB file (for the given PDB code) from the RCSB Protein Data Bank into a Pose. The downloaded file can be found in the current working directory. If T is specified, the downloaded file will be loaded into a Pose parametrized by T, otherwise uses the default ProtoSyn.Units.defaultFloat. Uses the specific Peptides.load method. For more information on the input arguments, check the load method documentation.

Examples

julia> ProtoSyn.download("2A3D")
source