Volume extrapolation (volume)#

Note: This only handles volume expansion to first order. Also, Only DataValues like objects are supported.

Classes:

VolumeDerivFuncs()

Calculates specific derivative values at refV with data x and W.

VolumeDataCallback(volume, dxdqv[, ndim])

Object to handle callbacks of metadata.

Functions:

factory_derivatives()

Factory function to provide coefficients of expansion.

factory_extrapmodel(volume, uv, xv, dxdqv[, ...])

Factory function to create Extrapolation model for volume expansion.

class thermoextrap.volume.VolumeDerivFuncs[source]#

Bases: object

Calculates specific derivative values at refV with data x and W. Only go to first order for volume extrapolation. Here W represents the virial instead of the potential energy.

Methods:

create_deriv_func(order)

Derivative function for Volume derivatives

static create_deriv_func(order)[source]#

Derivative function for Volume derivatives

thermoextrap.volume.factory_derivatives()[source]#

Factory function to provide coefficients of expansion.

class thermoextrap.volume.VolumeDataCallback(volume, dxdqv, ndim=3)[source]#

Bases: DataCallbackABC

Object to handle callbacks of metadata.

Parameters:
  • volume (float) – Reference value of system volume.

  • dxdqv (array-like) – values of sum dx/dq_i q_i where q_i is the ith coordinate.

  • ndim (int, default 3) – Number of dimensions of the system.

Methods:

check(data)

Perform any consistency checks between self and data.

resample(data, meta_kws, indices, **kws)

Adjust create new object.

derivs_args(data, derivs_args)

Adjust derivs args from data class.

check(data)[source]#

Perform any consistency checks between self and data.

resample(data, meta_kws, indices, **kws)[source]#

Adjust create new object.

Should return new instance of class or self no change

derivs_args(data, derivs_args)[source]#

Adjust derivs args from data class.

should return a tuple

thermoextrap.volume.factory_extrapmodel(volume, uv, xv, dxdqv, ndim=3, order=1, alpha_name='volume', rec_dim='rec', val_dims='val', rep_dim='rep', **kws)[source]#

Factory function to create Extrapolation model for volume expansion.

Parameters:
  • volume (float) – Reference value of system volume.

  • volume (float) – reference value of volume

  • uv, xv (array-like) – values for u and x Note that here, uv should be the temperature scaled virial beta * virial

  • dxdqv (array-like) – values of sum dx/dq_i q_i where q_i is the ith coordinate This array is wrapped with cmomy.data.xrwrap_xv

  • ndim (int, default 3) – Number of dimensions of the system.

  • order (int, default 1) – maximum order. Only order=1 is currently supported

  • alpha_name, str, default=’volume’ – name of expansion parameter

  • rec_dim (hashable, optional) – Name of dimension for ‘records’, i.e., multiple observations.

  • val_dims (str or sequence of str) – Names of extra dimensions

  • rep_dim (hashable, optional) – Name of new ‘replicated’ dimension:

  • **kws – Extra arguments to thermoextrap.data.DataValues.from_vals()

Returns:

extrapmodel (thermoextrap.models.ExtrapModel)