Perform normal mode analysis (NMA) on an ensemble of aligned protein structures.

# S3 method for pdbs
nma(pdbs, fit = TRUE, full = FALSE, subspace = NULL,
         rm.gaps = TRUE, varweight=FALSE, 
         outpath = NULL, ncore = 1, progress = NULL, ...)

# S3 method for enma
print(x, ...)

Arguments

pdbs

a numeric matrix of aligned C-alpha xyz Cartesian coordinates. For example an alignment data structure obtained with read.fasta.pdb or pdbaln.

fit

logical, if TRUE coordinate superposition is performed prior to normal mode calculations.

full

logical, if TRUE return the complete, full structure, ‘nma’ objects.

subspace

number of eigenvectors to store for further analysis.

rm.gaps

logical, if TRUE obtain the hessian matrices for only atoms in the aligned positions (non-gap positions in all aligned structures). Thus, gap positions are removed from output.

varweight

logical, if TRUE perform weighing of the pair force constants. Alternatively, provide a NxN matrix containing the weights. See function var.xyz.

outpath

character string specifing the output directory to which the PDB structures should be written.

ncore

number of CPU cores used to do the calculation. ncore>1 requires package ‘parallel’ installed.

x

an enma object obtained from nma.pdbs.

progress

progress bar for use with shiny web app.

...

additional arguments to nma, aa2mass, and print.

Details

This function performs normal mode analysis (NMA) on a set of aligned protein structures obtained with function read.fasta.pdb or pdbaln. The main purpose is to provide aligned atomic fluctuations and mode vectors in an automated fashion.

The normal modes are calculated on the full structures as provided by object ‘pdbs’. With the input argument ‘full=TRUE’ the full ‘nma’ objects are returned together with output ‘U.subs’ providing the aligned mode vectors. When ‘rm.gaps=TRUE’ the unaligned atoms are ommited from output. With default arguments ‘rmsip’ provides RMSIP values for all pairwise structures.

See examples for more details.

Value

Returns an ‘enma’ object with the following components:

fluctuations

a numeric matrix containing aligned atomic fluctuations with one row per input structure.

rmsip

a numeric matrix of pair wise RMSIP values (only the ten lowest frequency modes are included in the calculation).

U.subspace

a three-dimensional array with aligned eigenvectors (corresponding to the subspace defined by the first N non-trivial eigenvectors (‘U’) of the ‘nma’ object).

L

numeric matrix containing the raw eigenvalues with one row per input structure.

xyz

an object of class ‘xyz’ containing the Cartesian coordinates in which the calculation was performed. Coordinates are superimposed to the first structure of the pdbs object when ‘fit=TRUE’.

full.nma

a list with a nma object for each input structure.

References

Skjaerven, L. et al. (2014) BMC Bioinformatics 15, 399. Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.

Author

Lars Skjaerven

See also

For normal mode analysis on single structure PDB: nma.pdb

For the analysis of the resulting ‘eNMA’ object: mktrj.enma, dccm.enma, plot.enma, cov.enma.

Similarity measures: sip, covsoverlap, bhattacharyya, rmsip.

Related functionality: pdbaln, read.fasta.pdb.

Examples

# \donttest{ # Needs MUSCLE installed - testing excluded if(check.utility("muscle")) { ## Fetch PDB files and split to chain A only PDB files ids <- c("1a70_A", "1czp_A", "1frd_A", "1fxi_A", "1iue_A", "1pfd_A") files <- get.pdb(ids, split = TRUE, path = tempdir()) ## Sequence Alignement pdbs <- pdbaln(files, outfile = tempfile()) ## Normal mode analysis on aligned data modes <- nma(pdbs, rm.gaps=FALSE) ## Plot fluctuation data plot(modes, pdbs=pdbs) ## Cluster on Fluctuation similariy sip <- sip(modes) hc <- hclust(dist(sip)) col <- cutree(hc, k=3) ## Plot fluctuation data plot(modes, pdbs=pdbs, col=col) ## Remove gaps from output modes <- nma(pdbs, rm.gaps=TRUE) ## RMSIP is pre-calculated heatmap(1-modes$rmsip) ## Bhattacharyya coefficient bc <- bhattacharyya(modes) heatmap(1-bc) }
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1a70.pdb exists. Skipping download
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1czp.pdb exists. Skipping download
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1frd.pdb exists. Skipping download
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1fxi.pdb exists. Skipping download
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1iue.pdb exists. Skipping download
#> Warning: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/1pfd.pdb exists. Skipping download
#> | | | 0% | |============ | 17% | |======================= | 33% | |=================================== | 50% | |=============================================== | 67% | |========================================================== | 83% | |======================================================================| 100% #> Reading PDB files: #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1a70_A.pdb #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1czp_A.pdb #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1frd_A.pdb #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1fxi_A.pdb #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1iue_A.pdb #> /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1pfd_A.pdb #> . PDB has ALT records, taking A only, rm.alt=TRUE #> ..... #> #> Extracting sequences #> #> pdb/seq: 1 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1a70_A.pdb #> pdb/seq: 2 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1czp_A.pdb #> PDB has ALT records, taking A only, rm.alt=TRUE #> pdb/seq: 3 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1frd_A.pdb #> pdb/seq: 4 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1fxi_A.pdb #> pdb/seq: 5 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1iue_A.pdb #> pdb/seq: 6 name: /var/folders/xf/qznxnpf91vb1wm4xwgnbt0xr0000gn/T//Rtmp9oBdbc/split_chain/1pfd_A.pdb #> #> Details of Scheduled Calculation: #> ... 6 input structures #> ... storing 282 eigenvectors for each structure #> ... dimension of x$U.subspace: ( 300x282x6 ) #> ... coordinate superposition prior to NM calculation #> ... estimated memory usage of final 'eNMA' object: 3.9 Mb #> #> | | | 0% | |============ | 17% | |======================= | 33% | |=================================== | 50% | |=============================================== | 67% | |========================================================== | 83% | |======================================================================| 100%
#> Extracting SSE from pdbs$sse attribute
#> Extracting SSE from pdbs$sse attribute
#> #> Details of Scheduled Calculation: #> ... 6 input structures #> ... storing 282 eigenvectors for each structure #> ... dimension of x$U.subspace: ( 288x282x6 ) #> ... coordinate superposition prior to NM calculation #> ... aligned eigenvectors (gap containing positions removed) #> ... estimated memory usage of final 'eNMA' object: 3.7 Mb #> #> | | | 0% | |============ | 17% | |======================= | 33% | |=================================== | 50% | |=============================================== | 67% | |========================================================== | 83% | |======================================================================| 100%
#> Calculating covariance matrices #> Calculating pairwise bhattacharyya coefs
# }