Volume extrapolation (volume
)#
Note: This only handles volume expansion to first order.
Also, Only DataCentralMomentsVals like objects (with resample_values = True
) are supported.
Classes:
Calculates specific derivative values at reference volume V with data x and W. |
|
|
Object to handle callbacks of metadata. |
Functions:
Factory function to provide coefficients of expansion. |
|
|
Factory function to create Extrapolation model for volume expansion. |
- class thermoextrap.volume.VolumeDerivFuncs[source]#
Bases:
object
Calculates specific derivative values at reference volume V 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
- thermoextrap.volume.factory_derivatives()[source]#
Factory function to provide coefficients of expansion.
- class thermoextrap.volume.VolumeDataCallback(volume, dxdqv, ndim=3)[source]#
Bases:
DataCallbackABC
,Generic
[DataT
]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
, default3
) – Number of dimensions of the system.
See also
Methods:
check
(data)Perform any consistency checks between self and data.
resample
(data, *, meta_kws, sampler, **kws)Adjust create new object.
deriv_args
(data, *, deriv_args)Adjust derivs args from data class.
- 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 volumeuv, 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
, default3
) – Number of dimensions of the system.order (
int
, default1
) – maximum order. Only order=1 is currently supportedalpha_name, str, default=’volume’ – name of expansion parameter
rec_dim (hashable) – Name of dimension for ‘records’, i.e., multiple observations.
val_dims (
str
or sequence ofstr
) – Names of extra dimensionsrep_dim (hashable) – Name of new ‘replicated’ dimension:
**kws – Extra arguments to
DataCentralMomentsVals
- Returns:
extrapmodel (
thermoextrap.models.ExtrapModel
)