Amber parsing
Parsers for extracting alchemical data from AMBER output files.
Some of the file parsing parts are adapted from alchemical-analysis.
Changed in version 1.0.0: Now raises ValueError when an invalid file is given to the parser.
Now raises ValueError when inconsistency in MBAR states/data is found.
- alchemlyb.parsing.amber.convert_to_pandas(file_datum: Any) DataFrame[source]
Convert the data structure from numpy to pandas format
- class alchemlyb.parsing.amber.SectionParser(filename: str)[source]
A simple parser to extract data values from sections.
- class alchemlyb.parsing.amber.FEData[source]
A simple struct container to collect data from individual files.
- clambda
- t0
- dt
- T
- ntpr
- bar_intervall
- have_mbar
- mbar_lambda_idx
- alchemlyb.parsing.amber.file_validation(outfile: str) FEData[source]
Function that validate and parse an AMBER output file.
ValueErrorare risen if inconsinstencies in the input file are found.
- alchemlyb.parsing.amber.extract(outfile: str, T: float) dict[str, None | DataFrame][source]
Return reduced potentials u_nk and gradients dH/dl from AMBER outputfile.
- Parameters:
- Returns:
A dictionary with keys of ‘u_nk’, which is a pandas DataFrame of reduced potentials for each alchemical state (k) for each frame (n), and ‘dHdl’, which is a Series of dH/dl as a function of time for this lambda window.
- Return type:
Added in version 1.0.0.
- alchemlyb.parsing.amber.extract_dHdl(outfile: str, T: float) None | DataFrame[source]
Return gradients dH/dl from AMBER TI outputfile.
- Parameters:
- Returns:
dH/dl – dH/dl as a function of time for this lambda window.
- Return type:
Changed in version 0.5.0: The
scipy.constantsis used for parsers instead of the constants used by the corresponding MD engine.
- alchemlyb.parsing.amber.extract_u_nk(outfile: str, T: float) None | DataFrame[source]
Return reduced potentials u_nk from AMBER outputfile.
- Parameters:
- Returns:
u_nk – Reduced potential for each alchemical state (k) for each frame (n).
- Return type:
Changed in version 0.5.0: The
scipy.constantsis used for parsers instead of the constants used by the corresponding MD engine.
The parsers featured in this module are constructed to properly parse Amber MD output files containing derivatives of the Hamiltonian and FEP (BAR/MBAR) data.
API Reference
This submodule includes these parsing functions:
- alchemlyb.parsing.amber.extract_dHdl(outfile: str, T: float) None | DataFrame[source]
Return gradients dH/dl from AMBER TI outputfile.
- Parameters:
- Returns:
dH/dl – dH/dl as a function of time for this lambda window.
- Return type:
Changed in version 0.5.0: The
scipy.constantsis used for parsers instead of the constants used by the corresponding MD engine.
- alchemlyb.parsing.amber.extract_u_nk(outfile: str, T: float) None | DataFrame[source]
Return reduced potentials u_nk from AMBER outputfile.
- Parameters:
- Returns:
u_nk – Reduced potential for each alchemical state (k) for each frame (n).
- Return type:
Changed in version 0.5.0: The
scipy.constantsis used for parsers instead of the constants used by the corresponding MD engine.
- alchemlyb.parsing.amber.extract(outfile: str, T: float) dict[str, None | DataFrame][source]
Return reduced potentials u_nk and gradients dH/dl from AMBER outputfile.
- Parameters:
- Returns:
A dictionary with keys of ‘u_nk’, which is a pandas DataFrame of reduced potentials for each alchemical state (k) for each frame (n), and ‘dHdl’, which is a Series of dH/dl as a function of time for this lambda window.
- Return type:
Added in version 1.0.0.