hbond_ts {MDplot}R Documentation

Plot hydrogen bond timeseries

Description

Timeseries plot of hydrogen bonds (various selections possible). In addition to the timeseries file, depending on the MD engine format used, an additional summary file might also be necessary (see below for examples).

Usage

hbond_ts( timeseries,
          summary,
          acceptorRange = NA,
          donorRange = NA,
          plotOccurences = FALSE,
          scalingFactorPlot = NA,
          printNames = FALSE,
          namesToSingle = FALSE,
          printAtoms = FALSE,
          timeUnit = NA,
          snapshotsPerTimeInt = 1000,
          timeRange = NA,
          hbondIndices = NA,
          barePlot = FALSE,
          ... )

Arguments

timeseries

Table, containing the timeseries information (e.g. produced by load_hbond_ts()).

summary

Table, containing the summary information (e.g. produced by load_hbond()).

acceptorRange

Vector of acceptor resdiues, which are to be plotted.

donorRange

Vector of donor residues, which are to be plotted.

plotOccurences

Specifies, whether the overall summary should also be plotted in a subplot on the right hand side.

scalingFactorPlot

To manually set the scaling factor (if necessary).

printNames

Enables human readable names rather than the hbond identifiers.

namesToSingle

If printNames is TRUE, this flags enables one letter codes.

printAtoms

If printNames is TRUE, this flag adds the atom names in the hydrogen bond identification on the y-axis.

timeUnit

Specifies the time unit on the x-axis.

snapshotsPerTimeInt

Specifies, how many snapshots make up one time unit (see above).

timeRange

Selects a certain time range specified by a vector.

hbondIndices

List, containing vectors to select hbonds by their identifiers.

barePlot

Boolean, indicating whether the plot is to be made without any additional information.

...

Additional arguments (ellipsis).

Value

Returns a nx2 matrix, with the first column being the list of hydrogen bond identifiers plotted and the second one the occurrence (in percent) over the selected time range.

Author(s)

Christian Margreitter

Examples

# the examples are valid and wrapped in the "dontrun{}" environment for efficiency purposes only
# GROMOS
## Not run: 
hbond_ts( load_hbond_ts( system.file( "extdata/hbond_ts_example.txt.gz",
                                      package = "MDplot" ) ),
          load_hbond( system.file( "extdata/hbond_example.txt.gz",
                                   package = "MDplot" ) ) )
## End(Not run)

# GROMACS
## Not run: 
hbond_ts( load_hbond_ts( system.file( "extdata/hbond_ts_example_GROMACS.xpm.gz",
                                      package = "MDplot" ),
                         mdEngine = "GROMACS" ),
          load_hbond( system.file( "extdata/hbond_ts_example_GROMACS.xpm.gz",
                                  package = "MDplot" ),
                      system.file( "extdata/hbond_example_GROMACS.txt.gz",
                                   package = "MDplot" ),
                      mdEngine = "GROMACS" ),
          plotOccurences = TRUE, namesToSingle = FALSE, printNames = TRUE,
          printAtoms = TRUE, hbondIndices = list( c( 1, 12 ) ),
          timeUnit = "ns", snapshotsPerTimeInt = 100 )
## End(Not run)

# AMBER
hbond_ts( load_hbond_ts( system.file( "extdata/hbond_ts_example_AMBER.txt.gz",
                                      package = "MDplot" ),
                         mdEngine = "AMBER" ),
          load_hbond( system.file( "extdata/hbond_ts_example_AMBER.txt.gz",
                                   package = "MDplot" ),
                         mdEngine = "AMBER" ),
          plotOccurences = TRUE, timeRange = c( 20, 60 ) )

[Package MDplot version 1.0.1 Index]