asaf.utils
Utility functions for the ASAF package.
beta_to_temperature
Convert beta (in J^-1) to temperature (in K) using Boltzmann constant.
Source code in src/asaf/utils.py
108 109 110 111 | |
calculate_lnp
calculate_lnp(prob_df: DataFrame) -> DataFrame
Calculate the natural logarithm of the macrostate transition probability[1].
Parameters:
-
prob_df(DataFrame) –A pandas DataFrame containing transition probabilities.
Returns:
-
lnp_df–A pandas DataFrame containing natural logarithm of the macrostate transition probability.
References
.. [1] Shen, V. K., & Errington, J. R. (2004). Metastability and Instability in the Lennard-Jones Fluid Investigated by Transition-Matrix Monte Carlo, In The Journal of Physical Chemistry B (Vol. 108, Issue 51, pp. 19595–19606). American Chemical Society (ACS). https://doi.org/10.1021/jp040218y
Source code in src/asaf/utils.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
fugacity_to_mu
Convert fugacity (in Pa) to chemical potential (in J).
Note: the volume scale for fugacity is Å^3. Ref: Equation 73 in Dubbeldam et al., Molecular Simulation, 2013, Vol. 39, Nos. 14–15, 1253–1292, https://dx.doi.org/10.1080/08927022.2013.819102
Source code in src/asaf/utils.py
120 121 122 123 124 125 126 127 128 | |
interpolate_df
interpolate_df(
df: DataFrame, based_on: str = "macrostate"
) -> DataFrame
Interpolates data in a dataframe.
Parameters:
-
df(DataFrame) –A pandas DataFrame containing data to be interpolated.
-
based_on(str, default:'macrostate') –Column name in df containing values of the independent variable. Values must be real, finite, and in strictly increasing order.
Returns:
-
df_interp–A pandas DataFrame containing interpolated data.
Source code in src/asaf/utils.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
mu_to_fugacity
Convert chemical potential (in J) to fugacity (in Pa).
Note: the volume scale for fugacity is Å^3. Ref: Equation 73 in Dubbeldam et al., Molecular Simulation, 2013, Vol. 39, Nos. 14–15, 1253–1292, https://dx.doi.org/10.1080/08927022.2013.819102
Source code in src/asaf/utils.py
131 132 133 134 135 136 137 138 139 | |
normalize
Normalize the natural logarithm of the macrostate probability.
Parameters:
Returns:
-
Normalized natural logarithm of the macrostate probability.–
Source code in src/asaf/utils.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
quote
Quotes a string with single quotes.
Source code in src/asaf/utils.py
18 19 20 | |
temperature_to_beta
Convert temperature (in K) to beta (in J^-1) using Boltzmann constant.
Source code in src/asaf/utils.py
114 115 116 117 | |
options: filters: ["!^_"]