Skip to content

Commit

Permalink
document a couple more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Aug 23, 2019
1 parent bec2914 commit 2db4edc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BioStructures"
uuid = "de9282ab-8554-53be-b2d6-f6c222edabfc"
authors = ["Joe G Greener <jgreener@hotmail.co.uk>"]
version = "0.5.0"
version = "0.5.1"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
114 changes: 59 additions & 55 deletions docs/src/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,43 +65,46 @@ See the [Biopython discussion](http://biopython.org/wiki/The_Biopython_Structura

Properties can be retrieved as follows:

| Function | Returns | Return type |
| :----------------- | :------------------------------------------------------------ | :------------------------------ |
| `serial` | Serial number of an atom | `Int` |
| `atomname` | Name of an atom | `String` |
| `altlocid` | Alternative location ID of an atom | `Char` |
| `x` | x coordinate of an atom | `Float64` |
| `y` | y coordinate of an atom | `Float64` |
| `z` | z coordinate of an atom | `Float64` |
| `coords` | coordinates of an atom | `Array{Float64,1}` |
| `occupancy` | Occupancy of an atom (default is `1.0`) | `Float64` |
| `tempfactor` | Temperature factor of an atom (default is `0.0`) | `Float64` |
| `element` | Element of an atom (default is `" "`) | `String` |
| `charge` | Charge of an atom (default is `" "`) | `String` |
| `residue` | Residue an atom belongs to | `Residue` |
| `ishetero` | `true` if the residue or atom is a hetero residue/atom | `Bool` |
| `isdisorderedatom` | `true` if the atom is disordered | `Bool` |
| `pdbline` | PDB ATOM/HETATM record for an atom | `String` |
| `resname` | Residue name of a residue or atom | `String` |
| `resnumber` | Residue number of a residue or atom | `Int` |
| `inscode` | Insertion code of a residue or atom | `Char` |
| `resid` | Residue ID of an atom or residue (`full=true` includes chain) | `String` |
| `atomnames` | Atom names of the atoms in a residue, sorted by serial | `Array{String,1}` |
| `atoms` | Dictionary of atoms in a residue | `Dict{String, AbstractAtom}` |
| `isdisorderedres` | `true` if the residue has multiple residue names | `Bool` |
| `disorderedres` | Access a particular residue name in a `DisorderedResidue` | `Residue` |
| `chain` | Chain a residue or atom belongs to | `Chain` |
| `chainid` | Chain ID of a chain, residue or atom | `String` |
| `resids` | Sorted residue IDs in a chain | `Array{String,1}` |
| `residues` | Dictionary of residues in a chain | `Dict{String, AbstractResidue}` |
| `model` | Model a chain, residue or atom belongs to | `Model` |
| `modelnumber` | Model number of a model, chain, residue or atom | `Int` |
| `chainids` | Sorted chain IDs in a model or structure | `Array{String,1}` |
| `chains` | Dictionary of chains in a model or structure | `Dict{String, Chain}` |
| `structure` | Structure a model, chain, residue or atom belongs to | `ProteinStructure` |
| `structurename` | Name of the structure an element belongs to | `String` |
| `modelnumbers` | Sorted model numbers in a structure | `Array{Int,1}` |
| `models` | Dictionary of models in a structure | `Dict{Int, Model}` |
| Function | Returns | Return type |
| :------------------- | :------------------------------------------------------------ | :------------------------------ |
| `serial` | Serial number of an atom | `Int` |
| `atomname` | Name of an atom | `String` |
| `altlocid` | Alternative location ID of an atom | `Char` |
| `altlocids` | All alternative location IDs in a `DisorderedAtom` | `Array{Char,1}` |
| `x` | x coordinate of an atom | `Float64` |
| `y` | y coordinate of an atom | `Float64` |
| `z` | z coordinate of an atom | `Float64` |
| `coords` | coordinates of an atom | `Array{Float64,1}` |
| `occupancy` | Occupancy of an atom (default is `1.0`) | `Float64` |
| `tempfactor` | Temperature factor of an atom (default is `0.0`) | `Float64` |
| `element` | Element of an atom (default is `" "`) | `String` |
| `charge` | Charge of an atom (default is `" "`) | `String` |
| `residue` | Residue an atom belongs to | `Residue` |
| `ishetero` | `true` if the residue or atom is a hetero residue/atom | `Bool` |
| `isdisorderedatom` | `true` if the atom is disordered | `Bool` |
| `pdbline` | PDB ATOM/HETATM record for an atom | `String` |
| `resname` | Residue name of a residue or atom | `String` |
| `resnames` | All residue names in a `DisorderedResidue` | `Array{String,1}` |
| `resnumber` | Residue number of a residue or atom | `Int` |
| `sequentialresidues` | Determine if the second residue follows the first in sequence | `Bool` |
| `inscode` | Insertion code of a residue or atom | `Char` |
| `resid` | Residue ID of an atom or residue (`full=true` includes chain) | `String` |
| `atomnames` | Atom names of the atoms in a residue, sorted by serial | `Array{String,1}` |
| `atoms` | Dictionary of atoms in a residue | `Dict{String, AbstractAtom}` |
| `isdisorderedres` | `true` if the residue has multiple residue names | `Bool` |
| `disorderedres` | Access a particular residue name in a `DisorderedResidue` | `Residue` |
| `chain` | Chain a residue or atom belongs to | `Chain` |
| `chainid` | Chain ID of a chain, residue or atom | `String` |
| `resids` | Sorted residue IDs in a chain | `Array{String,1}` |
| `residues` | Dictionary of residues in a chain | `Dict{String, AbstractResidue}` |
| `model` | Model a chain, residue or atom belongs to | `Model` |
| `modelnumber` | Model number of a model, chain, residue or atom | `Int` |
| `chainids` | Sorted chain IDs in a model or structure | `Array{String,1}` |
| `chains` | Dictionary of chains in a model or structure | `Dict{String, Chain}` |
| `structure` | Structure a model, chain, residue or atom belongs to | `ProteinStructure` |
| `structurename` | Name of the structure an element belongs to | `String` |
| `modelnumbers` | Sorted model numbers in a structure | `Array{Int,1}` |
| `models` | Dictionary of models in a structure | `Dict{Int, Model}` |

The `strip` keyword argument determines whether surrounding whitespace is stripped for `atomname`, `element`, `charge`, `resname` and `atomnames` (default `true`).

Expand Down Expand Up @@ -203,24 +206,25 @@ See [BioSequences.jl](https://github.com/BioJulia/BioSequences.jl) for more on h

Various functions are provided to calculate spatial quantities for proteins:

| Command | Returns |
| :------------------- | :---------------------------------------------------------------------------------------------- |
| `distance` | Minimum distance between two elements |
| `sqdistance` | Minimum square distance between two elements |
| `bondangle` | Angle between three atoms |
| `dihedralangle` | Dihedral angle defined by four atoms |
| `omegaangle` | Omega dihedral angle between a residue and the previous residue |
| `phiangle` | Phi dihedral angle between a residue and the previous residue |
| `psiangle` | Psi dihedral angle between a residue and the next residue |
| `omegaangles` | `Vector` of omega dihedral angles of an element |
| `phiangles` | `Vector` of phi dihedral angles of an element |
| `psiangles` | `Vector` of psi dihedral angles of an element |
| `ramachandranangles` | `Vector`s of phi and psi angles of an element |
| `ContactMap` | `ContactMap` of two elements, or one element with itself |
| `DistanceMap` | `DistanceMap` of two elements, or one element with itself |
| `showcontactmap` | Print a representation of a `ContactMap` to `stdout` or a specified `IO` instance |
| `rmsd` | RMSD between two elements of the same size - assumes they are superimposed |
| `displacements` | `Vector` of displacements between two elements of the same size - assumes they are superimposed |
| Command | Returns |
| :------------------- | :----------------------------------------------------------------------------------------------- |
| `distance` | Minimum distance between two elements |
| `sqdistance` | Minimum square distance between two elements |
| `coordarray` | Atomic coordinates in Å of an element as a 2D `Array` with each column corresponding to one atom |
| `bondangle` | Angle between three atoms |
| `dihedralangle` | Dihedral angle defined by four atoms |
| `omegaangle` | Omega dihedral angle between a residue and the previous residue |
| `phiangle` | Phi dihedral angle between a residue and the previous residue |
| `psiangle` | Psi dihedral angle between a residue and the next residue |
| `omegaangles` | `Vector` of omega dihedral angles of an element |
| `phiangles` | `Vector` of phi dihedral angles of an element |
| `psiangles` | `Vector` of psi dihedral angles of an element |
| `ramachandranangles` | `Vector`s of phi and psi angles of an element |
| `ContactMap` | `ContactMap` of two elements, or one element with itself |
| `DistanceMap` | `DistanceMap` of two elements, or one element with itself |
| `showcontactmap` | Print a representation of a `ContactMap` to `stdout` or a specified `IO` instance |
| `rmsd` | RMSD between two elements of the same size - assumes they are superimposed |
| `displacements` | `Vector` of displacements between two elements of the same size - assumes they are superimposed |

The `omegaangle`, `phiangle` and `psiangle` functions can take either a pair of residues or a chain and a position.
The `omegaangle` and `phiangle` functions measure the angle between the residue at the given index and the one before.
Expand Down

2 comments on commit 2db4edc

@jgreener64
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/2899

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 2db4edc42815479a635adc45be97898b8c0d03c5
git push origin v0.5.1

Please sign in to comment.