uwham.boot: Variance estimation for UWHAM based on block bootstrap

View source: R/UWHAM-code.R

uwham.bootR Documentation

Variance estimation for UWHAM based on block bootstrap

Description

This function implements variance estimation based on block bootstrap for UWHAM estimates of free energies and expectations.

Usage

uwham.boot(proc.type, block.size, boot.size, seed = 0, 
           label = NULL, logQ, size=NULL, base = NULL, init = NULL, 
           phi = NULL, state = NULL)

Arguments

proc.type

Type of simulation, "indep" for independent chains at the thermodynamic states, "parallel" for (synchronous) parallel tempering, or "serial" for (single-chain) serial tempering (see the details).

block.size

A vector of length m=sum(size>0) (or recycled to be so), giving possibly different block sizes for the m sampled thermodynamic states if proc.type= "indep", or a scalar (or truncated to the first element), giving a single block size if proc.type="parallel" or "serial".

boot.size

The number of bootstrap replications.

seed

Seed for random number generation.

label

A vector of length N of labels between 1 to M such that label[i]=j when ith observation is obtained from jth thermodynamic state; either label or size must be provided if proc.type="indep" or "parallel"; label must be provided but size is optional if proc.type="serial".

logQ

N x M matrix of log unnormalized densities (such as 1/kT times negative potential energies), where N is the total sample size, i.e., sum(size), and M is the number of thermodynamic states for which free energies are to be computed; the ith row of logQ correspond to ith observations and the jth column correspond to jth thermodynamic state.

size

A vector of length M, giving the individual sample sizes for the M thermodynamic states, ordered as the columns of logQ; if NULL, then label is required and used to compute size.

base

The baseline index, between 1 to M, for the thermodynamic state (with sample size >0) whose free energy is set to 0; if NULL, then base is set to the first index j such that size[j]>0.

init

A vector of length M, giving the initial values of the log-normalizing constants (or log of the partition functions); if NULL, then init is set to the zero vector.

phi

A vector of function values on the pooled sample; if NULL, no expectation is estimated.

state

A vector of indices for the thermodynamic states under which expectations are to be computed; if NULL, no expectation is estimated.

Details

The use of block bootstrap requires at least two more inputs than uwham: the type of simulation proc.type and the time ordering of the observations.

If proc.type="indep", the data are assumed to be generated by (approximately) independent chains at different thermodynamic states. The observations corresponding to the rows of logQ are assumed to be ordered by thermodynamic state and by simulation time within each state. To perform block bootstrap, data blocks are resampled within each thermodynamic state and then pooled to build bootstrap samples.

If proc.type="parallel", the data are assumed to be generated by (synchronous) parallel tempering or replica exhanges. Equal sample sizes are required. The observations corresponding to the rows of logQ are assumed to be ordered by simulation time and then by either thermodynamic state (as in the dataset ligand2.soft) or replica (as in the dataset ligand2.hard). The synchronized block bootstrap is implemented such that blocks corresponding to the same time interval are randomly selected from all the thermodynamic states (Tan et al. 2012).

If proc.type="serial", the data are assumed to be generated by (single-chain) serial tempering or simulated tempering. The observations corresponding to the rows of logQ are assumed to be ordered by time. The thermodynamic labels must then be provided in label. To perform block bootstrap, data blocks are resampled from the entire chain, and the number of observations at each state is re-computed for each bootstrap sample.

Value

ze

The vector of averages of estimated free energies over the bootstrap samples, which can differ from the output ze in uwham.

ve

The vector of estimated variances for the output ze in uwham.

phi

The vector of averages of estimated expectations over the bootstrap samples (which can differ from the output phi in uwham.phi), if phi!=NULL and state!=NULL.

phi.v

The vector of estimated variances for phi in uwham.phi, if phi!=NULL and state!=NULL.

References

Tan, Z., Gallicchio, E., Lapelosa, M., and Levy, R.M. (2012) "Theory of binless multi-state free energy estimation with applications to protein-ligand binding," Journal of Chemical Physics, 136, 144102.

Examples


#See the examples for uwham().


UWHAM documentation built on May 20, 2022, 5:05 p.m.