anim.TCA {CHNOSZ}R Documentation

Functions to Make Animations


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


  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)



list, redox variable and limits


logical, overlay high-temperature diagram?


numeric, number of frames to be animated


numeric, pH limits to use for animation


numeric, width of plot device


numeric, height of plot device


numeric, temperature range for animation


numeric, number of names to show in legend


numeric, character expansion factor for legend


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 (, 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 °C unless high.T is TRUE, in which case high-temperature (100 °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 logaH2 = -11 + 3/40 * T(degC); this equation comes from a model of relative stabilities of proteins in a hot-spring environment (Dick and Shock, 2011).


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.


## Not run: 
# animate a stability diagram with a high-temperature overlay
# using H2 instead of O2
## End(Not run)

# using anim.carboxylase in non-animation mode

[Package CHNOSZ version 1.1.0 Index]