Description Usage Arguments Value Author(s) Examples
This function loads clusters from a plain text file and stores them in a matrix. The trajectories can be named by the user. The output of this function can be used as input of function clusters()
.
1 2 3 4 | load_clusters( path,
names = NA,
lengths = NA,
mdEngine = "GROMOS" )
|
path |
Specifies the path of the text input file. |
names |
Optional vector of trajectory names. If provided, needs to be of the same length as the number of clusters to be plotted. |
lengths |
When GROMACS input needs to be parsed, the lengths of the respective trajectories have to be given. This holds also in the case, that only one is used. |
mdEngine |
Argument distinguishes between input formats based on the molecular dynamics engine used. Currently available: |
Returns a n
xm
-matrix with n
being the number of input trajectories and m
the number of different clusters. Each element in the matrix holds the number of snapshots, the respective cluster occured in the respective trajectory.
Christian Margreitter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # GROMOS
load_clusters( system.file( "extdata/clusters_example.txt.gz", package = "MDplot" ) )
# GROMACS
load_clusters( system.file( "extdata/clusters_example_GROMACS.txt.gz", package = "MDplot" ),
mdEngine = "GROMACS", lengths = c( 1001, 1001 ) )
# AMBER (first)
load_clusters( system.file( "extdata/clusters_example_1_AMBER.txt.gz", package = "MDplot" ),
mdEngine = "AMBER" )
# AMBER (second)
load_clusters( system.file( "extdata/clusters_example_2_AMBER.txt.gz", package = "MDplot" ),
mdEngine = "AMBER" )
|
Loading required package: MASS
Loading required package: RColorBrewer
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Loading required package: gtools
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
1 8539 0 175 0 0 284 0 0 0 0 0 0 0 0
2 3027 5224 0 178 62 3 370 1 65 3 10 23 10 12
3 8926 0 0 0 0 71 0 0 0 0 2 0 0 0
4 7999 0 928 0 0 37 0 0 0 35 0 0 0 0
5 2993 5064 12 390 368 7 0 106 9 0 19 0 11 3
6 8837 0 122 0 0 26 0 0 0 8 6 0 0 0
[,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
1 0 0 0 0 2 0 0 0 0 0 0
2 0 4 4 0 0 3 0 1 0 0 0
3 0 0 0 0 1 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 1 0 0
5 11 0 0 4 0 0 2 0 0 1 0
6 0 0 0 0 0 0 0 0 0 0 1
[,1] [,2] [,3] [,4]
1 839 91 29 42
2 75 21 860 45
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
1 20 19 17 7 6 5 4 4 4 4 3 2 2 2
[,15] [,16]
1 1 1
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
1 12705 10151 9473 7700 5354 3285 1826 1044 896 813 738 601 537 433
2 15269 14668 10968 8363 8602 4835 2162 1716 1452 1439 1161 782 733 596
[,15] [,16] [,17] [,18] [,19]
1 447 253 320 274 246
2 541 476 386 356 286
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.