From ed0b22ba5ce1812dd2d5f683ef8c00073f075ee4 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 4 Mar 2024 09:13:07 +0000 Subject: [PATCH] build based on 3250c66 --- dev/fileio/index.html | 4 +-- dev/free_energy_surface/index.html | 2 +- dev/getting_started01/index.html | 2 +- dev/getting_started02/index.html | 2 +- dev/getting_started03/index.html | 2 +- dev/index.html | 2 +- dev/installation/index.html | 2 +- dev/mbar/index.html | 2 +- dev/msm/index.html | 14 ++++----- dev/reduction/index.html | 10 +++--- dev/search/index.html | 2 +- dev/structure/index.html | 42 +++++++++++++------------- dev/superimpose_rmsd/index.html | 2 +- dev/wham/index.html | 2 +- dev/wham_example/index.html | 2 +- dev/workflow_for_developers/index.html | 2 +- 16 files changed, 47 insertions(+), 47 deletions(-) diff --git a/dev/fileio/index.html b/dev/fileio/index.html index 00435c9..c7965a5 100644 --- a/dev/fileio/index.html +++ b/dev/fileio/index.html @@ -1,4 +1,4 @@ File IO · MDToolbox.jl

File IO

MDToolbox.mdloadMethod
mdload(filename::AbstractString; index=nothing, top::TrjArray=nothing) -> ta::TrjArray

Function for reading bimolecular structure files or molecular dynamics trajectories. This function automatically detects files types from the filename extension of input filename. Currently, PDB, PSF, DCD, NetCDF, and namdbin(namd restart file) formats are available. For reading subset atoms from the trajectory files, the user can specify atom indices as index::AbstractVector{Int}. Returns a TrjArray variable ta.

If the user wants to attach a topology information read from PSF, PDB, or other files to MD trajectory, the user can give an addtional option top=ta:TrjArray. If the option is given the topology information is applied.

Example

julia> ta = mdload("1ake.psf")
-julia> ta = mdload("1ake.dcd", top=ta)
source
MDToolbox.mdsaveMethod
mdsave(filename::AbstractString, ta::TrjArray)

Function for writing bimolecular structure files or molecular dynamics trajectories. This function automatically detects files types from the filename extension of input filename. Currently, PDB, PSF, NetCDF, and namdbin(namd restart file) formats are available.

Example

julia> ta = TrjArray(xyz=randn(100, 9))
-julia> ta = mdsave("1ake.nc", ta)
source
+julia> ta = mdload("1ake.dcd", top=ta)source
MDToolbox.mdsaveMethod
mdsave(filename::AbstractString, ta::TrjArray)

Function for writing bimolecular structure files or molecular dynamics trajectories. This function automatically detects files types from the filename extension of input filename. Currently, PDB, PSF, NetCDF, and namdbin(namd restart file) formats are available.

Example

julia> ta = TrjArray(xyz=randn(100, 9))
+julia> ta = mdsave("1ake.nc", ta)
source
diff --git a/dev/free_energy_surface/index.html b/dev/free_energy_surface/index.html index 893c12a..bf98e95 100644 --- a/dev/free_energy_surface/index.html +++ b/dev/free_energy_surface/index.html @@ -117,4 +117,4 @@ ax.grid(linestyle="--", linewidth=0.5); tight_layout(); -savefig("free_energy_surface02.png", dpi=350, bbox_inches="tight");

png

+savefig("free_energy_surface02.png", dpi=350, bbox_inches="tight");

png

diff --git a/dev/getting_started01/index.html b/dev/getting_started01/index.html index 17aefa2..2bca936 100644 --- a/dev/getting_started01/index.html +++ b/dev/getting_started01/index.html @@ -21,4 +21,4 @@ # the topology information can be attached by the option `top=t` t = mdload("run.dcd", top=t) # after some calculations -mdsave("run_edit.dcd", t)

GROMACS files

not available yet
+mdsave("run_edit.dcd", t)

GROMACS files

not available yet
diff --git a/dev/getting_started02/index.html b/dev/getting_started02/index.html index 8d23a87..2607a1c 100644 --- a/dev/getting_started02/index.html +++ b/dev/getting_started02/index.html @@ -75,4 +75,4 @@ 10.754 12.452 12.803 - 11.088

TrjArray containes the following variables:

variable nametypecontent
natomIntThe number of atoms
nframeIntThe number of frames or structures
xyznframe x (natom*3) Matrix{Float}XYZ coordinates of atoms
boxsizenframe x 3 Matrix{Float}XYZ size of simulation box
chainnamenatom Vector{String}Chain names
chainidnatom Vector{Int}Chain IDs
resnamenatom Vector{String}Resisude names
residnatom Vector{Int}Residue IDs
atomnamenatom Vector{String}Atom names
atomidnatom Vector{Int}Atom IDs
massnatom Vector{Float}Masses
radiusnatom Vector{Float}VDW radii of atoms
chargenatom Vector{Float}Partial chages of atoms
sasanatom Vector{Float}Solvent accessible surface areas
list_bondnbond x 2 Matrix{Int}Atom ID pairs for bonds
list_anglenangle x 2 Matrix{Int}Atom ID triples for angles
list_dihedralndihedral x 2 Matrix{Int}Atom ID quadruplets for dihedrals
list_impropernimproper x 2 Matrix{Int}Atom ID quadruplets for impropers
list_cmapncmap x 2 Matrix{Int}Atom ID quadruplets for cmaps
+ 11.088

TrjArray containes the following variables:

variable nametypecontent
natomIntThe number of atoms
nframeIntThe number of frames or structures
xyznframe x (natom*3) Matrix{Float}XYZ coordinates of atoms
boxsizenframe x 3 Matrix{Float}XYZ size of simulation box
chainnamenatom Vector{String}Chain names
chainidnatom Vector{Int}Chain IDs
resnamenatom Vector{String}Resisude names
residnatom Vector{Int}Residue IDs
atomnamenatom Vector{String}Atom names
atomidnatom Vector{Int}Atom IDs
massnatom Vector{Float}Masses
radiusnatom Vector{Float}VDW radii of atoms
chargenatom Vector{Float}Partial chages of atoms
sasanatom Vector{Float}Solvent accessible surface areas
list_bondnbond x 2 Matrix{Int}Atom ID pairs for bonds
list_anglenangle x 2 Matrix{Int}Atom ID triples for angles
list_dihedralndihedral x 2 Matrix{Int}Atom ID quadruplets for dihedrals
list_impropernimproper x 2 Matrix{Int}Atom ID quadruplets for impropers
list_cmapncmap x 2 Matrix{Int}Atom ID quadruplets for cmaps
diff --git a/dev/getting_started03/index.html b/dev/getting_started03/index.html index 0f02b64..25d795e 100644 --- a/dev/getting_started03/index.html +++ b/dev/getting_started03/index.html @@ -109,4 +109,4 @@ | ⋮ | ⋮ | ⋱ ⋮ | | -12.06 -3.41 5.11 | -8.63 -2.73 6.65 | -11.07 2.11 3.15 | | -12.34 -3.00 5.02 | -8.86 -2.42 6.49 | … -11.11 2.25 3.12 | - | -12.23 -3.33 5.62 | -8.71 -2.59 6.92 | -11.02 2.10 3.14 |

