Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.64 KB

alchemlyb.parsing.namd.rst

File metadata and controls

34 lines (24 loc) · 1.64 KB

NAMD parsing

alchemlyb.parsing.namd

The parsers featured in this module are constructed to properly parse NAMD .fepout output files containing derivatives of the Hamiltonian and FEP (BAR) data. See the NAMD documentation for the theoretical backdrop and implementation details.

If you wish to use BAR on FEP data, be sure to provide the .fepout file from both the forward and reverse transformations.

After calling ~alchemlyb.parsing.namd.extract_u_nk on the forward and reverse work values, these dataframes can be combined into one:

# replace zeroes in initial dataframe with nan
u_nk_fwd.replace(0, np.nan, inplace=True)
# replace the nan values with the reverse dataframe --
# this should not overwrite any of the fwd work values 
u_nk_fwd[u_nk_fwd.isnull()] = u_nk_rev
# replace remaining nan values back to zero
u_nk_fwd.replace(np.nan, 0, inplace=True)
# sort final dataframe by `fep-lambda` (as opposed to `timestep`)
u_nk = u_nk_fwd.sort_index(level=u_nk_fwd.index.names[1:])

The fep-lambda index states at which lambda this particular frame was sampled, whereas the columns are the evaluations of the Hamiltonian (or the potential energy U) at other lambdas (sometimes called "foreign lambdas").

API Reference

This submodule includes these parsing functions:

alchemlyb.parsing.namd.extract_u_nk

alchemlyb.parsing.namd.extract