Analyzer

Analyzer module provides a bunch of shortcuts for performing the most commonly used analysing method, like curve fitting, structure determination and time series analysis.

Note

Deprecated. This module is developed for personal projects. It’s not a comprehensive analysis toolkit.

Structural analysis

calc_weighted_average(array, weight)

Calculate the weighted average of 2-dimensional data

calc_com(atoms)

Calculate the center of mass of a group of atoms

calc_rg(atoms)

Calculate the radius of gyration of a group of atoms

calc_hull_volume(atoms)

Calculate the volume occupied by a groups of at least four atoms

Structural analysis for vapor-liquid interface

check_vle_density(series)

Check whether or not a density profile represents a vapor-liquid interface with canny edge method

N_vaporize_condense(phases)

Check how many times one molecules have vaporized or condensed

Time series analysis

block_average(series[, n_block])

Calculate the block average, standard deviation and their standard errors

average_of_blocks(series[, n_block])

Split data to several blocks and return the average and standard deviation of each block

is_converged(series[, frac_min])

Determine whether a time series has converged or not

efficiency_with_block_size(data)

Calculate the statistical efficiency of block average with different block size.

Curve fitting

polyfit(x, y, degree[, weight])

Least square n-th order polynomial fitting: y = c0 + c1 * x + c2 * x**2 + .

polyval(x, coeff)

Evaluate the n-th order polynomial result: y = c0 + c1 * x + c2 * x**2 + .

polyval_derivative(x, coeff)

Evaluate the n-th order polynomial result and derivative: y = c0 + c1 * x + c2 * x**2 + .

polyfit_2d(x, y, z, degree[, weight])

Least square n-th order 2-D polynomial fitting.

polyval_derivative_2d(x, y, degree, coeff)

Evaluate the n-th order 2-D polynomial result and derivative.

curve_fit_rsq(func, x_list, y_list[, guess, ...])

Least square curve fitting

fit_vle_dminus(T_list, dminus_list[, guess, ...])

Fit critical temperature using VLE density: dliq - dgas = B(1-T/Tc)**0.325

fit_vle_dplus(T_list, dplus_list, Tc[, ...])

Fit critical density using VLE density and critical temperature: dliq + dgas = 2(Dc+A(1-T/Tc))