The following keywords are avaiable for atom selections by strings

keywordsdescriptionexamples
chainnamespecify chain nameschainname A chainname A B
chainidspecify chain IDschainid 1 chainid 1:3 chainid 1:3 5
resnamespecify residue namesresname ARG resname GLU ASP
residspecify residue IDsresid 1 resid 1:3 resid 1:3 5
atomnamespecify atom namesatomname CA atomname C N O CA
atomidspecify atom IDsatomid 1 atomid 1:3 atomid 1:3 5
proteinselect proteinsprotein
solventselect solventssolvent
waterselect water molecueswater
hydrogenselect hydrogenshydrogen
+ | -12.23 -3.33 5.62 | -8.71 -2.59 6.92 | -11.02 2.10 3.14 |

The following keywords are avaiable for atom selections by strings

keywordsdescriptionexamples
chainnamespecify chain nameschainname A chainname A B
chainidspecify chain IDschainid 1 chainid 1:3 chainid 1:3 5
resnamespecify residue namesresname ARG resname GLU ASP
residspecify residue IDsresid 1 resid 1:3 resid 1:3 5
atomnamespecify atom namesatomname CA atomname C N O CA
atomidspecify atom IDsatomid 1 atomid 1:3 atomid 1:3 5
proteinselect proteinsprotein
solventselect solventssolvent
waterselect water molecueswater
hydrogenselect hydrogenshydrogen
diff --git a/dev/index.html b/dev/index.html index 973b7f6..e33ee6e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -MDToolbox.jl · MDToolbox.jl

MDToolbox.jl

What is MDToolbox.jl?

MDToolbox.jl is a pure Julia package for molecular dynamics (MD) trajectories analysis and modeling of biomolecules. The package contains functions covering the following types of scientific computations:

  • I/O for trajectory, coordinate, and topology files used for MD simulations
  • Unique type (TrjArray) for storing and processing MD trajectory data
  • Flexible atom selections
  • Various structural computations, including the least-squares fitting of structures, atom distances, angles, dihedrals, etc.
  • Potential of mean force (PMF) or free energy profile from unbiased MD trajectories
  • Statistical estimates (WHAM and MBAR methods) from biased MD trajectories
  • Dimensional reductions (Principal Component Analysis, and others)
  • Markov state model, etc.

Some functions have been imported to this package from our old MATLAB/Octave toolbox https://github.com/ymatsunaga/mdtoolbox

Citations

In preparation

License

MDToolbox.jl is licensed under the BSD 3-Clause License.

Contents

+MDToolbox.jl · MDToolbox.jl

MDToolbox.jl

What is MDToolbox.jl?

MDToolbox.jl is a pure Julia package for molecular dynamics (MD) trajectories analysis and modeling of biomolecules. The package contains functions covering the following types of scientific computations:

  • I/O for trajectory, coordinate, and topology files used for MD simulations
  • Unique type (TrjArray) for storing and processing MD trajectory data
  • Flexible atom selections
  • Various structural computations, including the least-squares fitting of structures, atom distances, angles, dihedrals, etc.
  • Potential of mean force (PMF) or free energy profile from unbiased MD trajectories
  • Statistical estimates (WHAM and MBAR methods) from biased MD trajectories
  • Dimensional reductions (Principal Component Analysis, and others)
  • Markov state model, etc.

Some functions have been imported to this package from our old MATLAB/Octave toolbox https://github.com/ymatsunaga/mdtoolbox

Citations

In preparation

License

MDToolbox.jl is licensed under the BSD 3-Clause License.

Contents

diff --git a/dev/installation/index.html b/dev/installation/index.html index 09ceb49..ac03c87 100644 --- a/dev/installation/index.html +++ b/dev/installation/index.html @@ -4,4 +4,4 @@ $ docker run -it --rm -v "$PWD":/home/jovyan/work matsunagalab/mdtoolbox julia ## JupyterLab -$ docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan matsunagalab/mdtoolbox +$ docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan matsunagalab/mdtoolbox diff --git a/dev/mbar/index.html b/dev/mbar/index.html index 14f81f4..dce0e85 100644 --- a/dev/mbar/index.html +++ b/dev/mbar/index.html @@ -1,2 +1,2 @@ -MBAR (Multistate Bennett acceptance ratio) · MDToolbox.jl

MBAR (Multistate Bennett acceptance ratio)

MDToolbox.mbarMethod
mbar(u_kl; tol=1e-8, iterations_self=10) -> F

Estimates the free energy differences between different thermodynamnic states by using the Multistate Bennet Acceptance Ratio Method (MBAR). Let K be # of thermodynamic states. u_kl is a K x K Array whose elements are reduced bias-factors or potential energies of state k evaluated at state l. Solvs the MBAR equations by applying self-consistent iterations iterations_self times, followed by the Newton-Raphson iterations. The iteration stops when the difference from the previous falls below the threshold tol.

Returns dimensionless free energies f_k whose elements corresponds to thermodynamics state k.

Example

see Juypter notebooks in MDToolbox.jl/examples/

References

M. R. Shirts and J. D. Chodera, J. Chem. Phys. 129, 124105 (2008).
source
+MBAR (Multistate Bennett acceptance ratio) · MDToolbox.jl

MBAR (Multistate Bennett acceptance ratio)

MDToolbox.mbarMethod
mbar(u_kl; tol=1e-8, iterations_self=10) -> F

Estimates the free energy differences between different thermodynamnic states by using the Multistate Bennet Acceptance Ratio Method (MBAR). Let K be # of thermodynamic states. u_kl is a K x K Array whose elements are reduced bias-factors or potential energies of state k evaluated at state l. Solvs the MBAR equations by applying self-consistent iterations iterations_self times, followed by the Newton-Raphson iterations. The iteration stops when the difference from the previous falls below the threshold tol.

Returns dimensionless free energies f_k whose elements corresponds to thermodynamics state k.

Example

see Juypter notebooks in MDToolbox.jl/examples/

References

M. R. Shirts and J. D. Chodera, J. Chem. Phys. 129, 124105 (2008).
source
diff --git a/dev/msm/index.html b/dev/msm/index.html index bd3e972..81c4e12 100644 --- a/dev/msm/index.html +++ b/dev/msm/index.html @@ -1,25 +1,25 @@ Makorv state models · MDToolbox.jl

Makorv state models

