Learn R Programming

CHNOSZ (version 1.1.0)

anim.TCA: Functions to Make Animations

Description

Make animated stability diagrams by creating a series of PNG files.

Usage

anim.TCA(redox = list(O2 = c(-95, -60)), high.T = FALSE,
    nframes = 100, pHlim = c(0,10), width = 420, height = 320)
  anim.carboxylase(T = 25:125, ntop = 5, lcex = 0.8, width = 420, height = 320)

Arguments

redox

list, redox variable and limits

high.T

logical, overlay high-temperature diagram?

nframes

numeric, number of frames to be animated

pHlim

numeric, pH limits to use for animation

width

numeric, width of plot device

height

numeric, height of plot device

T

numeric, temperature range for animation

ntop

numeric, number of names to show in legend

lcex

numeric, character expansion factor for legend

Details

These functions create a series of PNG figures that can be converted into an animated diagram. The PNG files are created in the png directory within the current working directory; the functions stop with an error if either this directory is not present or it is present but not empty. After making the PNG files, they are converted to an animated GIF using the convert tool from the ImageMagick software distribution (http://www.imagemagick.org), if it is available on the system. The system command is called using system, or shell on Windows platforms. When installing ImageMagick on Windows, be sure to leave the ‘Add application directory to your system path’ option checked; this will make the convert command from ImageMagick available in the shell.

To ensure the calculations are performed as intended, each function first removes any existing system definition by calling data(thermo).

anim.TCA creates a series of figures showing how a logaH2O - logfO2 activity diagram for various species involved in the tricarboxylic acid (TCA) cycle changes as a function of pH. Alternatively, set redox to list(H2=c(-20,0)) to draw a logaH2O - logaH2 diagram. The diagrams are made at 25 \(^{\circ}\)C unless high.T is TRUE, in which case high-temperature (100 \(^{\circ}\)C) stability fields are overlaid.

anim.carboxylase animates equilibrium rank-activity diagrams along a combined temperature and logaH2 gradient, or makes a single plot on the default device (without conversion to animated GIF) if a single temperature is provided. The proteins in the calculation are 24 carboxylases from a variety of organisms. There are 12 ribulose phosphate carboxylase and 12 acetyl-coenzyme A carboxylase; 6 of each type are from nominally mesophilic organisms and 6 from nominally thermophilic organisms, shown as blue and red symbols on the diagrams. The activities of hydrogen at each temperature are calculated using \(\log a_{\mathrm{H_{2}}_{\left(aq\right)}}=-11+3/\left(40\times T\left(^{\circ}C\right)\right)\); this equation comes from a model of relative stabilities of proteins in a hot-spring environment (Dick and Shock, 2011).

References

Dick, J. M. and Shock, E. L. (2011) Calculation of the relative chemical stabilities of proteins as a function of temperature and redox chemistry in a hot spring. PLoS ONE 6, e22782. https://doi.org/10.1371/journal.pone.0022782

Examples

Run this code
# NOT RUN {
# animate a stability diagram with a high-temperature overlay
anim.TCA(high.T=TRUE)
# using H2 instead of O2
anim.TCA(list(H2=c(-20,0))) 
# }
# NOT RUN {
# using anim.carboxylase in non-animation mode
anim.carboxylase(T=100)
# }

Run the code above in your browser using DataLab