Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gp0 committed Mar 24, 2015
1 parent 7cf184e commit 779a4df
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
5 changes: 4 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ The project consists of several modules which can be used like this:
```julia
using BiomolecularStructures.<ModuleName>
```
e.g. ```julia using BiomolecularStructures.Kabsch```
e.g.
```julia
using BiomolecularStructures.Kabsch
```
22 changes: 16 additions & 6 deletions docs/kabsch.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ julia> kabsch_rmsd(P, Q)

## Exported functions

```julia rmsd(A::Array{Float64,2}, B::Array{Float64,2}) ```
```julia
rmsd(A::Array{Float64,2}, B::Array{Float64,2})
```

Calculates the root mean square deviation of two matrices A and B in using the following formula:

![RMSD formula](assets/kabsch/rmsd.png)

### `calc_centroid(m::Array{Float64,2})`
```julia
calc_centroid(m::Array{Float64,2})
```

Returns the centroid of a matrix m as a [x y z] vector (An ```Array{Float54,2}```).

### `translate_points(P::Array{Float64,2}, Q::Array{Float64,2})`
```julia
translate_points(P::Array{Float64,2}, Q::Array{Float64,2})
```

Translates two matrices P, Q so that their centroids are equal to the origin of the coordinate system.

### `kabsch(reference::Array{Float64,2},coords::Array{Float64,2})`
```julia
kabsch(reference::Array{Float64,2},coords::Array{Float64,2})
```

Calculates the optimal rotation matrix of two matrices P, Q.
Using `translate_points` it shifts the matrices' centroids to the origin of the coordinate system, then computes the covariance matrix A:
Using ```translate_points``` it shifts the matrices' centroids to the origin of the coordinate system, then computes the covariance matrix A:

![Covariance Formula](assets/kabsch/cov.png)

Expand All @@ -61,7 +69,9 @@ The last two steps are translating U so that the superimposed matrix will "fit"

The function returns the superimposed matrix.

### `kabsch_rmsd(P::Array{Float64,2}, Q::Array{Float64,2})`
```julia
kabsch_rmsd(P::Array{Float64,2}, Q::Array{Float64,2})
```
Directly returns the RMSD after rotation for convenience.

## Background
Expand Down
12 changes: 9 additions & 3 deletions docs/pdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ The PDB module provides utility functions to deal with [PDB (Protein Data Bank)]

## Exported functions

```julia get_structure(filename::String)```
```julia
get_structure(filename::String)
```

Parses a PDB file and returns a structure PyObject.

```get_chains(structure::PyObject)```
```julia
get_chains(structure::PyObject)
```

Gets the chains of protein structure from a BioPython PyObject and returns an Array of Array{Float64,2} matrices.

```structure_to_matrix(structure::PyObject)```
```julia
structure_to_matrix(structure::PyObject)
```

Converts a BioPython structure to a Array{Float64,2} matrix.
4 changes: 3 additions & 1 deletion docs/plot.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Provides a utility function to plot two matrices P, Q

## Exported functions

```julia matrices_plot(P::Array{Float64,2},Q::Array{Float64,2})```
```julia
matrices_plot(P::Array{Float64,2},Q::Array{Float64,2})
```

Plots two matrices P, Q. Example output:

Expand Down

0 comments on commit 779a4df

Please sign in to comment.