MDToolbox.msmgenerateMethod
msmgenerate(nframe::Int, T, pi_i)
             states = zeros(typeof(nframe), nframe)

Randomly samples a state trajectory from the the given transition matrix, and equilibrium probabilities of states.

Examples

julia> T, pi_i = msmtransitionmatrix(C)
-julia> states = msmgenerate(1000, T, pi_i)
source
MDToolbox.msmgenerateMethod
msmgenerate(nframe, T, pi_i, emission) -> states, observations

Randomly samples a state trajectory and observations from the given transition matrix, equilibrium probabilities of states, and emissions.

Examples

julia> T, pi_i = msmtransitionmatrix(C)
-julia> states, observations = msmgenerate(1000, T, pi_i, emission)
source
MDToolbox.msmcountmatrixMethod
msmcountmatrix(indexOfCluster; tau=1) -> C::Matrix

Transition count matrix from a sinlgle binned trajectory or a set of binned trajectories. indexOfCluster is a vector or a set of vectors containing binned trajectorie(s). Returns count matrix for transitions from state i to state j in a time step of tau.

Examples

julia> ta = mdload("ak.dcd")
+julia> states = msmgenerate(1000, T, pi_i)
source
MDToolbox.msmgenerateMethod
msmgenerate(nframe, T, pi_i, emission) -> states, observations

Randomly samples a state trajectory and observations from the given transition matrix, equilibrium probabilities of states, and emissions.

Examples

julia> T, pi_i = msmtransitionmatrix(C)
+julia> states, observations = msmgenerate(1000, T, pi_i, emission)
source
MDToolbox.msmcountmatrixMethod
msmcountmatrix(indexOfCluster; tau=1) -> C::Matrix

Transition count matrix from a sinlgle binned trajectory or a set of binned trajectories. indexOfCluster is a vector or a set of vectors containing binned trajectorie(s). Returns count matrix for transitions from state i to state j in a time step of tau.

Examples

julia> ta = mdload("ak.dcd")
 julia> X = compute_distancemap(ta["atomname CA"])
 julia> F = clusterkcenters(X)
-julia> c = msmcountmatrix(F.indexOfCluster, tau=10)
source
MDToolbox.msmtransitionmatrixMethod
msmtransitionmatrix(C; TOLERANCE=10^(-4), verbose=true) -> T::Matrix, p::Vector

Estimate the transition probability matrix from count matrix C. Detailed balance is implicitly imposed in the estimation.

Returns the transition probability matrix and the equilibrium probabilities of states.

Examples

julia> ta = mdload("ak.dcd")
+julia> c = msmcountmatrix(F.indexOfCluster, tau=10)
source
MDToolbox.msmtransitionmatrixMethod
msmtransitionmatrix(C; TOLERANCE=10^(-4), verbose=true) -> T::Matrix, p::Vector

Estimate the transition probability matrix from count matrix C. Detailed balance is implicitly imposed in the estimation.

Returns the transition probability matrix and the equilibrium probabilities of states.

Examples

julia> ta = mdload("ak.dcd")
 julia> X = compute_distancemap(ta["atomname CA"])
 julia> F = clusterkcenters(X)
 julia> C = msmcountmatrix(F.indexOfCluster, tau=10)
 julia> T, p = msmtransitionmatrix(C)

References

This routines uses the reversible maximum likelihood estimator described in 
 K. A. Beauchamp, G. R. Bowman, T. J. Lane, L. Maibaum, I. S. Haque, and V. S. Pande, 
 MSMBuilder2: Modeling Conformational Dynamics on the Picosecond to Millisecond Scale, 
-J. Chem. Theory Comput. 7, 3412 (2011).
source
MDToolbox.msmviterbiMethod
msmviterbi(observation, T, p, log_emission) -> states::Vector

Viterbi algorithm estimates the most probable hidden state sequence from the observation data. observations is a set of observed vectors. T, p are the transition probabilities and equilibrium probabilities, respectively. log_emission is a matrix whose rows correspond to states, and columns correspond to observations.

Returns the maximum likelihood state sequence.

Examples

julia> nframe = 1000
+J. Chem. Theory Comput. 7, 3412 (2011).
source
MDToolbox.msmviterbiMethod
msmviterbi(observation, T, p, log_emission) -> states::Vector

Viterbi algorithm estimates the most probable hidden state sequence from the observation data. observations is a set of observed vectors. T, p are the transition probabilities and equilibrium probabilities, respectively. log_emission is a matrix whose rows correspond to states, and columns correspond to observations.

Returns the maximum likelihood state sequence.

Examples

julia> nframe = 1000
 julia> states, observations = msmgenerate(nframe, T, pi_i, emission)
-julia> states_estimated = msmviterbi(T, pi_i, emission, observation)
source
MDToolbox.msmbaumwelchMethod
msmbaumwelch(observations, T_init, p_init, emission_init; TOLERANCE=10.0^(-4), MAXITERATION=Inf64) -> T::Matrix, p::Vector, emission::Matrix

Baum-Welch algorithm estimates the most probable transition probabilities from the given observation data. In this function, detailed balance is implicitly imposed in the estimation, so the equilibrium probabilities can be determined from the estimated transition probabilities. Also, unlike the original Baum-Welch algorithm, the emission is NOT estimated in this function, because the emission probabilites are usually known a priori in cases of molecular experiments. observations is a set of observed vectors. T_init, p_init are initial transition probabilities and equilibrium probabilities, respectively. emission_init is a matrix whose rows correspond to states, and columns correspond to observations.

Returns the transition probability matrix, the equilibrium probabilities of states, and the emission probabilities (though the emission does not change).

Examples

julia> ta = mdload("ak.dcd")
+julia> states_estimated = msmviterbi(T, pi_i, emission, observation)
source
MDToolbox.msmbaumwelchMethod
msmbaumwelch(observations, T_init, p_init, emission_init; TOLERANCE=10.0^(-4), MAXITERATION=Inf64) -> T::Matrix, p::Vector, emission::Matrix

Baum-Welch algorithm estimates the most probable transition probabilities from the given observation data. In this function, detailed balance is implicitly imposed in the estimation, so the equilibrium probabilities can be determined from the estimated transition probabilities. Also, unlike the original Baum-Welch algorithm, the emission is NOT estimated in this function, because the emission probabilites are usually known a priori in cases of molecular experiments. observations is a set of observed vectors. T_init, p_init are initial transition probabilities and equilibrium probabilities, respectively. emission_init is a matrix whose rows correspond to states, and columns correspond to observations.

Returns the transition probability matrix, the equilibrium probabilities of states, and the emission probabilities (though the emission does not change).

Examples

julia> ta = mdload("ak.dcd")
 julia> X = compute_distancemap(ta["atomname CA"])
 julia> F = clusterkcenters(X)
 julia> C = msmcountmatrix(F.indexOfCluster, tau=10)
