load_clusters {MDplot}R Documentation

Loading cluster information

Description

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().

Usage

load_clusters( path,
               names = NA,
               lengths = NA,
               mdEngine = "GROMOS" )

Arguments

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: "GROMOS", "GROMACS" and "AMBER". Note, that two different kinds of AMBER output may be loaded (see example input files).

Value

Returns a nxm-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.

Author(s)

Christian Margreitter

Examples

# 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" )

[Package MDplot version 1.0.1 Index]