API Reference

This submodule includes these parsing functions:

alchemlyb.parsing.parquet.extract_u_nk(path, T)

Return reduced potentials u_nk (unit: kT) from a pandas parquet file.

The parquet file should be serialised from the dataframe output from any parser with command (u_nk_df.to_parquet(path=path, index=True)).

Parameters:
  • path (str) – Path to parquet file to extract dataframe from.

  • T (float) – Temperature in Kelvin of the simulations.

Returns:

u_nk – Potential energy for each alchemical state (k) for each frame (n).

Return type:

DataFrame

Note

pyarraw serializers would handle the float or string column name fine but will convert multi-lambda column name from (0.0, 0.0) to “(‘0.0’, ‘0.0’)”. This parser will restore the correct column name. Also parquet serialisation doesn’t preserve the pandas.DataFrame.attrs. So the temperature is assigned in this function.

New in version 2.1.0.

alchemlyb.parsing.parquet.extract_dHdl(path, T)

Return gradients dH/dl (unit: kT) from a pandas parquet file.

The parquet file should be serialised from the dataframe output from any parser with command (dHdl_df.to_parquet(path=path, index=True)).

Parameters:
  • path (str) – Path to parquet file to extract dataframe from.

  • T (float) – Temperature in Kelvin the simulations sampled.

Returns:

dH/dl – dH/dl as a function of time for this lambda window.

Return type:

DataFrame

Note

Parquet serialisation doesn’t preserve the pandas.DataFrame.attrs. So the temperature is assigned in this function.

New in version 2.1.0.