-julia> T, p = msmtransitionmatrix(C)

References

The algorithm of this routines is based on the descriptions in PRML book by C. Bishop. 
source
MDToolbox.msmplotMethod
msmplot(T; pi_i=nothing, x=nothing, y=nothing, filename=nothing, 
+julia> T, p = msmtransitionmatrix(C)

References

The algorithm of this routines is based on the descriptions in PRML book by C. Bishop. 
source
MDToolbox.msmplotMethod
msmplot(T; pi_i=nothing, x=nothing, y=nothing, filename=nothing, 
         edgewidth_scale=10.0, arrow_scale=0.1, nodesize=0.5, fontsize=10, names=[], dpi=100)

Visualize the graphical structure of the given Markov state model parameters. T is a transition probability matrix whose elements Tij represents the probablity of transition from state i to j. T should satisfy the detailed balance condition. pi_i is a vector whose elements are equilibrium probabilities of states. x and y are X and Y coordinates of states, respectively.

Examples

julia> nstate = 5
 julia> T, pi_i = msmtransitionmatrix(rand(nstate, nstate))
 julia> x = rand(nstate); y = rand(nstate)
-julia> msmplot(T, pi_i=pi_i, x=x, y=y)
source
+julia> msmplot(T, pi_i=pi_i, x=x, y=y)source diff --git a/dev/reduction/index.html b/dev/reduction/index.html index 1d2727d..90b42f5 100644 --- a/dev/reduction/index.html +++ b/dev/reduction/index.html @@ -4,19 +4,19 @@ julia> F = clusterkcenters(X, 3) julia> scatter(X[:, 1], X[:, 2], c=F.indexOfCluster)

References

This function uses the method described in
 [1] S. Dasgupta and P. M. Long, J. Comput. Syst. Sci. 70, 555 (2005).
-[2] J. Sun, Y. Yao, X. Huang, V. Pande, G. Carlsson, and L. J. Guibas, Learning 24, 2 (2009).
source
MDToolbox.clusterkcentersMethod
clusterkcenters(ta::AbstractMatrix, kcluster::Int; nReplicates::Int=10) -> F

Perform clustering with K-center algorithm for a TrjArray variable ta.

source
MDToolbox.compute_covMethod
compute_cov(ta::AbstractMatrix, lagtime::Int=0) -> cov

Compute a variance-covariance or time-lagged covariance matrix from input data X Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames. Optional input is the lagtime=lagtime for the calculation of the covariance matrix (default is lagtime=0).

Example

julia> X = rand(1000, 100)
-julia> cov = compute_cov(X)
source
MDToolbox.rsvdFunction
rsvd(X::AbstractMatrix; k::Number=10) -> F

Perform the randomized SVD for input data X. Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames. Users can specify the dimension k of subspace onto which the data is randomly projected (by default k=10).

Returns a NamedTuple object F whose members are same as usual SVD, F.V, F.S, F.U.

Example

julia> X = randn(rand(1000, 10))
+[2] J. Sun, Y. Yao, X. Huang, V. Pande, G. Carlsson, and L. J. Guibas, Learning 24, 2 (2009).
source
MDToolbox.clusterkcentersMethod
clusterkcenters(ta::AbstractMatrix, kcluster::Int; nReplicates::Int=10) -> F

Perform clustering with K-center algorithm for a TrjArray variable ta.

source
MDToolbox.compute_covMethod
compute_cov(ta::AbstractMatrix, lagtime::Int=0) -> cov

Compute a variance-covariance or time-lagged covariance matrix from input data X Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames. Optional input is the lagtime=lagtime for the calculation of the covariance matrix (default is lagtime=0).

Example

julia> X = rand(1000, 100)
+julia> cov = compute_cov(X)
source
MDToolbox.rsvdFunction
rsvd(X::AbstractMatrix; k::Number=10) -> F

Perform the randomized SVD for input data X. Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames. Users can specify the dimension k of subspace onto which the data is randomly projected (by default k=10).

Returns a NamedTuple object F whose members are same as usual SVD, F.V, F.S, F.U.

Example

julia> X = randn(rand(1000, 10))
 julia> F = rsvd(X)

References

Halko, Nathan, Per-Gunnar Martinsson, and Joel A. Tropp. 
 "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions." 
-SIAM review 53.2 (2011): 217-288.
source
MDToolbox.pcaMethod
pca(X::AbstractMatrix; k=dimension) -> F

Perform principal component analysis (PCA). PCA captures degrees of freedom which have the largest variances. Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames.

Returns a NamedTuple object F which contains the principal components in F.projection, the prncipal modes in the columns of the matrix F.mode, and the variances of principal components in F.variance.

If k=dimension is specified, the randomized SVD is used for reducing memory. This algorithm first project the data into a randomly selected k+2-dimensional space, then PCA is performed in the projected data. See the references for details. Note that if the dimension of X is larger than 5000, the randomized SVD is forcibly used with k=1000.

Example

julia> using MDToolbox, Plots, Statistics
+SIAM review 53.2 (2011): 217-288.
source
MDToolbox.pcaMethod
pca(X::AbstractMatrix; k=dimension) -> F

Perform principal component analysis (PCA). PCA captures degrees of freedom which have the largest variances. Input data X should belong to AbstractMatrix type and its columns corresponds to variables, rows are frames.

Returns a NamedTuple object F which contains the principal components in F.projection, the prncipal modes in the columns of the matrix F.mode, and the variances of principal components in F.variance.

If k=dimension is specified, the randomized SVD is used for reducing memory. This algorithm first project the data into a randomly selected k+2-dimensional space, then PCA is performed in the projected data. See the references for details. Note that if the dimension of X is larger than 5000, the randomized SVD is forcibly used with k=1000.

Example

julia> using MDToolbox, Plots, Statistics
 julia> X = cumsum(rand(1000, 10))
 julia> F = pca(X)
 julia> plot(F.projection[:, 1], F.projection[:, 2])

References

Halko, N., Martinsson, P.-G., Shkolnisky, Y. & Tygert, M. 
 An Algorithm for the Principal Component Analysis of Large Data Sets. 
-SIAM J. Sci. Comput. 33, 2580–2594 (2011).
source
MDToolbox.ticaFunction
tica(X::AbstractMatrix, lagtime::Int=1) -> F

This routine performs time-structure based Independent Component Analysis (tICA). tICA captures degrees of freedom which are most important in the sense that their motions are very slow. X belongs to AbstractMatrix type and its columns corresponds to variables, rows are frames. User should specify the lagtime for the calculation of the time-lagged covariance matrix. Returns a NamedTuple object F which contains independent components in F.projection, the independent modes in the columns of the matrix F.mode, and the eigenvalues in F.variance.

If the dimension of X is larger than 5000, the randomized SVD approximation is forcibly used with k=1000 to reduce memory.

Example

julia> using MDToolbox, Plots, Statistics
+SIAM J. Sci. Comput. 33, 2580–2594 (2011).
source
MDToolbox.ticaFunction
tica(X::AbstractMatrix, lagtime::Int=1) -> F

This routine performs time-structure based Independent Component Analysis (tICA). tICA captures degrees of freedom which are most important in the sense that their motions are very slow. X belongs to AbstractMatrix type and its columns corresponds to variables, rows are frames. User should specify the lagtime for the calculation of the time-lagged covariance matrix. Returns a NamedTuple object F which contains independent components in F.projection, the independent modes in the columns of the matrix F.mode, and the eigenvalues in F.variance.

If the dimension of X is larger than 5000, the randomized SVD approximation is forcibly used with k=1000 to reduce memory.

Example

julia> using MDToolbox, Plots, Statistics
 julia> X = cumsum(rand(1000, 10))
 julia> F = tica(X, 10)
 julia> plot(F.projection[:, 1], F.projection[:, 2])

References

Naritomi, Y. & Fuchigami, S. 
 Slow dynamics in protein fluctuations revealed by time-structure based independent component analysis: 
 The case of domain motions. 
-The Journal of Chemical Physics 134, 065101 (2011).
source
+The Journal of Chemical Physics 134, 065101 (2011).source diff --git a/dev/search/index.html b/dev/search/index.html index 68aef3d..6563863 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · MDToolbox.jl

Loading search...

    +Search · MDToolbox.jl

    Loading search...

      diff --git a/dev/structure/index.html b/dev/structure/index.html index 62eddf0..618a96f 100644 --- a/dev/structure/index.html +++ b/dev/structure/index.html @@ -1,52 +1,52 @@ Structural computations · MDToolbox.jl

      Structural computations

      MDToolbox.centerofmassMethod
      centerofmass(ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}) -> com::TrjArray

      Calculates the center of mass coordinates (COM) of the given trajectory, a TrjArray object ta. If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can also specify column indices for the COM calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns the center of mass coordinates as a TrjArray object, which have virtual single "atom" whose coordinates are COMs.

      Example

      julia> ta = mdload("ak.pdb")
      -julia> com = centersofmass(ta)
      source
      MDToolbox.decenterMethod
      decenter(ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}) -> ta_decentered::TrjArray, com::TrjArray

      Calculates the centers of mass coordinates (COM) of the given trajectory, a TrjArray object ta. And translates the coordinates so that the COM of the output is identical to the origin (x=y=z=0). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can also specify column indices for the COM calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns a TrjArray object whose COM is the origin (x=y=z=0), and the COM of the given TrjArray ta.

      Example

      julia> ta = mdload("ak.pdb")
      -julia> ta_decentered = decenter(ta)
      source
      MDToolbox.decenter!Method
      decenter!(ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}) -> com::TrjArray

      Translates the coordinates of the given trajectory, a TrjArray ta, so that the COM of it become identical to the origin (x=y=z=0). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can also specify column indices for the COM calculation by giving index which should be an Array of integers.

      Returns the center of mass coordinates of the given trajectory.

      Example

      julia> ta = mdload("ak.pdb")
      -julia> decenter!(ta)
      source
      MDToolbox.orient!Method
      orient!(ta::TrjArray, index::Union{UnitRange,Vector,BitArray})

      Orient the molecule using its principal axes of inertia.

      Example

      julia> ta = mdload("ak.pdb")
      -julia> orient!(ta)
      source
      MDToolbox.rotateMethod
      rotate(ta::TrjArray, quaternion::Vector) -> ta_rotated::TrjArray

      Performs rotation of coordinates of the given TrjArray object ta. Rotation matrix is constructed fromt the given quaternion vector.

      Returns the trajecotry with rotated coordinates.

      Example

      julia> ta = mdload("ak.dcd")
      +julia> com = centersofmass(ta)
      source
      MDToolbox.decenterMethod
      decenter(ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}) -> ta_decentered::TrjArray, com::TrjArray

      Calculates the centers of mass coordinates (COM) of the given trajectory, a TrjArray object ta. And translates the coordinates so that the COM of the output is identical to the origin (x=y=z=0). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can also specify column indices for the COM calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns a TrjArray object whose COM is the origin (x=y=z=0), and the COM of the given TrjArray ta.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> ta_decentered = decenter(ta)
      source
      MDToolbox.decenter!Method
      decenter!(ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}) -> com::TrjArray

      Translates the coordinates of the given trajectory, a TrjArray ta, so that the COM of it become identical to the origin (x=y=z=0). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can also specify column indices for the COM calculation by giving index which should be an Array of integers.

      Returns the center of mass coordinates of the given trajectory.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> decenter!(ta)
      source
      MDToolbox.orient!Method
      orient!(ta::TrjArray, index::Union{UnitRange,Vector,BitArray})

      Orient the molecule using its principal axes of inertia.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> orient!(ta)
      source
      MDToolbox.rotateMethod
      rotate(ta::TrjArray, quaternion::Vector) -> ta_rotated::TrjArray

      Performs rotation of coordinates of the given TrjArray object ta. Rotation matrix is constructed fromt the given quaternion vector.

      Returns the trajecotry with rotated coordinates.

      Example

      julia> ta = mdload("ak.dcd")
       julia> quaternion = [0.80951112,  0.10657412,  0.35146912,  0.45804312]
      -julia> ta_rotated = rotate(ta, quaternion)
      source
      MDToolbox.rotate!Method
      rotate!(ta::TrjArray, quaternion::Vector)

      Performs rotation of coordinates of the given TrjArray object ta. Rotation matrix is constructed fromt the given quaternion vector.

      The coordinates of ta is replaced with the rotated ones.

      Example

      julia> ta = mdload("ak.dcd")
      +julia> ta_rotated = rotate(ta, quaternion)
      source
      MDToolbox.rotate!Method
      rotate!(ta::TrjArray, quaternion::Vector)

      Performs rotation of coordinates of the given TrjArray object ta. Rotation matrix is constructed fromt the given quaternion vector.

      The coordinates of ta is replaced with the rotated ones.

      Example

      julia> ta = mdload("ak.dcd")
       julia> quaternion = [0.80951112,  0.10657412,  0.35146912,  0.45804312]
      -julia> rotate!(ta, quaternion)
      source
      MDToolbox.rotateMethod
      rotate(ta::TrjArray, quaternions::Matrix) -> ta_rotated::TrjArray

      Performs multiple rotations of the coordinates of the 1st frame of the given TrjArray object ta. Rotation matrices are construcuted from the 2-dimensional Array quaternions. One set of quaternions for rotaton should be given in a row vector in quaternions.

      Returns the trajecotry with rotated coordinates from the 1st frame of ta.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> rotate!(ta, quaternion)
      source
      MDToolbox.rotateMethod
      rotate(ta::TrjArray, quaternions::Matrix) -> ta_rotated::TrjArray

      Performs multiple rotations of the coordinates of the 1st frame of the given TrjArray object ta. Rotation matrices are construcuted from the 2-dimensional Array quaternions. One set of quaternions for rotaton should be given in a row vector in quaternions.

      Returns the trajecotry with rotated coordinates from the 1st frame of ta.

      Example

      julia> ta = mdload("ak.pdb")
       julia> quaternions = [0.80951112  0.10657412  0.35146912  0.45804312; 
       >                     0.10657412  0.80951112  -0.35146912  0.45804312]
      -julia> ta_rotated = rotate(ta, quaternions)
      source
      MDToolbox.rotate_with_matrixMethod
      rotate_with_matrix(ta::TrjArray, R::Matrix) -> ta_rotated::TrjArray

      Performs rotation of coordinates of the given TrjArray object ta with the given rotation matrix.

      The coordinates of ta is replaced with the rotated ones.

      Example

      julia> ta = mdload("ak.dcd")
      +julia> ta_rotated = rotate(ta, quaternions)
      source
      MDToolbox.rotate_with_matrixMethod
      rotate_with_matrix(ta::TrjArray, R::Matrix) -> ta_rotated::TrjArray

      Performs rotation of coordinates of the given TrjArray object ta with the given rotation matrix.

      The coordinates of ta is replaced with the rotated ones.

      Example

      julia> ta = mdload("ak.dcd")
       julia> R = [0.36 0.48 -0.8;
                   -0.8 0.60 0.0;
                   -.48 0.64 0.60]
      -julia> ra_rotated = rotate(ta, R)
      source
      MDToolbox.superimposeMethod
      superimpose(ref::TrjArray, ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}, isdecenter=false) -> ta_superimposed::TrjArray

      Performs the least-squares fitting of the given trajectory (TrjArray object ta) to the reference structure (1st frame of TrjArray object ref). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the COM calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray. When isdecenter is true, the function assumes the COMs of both structures are located at the origin (default is isdecenter=false).

      Returns the superimposed trajecotry.

      The code of this function is licensed under the BSD license (Copyright (c) 2009-2016 Pu Liu and Douglas L. Theobald), see LICENSE.md

      Example

      julia> ref = mdload("ak.pdb")
      +julia> ra_rotated = rotate(ta, R)
      source
      MDToolbox.superimposeMethod
      superimpose(ref::TrjArray, ta::TrjArray; isweight=true, index::Union{UnitRange,Vector,BitArray}, isdecenter=false) -> ta_superimposed::TrjArray

      Performs the least-squares fitting of the given trajectory (TrjArray object ta) to the reference structure (1st frame of TrjArray object ref). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the COM calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray. When isdecenter is true, the function assumes the COMs of both structures are located at the origin (default is isdecenter=false).

      Returns the superimposed trajecotry.

      The code of this function is licensed under the BSD license (Copyright (c) 2009-2016 Pu Liu and Douglas L. Theobald), see LICENSE.md

      Example

      julia> ref = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=pdb)
       julia> ta_superimposed = superimpose(ref, ta)

      References

      The algorithm of this function is based on 
       P. Liu, D. K. Agrafiotis, and D. L. Theobald, 
      -J. Comput. Chem. 31, 1561-1563 (2010).
      source
      MDToolbox.compute_rmsdMethod
      compute_rmsd(ref::TrjArray, ta::TrjArray; isweight=true, index=index::Union{UnitRange,Vector,BitArray}) -> rmsd

      Calculates the root mean square deviations (RMSD) of the given trajectory (TrjArray object ta) from the reference structure (1st frame of TrjArray object ref). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the RMSD calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns RMSD values.

      Example

      julia> ref = mdload("ak.pdb")
      +J. Comput. Chem. 31, 1561-1563 (2010).
      source
      MDToolbox.compute_rmsdMethod
      compute_rmsd(ref::TrjArray, ta::TrjArray; isweight=true, index=index::Union{UnitRange,Vector,BitArray}) -> rmsd

      Calculates the root mean square deviations (RMSD) of the given trajectory (TrjArray object ta) from the reference structure (1st frame of TrjArray object ref). If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the RMSD calculation by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns RMSD values.

      Example

      julia> ref = mdload("ak.pdb")
       julia> ta = mdload("ak.nc", top=pdb)
       julia> ta_superimposed = superimpose(ref, ta)
      -julia> rmsd = compute_rmsd(ref, ta_superimposed)
      source
      MDToolbox.meanstructureMethod
      meanstructure(ta::TrjArray; isweight=true, index=index::Union{UnitRange,Vector,BitArray}) -> ta_mean::TrjArray, ta_superimposed::TrjArray

      Calculates the mean structure of the given trajectory (TrjArray object ta) by iteratively fitting the trajecotry to tentative mean structures until the mean structure converges. If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the fitting (superimpose function) by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns the mean structure as TrjArray object, and the supserimposed trajectory to the mean structure.

      Example

      julia> ta = mdload("ak.nc", top=pdb)
      -julia> ta_mean, ta_superimposed = meanstructure(ta)
      source
      MDToolbox.compute_rmsfMethod
      compute_rmsf(ta::TrjArray{T, U}; isweight::Bool=true) -> rmsf

      rmsf (root mean square fluctuation)

      Calculates the root mean square fluctuations (RMSFs) of the atoms in the given trajectory (TrjArray object ta). from the average coordinates of the trajectory. If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty).

      Returns RMSF values.

      Example

      julia> ta = mdload("ak.nc", top=pdb)
      +julia> rmsd = compute_rmsd(ref, ta_superimposed)
      source
      MDToolbox.meanstructureMethod
      meanstructure(ta::TrjArray; isweight=true, index=index::Union{UnitRange,Vector,BitArray}) -> ta_mean::TrjArray, ta_superimposed::TrjArray

      Calculates the mean structure of the given trajectory (TrjArray object ta) by iteratively fitting the trajecotry to tentative mean structures until the mean structure converges. If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty). Uses can specify column indices for the fitting (superimpose function) by giving index which should be a Vector of integers, a UnitRange, or a BiArray.

      Returns the mean structure as TrjArray object, and the supserimposed trajectory to the mean structure.

      Example

      julia> ta = mdload("ak.nc", top=pdb)
      +julia> ta_mean, ta_superimposed = meanstructure(ta)
      source
      MDToolbox.compute_rmsfMethod
      compute_rmsf(ta::TrjArray{T, U}; isweight::Bool=true) -> rmsf

      rmsf (root mean square fluctuation)

      Calculates the root mean square fluctuations (RMSFs) of the atoms in the given trajectory (TrjArray object ta). from the average coordinates of the trajectory. If isweight is true (default), coordinates are weighted by ta.mass (as long as ta.mass is not empty).

      Returns RMSF values.

      Example

      julia> ta = mdload("ak.nc", top=pdb)
       julia> ta_mean, ta_superimposed = meanstructure(ta)
      -julia> rmsf = compute_rmsf(ta)
      source
      Missing docstring.

      Missing docstring for compute_distance(ta::TrjArray{T, U}, index=[1 2]::Matrix{U}) where {T, U}. Check Documenter's build log for details.

      Missing docstring.

      Missing docstring for compute_distance(ta1::TrjArray{T, U}, ta2::TrjArray{T, U}, index=[1 1]::Matrix{U}) where {T, U}. Check Documenter's build log for details.

      MDToolbox.compute_distancemapMethod
      compute_distancemap(ta::TrjArray; kneighbor=3)

      Calculates distance-map vectors from the given TrjArray ta. If atomid=j and atomid=i are closer to each other than the specified kneighbor, i.e., abs(i-j) < kneighbor, the calculation of the distance is ignored, considering that they are not nonbonded pairs. The default value of kneighbor is 3.

      Returns distance-map vectors of all frames. The distance-map of each frame is contained in a row vector of the output.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> rmsf = compute_rmsf(ta)
      source
      Missing docstring.

      Missing docstring for compute_distance(ta::TrjArray{T, U}, index=[1 2]::Matrix{U}) where {T, U}. Check Documenter's build log for details.

      Missing docstring.

      Missing docstring for compute_distance(ta1::TrjArray{T, U}, ta2::TrjArray{T, U}, index=[1 1]::Matrix{U}) where {T, U}. Check Documenter's build log for details.

      MDToolbox.compute_distancemapMethod
      compute_distancemap(ta::TrjArray; kneighbor=3)

      Calculates distance-map vectors from the given TrjArray ta. If atomid=j and atomid=i are closer to each other than the specified kneighbor, i.e., abs(i-j) < kneighbor, the calculation of the distance is ignored, considering that they are not nonbonded pairs. The default value of kneighbor is 3.

      Returns distance-map vectors of all frames. The distance-map of each frame is contained in a row vector of the output.

      Example

      julia> ta = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=ta)
      -julia> d = compute_distancemap(ta["atomname CA"])
      source
      MDToolbox.compute_contactmapMethod
      compute_contactmap(ta::TrjArray; rcut=8.5, kneighbor=3)

      Calculates contact-map vectors from the given TrjArray ta. Cut-off value for contact can be given in rcut (default is rcut=8.5). If atomid=j and atomid=i are closer to each other than the specified kneighbor, i.e., abs(i-j) < kneighbor, the calculation of the distance is ignored, considering that they are not nonbonded pairs. The default value of kneighbor is 3.

      Returns contact-map vectors of all frames. The contact-map of each frame is contained in a row vector of the output.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> d = compute_distancemap(ta["atomname CA"])
      source
      MDToolbox.compute_contactmapMethod
      compute_contactmap(ta::TrjArray; rcut=8.5, kneighbor=3)

      Calculates contact-map vectors from the given TrjArray ta. Cut-off value for contact can be given in rcut (default is rcut=8.5). If atomid=j and atomid=i are closer to each other than the specified kneighbor, i.e., abs(i-j) < kneighbor, the calculation of the distance is ignored, considering that they are not nonbonded pairs. The default value of kneighbor is 3.

      Returns contact-map vectors of all frames. The contact-map of each frame is contained in a row vector of the output.

      Example

      julia> ta = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=ta)
      -julia> d = compute_distancemap(ta["atomname CA"])
      source
      MDToolbox.compute_angleMethod
      compute_angle(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray)

      Calculates angles for the atom coordinates or the COMs of groups from the triplet of ta1, ta2 and ta3.

      Returns angles.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> d = compute_distancemap(ta["atomname CA"])
      source
      MDToolbox.compute_angleMethod
      compute_angle(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray)

      Calculates angles for the atom coordinates or the COMs of groups from the triplet of ta1, ta2 and ta3.

      Returns angles.

      Example

      julia> ta = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=ta)
      -julia> a = compute_distance(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11"])
      source
      MDToolbox.compute_dihedralMethod
      compute_dihedral(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray, ta4::TrjArray)

      Calculates dihedral angles for the atom coordinates or the COMs of groups from the quadruplet of ta1, ta2, ta3 and ta4.

      Returns dihedral angles.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> a = compute_distance(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11"])
      source
      MDToolbox.compute_dihedralMethod
      compute_dihedral(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray, ta4::TrjArray)

      Calculates dihedral angles for the atom coordinates or the COMs of groups from the quadruplet of ta1, ta2, ta3 and ta4.

      Returns dihedral angles.

      Example

      julia> ta = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=ta)
      -julia> d = compute_dihedral(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11", ta[:, "atom 13"]])
      source
      MDToolbox.compute_dihedralMethod
      compute_dihedral(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray, ta4::TrjArray)

      Calculates dihedral angles for the atom coordinates or the COMs of groups from the quadruplet of ta1, ta2, ta3 and ta4.

      Returns dihedral angles.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> d = compute_dihedral(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11", ta[:, "atom 13"]])
      source
      MDToolbox.compute_dihedralMethod
      compute_dihedral(ta1::TrjArray, ta2::TrjArray, ta3::TrjArray, ta4::TrjArray)

      Calculates dihedral angles for the atom coordinates or the COMs of groups from the quadruplet of ta1, ta2, ta3 and ta4.

      Returns dihedral angles.

      Example

      julia> ta = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=ta)
      -julia> d = compute_dihedral(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11", ta[:, "atom 13"]])
      source
      MDToolbox.compute_qscoreMethod
      compute_qscore(native::TrjArray, ta::TrjArray) -> qscore::Array

      Calculates all-atom based Q-score from given heavy atom coordinates.

      Returns Q-scores.

      Example

      julia> native = mdload("ak.pdb")
      +julia> d = compute_dihedral(ta[:, "atomid 1"], ta[:, "atomid 9"], ta[:, "atomid 11", ta[:, "atom 13"]])
      source
      MDToolbox.compute_qscoreMethod
      compute_qscore(native::TrjArray, ta::TrjArray) -> qscore::Array

      Calculates all-atom based Q-score from given heavy atom coordinates.

      Returns Q-scores.

      Example

      julia> native = mdload("ak.pdb")
       julia> ta = mdload("ak.dcd", top=native)
       julia> qscore = compute_qscore(native["not hydrogen"], ta["not hydrogen"])

      References

      Definition of Q-score from heavy atoms is given in 
      -R. B. Best, G. Hummer, and W. A. Eaton, PNAS 110, 17874 (2013).
      source
      MDToolbox.compute_drmsMethod
      compute_drms(native1::TrjArray, native2::TrjArray, ta1::TrjArray, ta2::TrjArray) -> drms

      Calculates distance-based root mean square displacements (DRMS) from the given trajectories. First, native contacts between molecule1 and molecule2 are identified from the two native structures native1 and native2 where cutoff distance of 6.0 Angstrom is used. Then, the DRMS are calculated from the trajectories of molecule1 ta1 and molecule2 ta2.

      Returns distance-based root mean square displacements.

      Example

      julia> native1 = mdload("protein.pdb")["not hydrogen"]
      +R. B. Best, G. Hummer, and W. A. Eaton, PNAS 110, 17874 (2013).
      source
      MDToolbox.compute_drmsMethod
      compute_drms(native1::TrjArray, native2::TrjArray, ta1::TrjArray, ta2::TrjArray) -> drms

      Calculates distance-based root mean square displacements (DRMS) from the given trajectories. First, native contacts between molecule1 and molecule2 are identified from the two native structures native1 and native2 where cutoff distance of 6.0 Angstrom is used. Then, the DRMS are calculated from the trajectories of molecule1 ta1 and molecule2 ta2.

      Returns distance-based root mean square displacements.

      Example

      julia> native1 = mdload("protein.pdb")["not hydrogen"]
       julia> native2 = mdload("ligand.pdb")["not hydrogen"]
       julia> ta1 = mdload("protein.dcd")["not hydrogen"]
       julia> ta2 = mdload("ligand.dcd")["not hydrogen"]
       julia> drms = compute_drms(native1, native2, ta1, ta2)

      References

      Definition of DRMS is given in 
       J. Domański, G. Hedger, R. B. Best, P. J. Stansfeld, and M. S. P. Sansom, 
       Convergence and Sampling in Determining Free Energy Landscapes for Membrane Protein Association, 
      -J. Phys. Chem. B 121, 3364 (2017).
      source
      MDToolbox.compute_pairlistMethod
      compute_pairlist(ta::TrjArray, rcut; iframe=1::Int) -> F

      Make a pairlist for the given strcuture ta1 by searching pairs within a cutoff distance rcut. By default, the 1st frame of ta1 is used. Users can specify the frame by iframe.

      Returns a NamedTuple object F which contains the pair lists in F.pair, and the distances of corresponding pairs in F.dist.

      Example

      julia> ta = mdload("ak.pdb")
      +J. Phys. Chem. B 121, 3364 (2017).
      source
      MDToolbox.compute_pairlistMethod
      compute_pairlist(ta::TrjArray, rcut; iframe=1::Int) -> F

      Make a pairlist for the given strcuture ta1 by searching pairs within a cutoff distance rcut. By default, the 1st frame of ta1 is used. Users can specify the frame by iframe.

      Returns a NamedTuple object F which contains the pair lists in F.pair, and the distances of corresponding pairs in F.dist.

      Example

      julia> ta = mdload("ak.pdb")
       julia> F = compute_pairlist(ta, 8.0)

      References

      The algorithm of this function is based on 
       T.N. Heinz, and P.H. Hünenberger, 
       A fast pairlist-construction algorithm for molecular simulations under periodic boundary conditions. 
      -J Comput Chem 25, 1474–1486 (2004). 
      source
      MDToolbox.compute_pairlist_bruteforceMethod
      compute_pairlist_bruteforce(ta::TrjArray, rcut; iframe=1::Int) -> F

      Bruteforce search version of compute_pairlist function. Mainly used for debugging.

      Returns a NamedTuple object F which contains the pair lists in F.pair, and the distances of corresponding pairs in F.dist.

      Example

      julia> ta = mdload("ak.pdb")
      -julia> F = compute_pairlist(ta, 8.0)
      source
      +J Comput Chem 25, 1474–1486 (2004). source
      MDToolbox.compute_pairlist_bruteforceMethod
      compute_pairlist_bruteforce(ta::TrjArray, rcut; iframe=1::Int) -> F

      Bruteforce search version of compute_pairlist function. Mainly used for debugging.

      Returns a NamedTuple object F which contains the pair lists in F.pair, and the distances of corresponding pairs in F.dist.

      Example

      julia> ta = mdload("ak.pdb")
      +julia> F = compute_pairlist(ta, 8.0)
      source
      diff --git a/dev/superimpose_rmsd/index.html b/dev/superimpose_rmsd/index.html index 3df1a41..8a31f05 100644 --- a/dev/superimpose_rmsd/index.html +++ b/dev/superimpose_rmsd/index.html @@ -118,4 +118,4 @@ ax.grid(linestyle="--", linewidth=0.5) tight_layout() -savefig("superimpose_rmsd.png", dpi=350)

      png

      +savefig("superimpose_rmsd.png", dpi=350)

      png

      diff --git a/dev/wham/index.html b/dev/wham/index.html index da018a0..2af25f3 100644 --- a/dev/wham/index.html +++ b/dev/wham/index.html @@ -1,3 +1,3 @@ WHAM (Weighted Histogram Analysis Method) · MDToolbox.jl

      WHAM (Weighted Histogram Analysis Method)

      MDToolbox.whamMethod
      wham(h_km, bias_km; ftol=1e-10, maxiterations=10^5) -> F

      Estimates (reduced) free energies of umbrella-windows and potential of mean force in data-bins by using the WHAM equations. K is # of umbrellas and M is # of bins. h_km is a K x M Array which is a histogram (data counts) of k-th umbrella data in m-th bin. bias_km is also a K x M Array which is a bias-factor of k-th umbrella-window evaluated at m-th bin-center.

      Returns a NamedTuple object F whose members are F.f_k reduced relative free energies of umbrella-windows, and pmf_m reduced potential of mean force in data-bins under unbiased condition.

      References

      S. Kumar, D. Bouzida, R. H. Swendsen, P. A. Kollman, and J. M. Rosenberg, 
      -J. Comput. Chem. 13, 1011 (1992).
      source
      +J. Comput. Chem. 13, 1011 (1992).source diff --git a/dev/wham_example/index.html b/dev/wham_example/index.html index e76b9b2..be0ff11 100644 --- a/dev/wham_example/index.html +++ b/dev/wham_example/index.html @@ -54,4 +54,4 @@ ax.grid(linestyle="--", linewidth=0.5) tight_layout() -savefig("wham.png", dpi=350)

      png

      +savefig("wham.png", dpi=350)

      png

      diff --git a/dev/workflow_for_developers/index.html b/dev/workflow_for_developers/index.html index 872281f..c3ba392 100644 --- a/dev/workflow_for_developers/index.html +++ b/dev/workflow_for_developers/index.html @@ -10,4 +10,4 @@ ### include("wham.jl")

      2. Write your codes in wham.jl

      During the coding, it is recommended to execute test codes in your REPL or jupyter. Also, it is convenient to use Reivse package which enables you to modify codes, making changes active without restarting Julia.

      julia> using Revise, MDToolbox
      -julia> # run your test codes
      +julia> # run your test codes