Skip to content

Commit 0b3d44f

Browse files
jaclark5orbeckstdotsdlCopilot
authored
Lammps Support (#348)
* Add lammps file generation and parsing * Update formatting * Update variables in generated files * Add input for mbar * Remove print * Bug fix file outputs * Bug fix file format * Bug fix param start, add dataframe for potential * Bug fix loops in mbar generation * Add precision values for processing lammps input files * Add error catch for column definition in extract_u_nk * Add abs to nblocks calc * Bug fix, nblocks * Add calculation of beta based on lammps units Add generation of u_nk and dHdl from linearly related dependencies * Update module docstring * Add name to author list * Added to changelog * Update docs * Run Black * Sort lambda values for consistent output * Update lammps.extract_dHdl defaults * Update error for lambda values * Update extract_dHdl* to use prec * update parsing.lammps.py docstrings * Run Black * Add ensemble support * Bug fix, inputs for extract_dHdl * Add LAMMPS unit conversion for pV term in npt u_r * Fixed kT multiplication issue in dHdl * Resolve deprecation warnings * Resolve pandas depreication warning * Moving average (#381) * Add moving_average function for visualization and convergence testing * Update versionadded * Run Black * Bug fix bar_.py states * Update Changelog * Update the docs * Add tests * Formatting to align with Black * Update tests * Refactor moving_average to align with forward_backward_convergence function * Update tests * Update test_convergence and lambda tests in convergence.moving_average * Adjust convergence.py and tests for codecoverage * black * Update moving_average to block_average for more accurate descriptive name * Address reviewer comments * Update test to align with changed handling of dfs of different length in block_average * Remove incorrect popagation of error in BAR * Add tests and error catch for ill constructed BAR input, u_nk * black * Updated version comments --------- Co-authored-by: Oliver Beckstein <orbeckst@gmail.com> * Added to changelog * initial CITATION.cff file - generated with https://bit.ly/cffinit - authors and order from AUTHORS - affiliations and ORCID from JOSS paper - emails from paper or individuals Co-authored-by: David L. Dotson <dotsdl@gmail.com> * add JOSS paper as preferred citation to CITATION - inferred DOI from proof - assume final acceptance in 2024... * added references for MBAR and equilibration detection * inserted additional JOSS paper authors in software author list - added David Mobley @davidlmobley (original conception and design of alchemlyb) - added Michael Shirts @mrshirts (original conception and design of alchemlyb) * updated CHANGES and AUTHORS for 2.3.3 - CHANGES: bump to 2.3.3 - add reminder to AUTHORS to also update CITATION.cff * add authors to CITATION who had NOT been in AUTHORS Added all authors that were mentioned in the Acknowledgements of the JOSS paper but were not in AUTHORS - Wei-Tse Hsu @wehs7661 (2020) for code clean-up in a732380 - Jan Janssen @jan-janssen (2022) for creating the conda-forge package - Shujie Fan @VOD555 (2022) for initial code for fractional equilibration time - Helmut Carter @helmutcarter (2024) for doc fix in #356 * add @jaclark5 to AUTHORS and CITATION.cff AUTHORS entry had been forgotten in PR #381 * Resolve bug in bar_model.delta_f_ creation (#397) * fix bug introduced in PR #381: there was a change to creating the delta_f_ matrix, which resulted in the columns and indices being tuples that were in the wrong order for single lambda computations. * ensure that columns are in the correct order by explicitly sorting * add a test for the delta_f_ columns * black-formatted files * replace setup.py,cfg with pyproject.toml - fix #385 - use pyproject.toml instead of setup.py (note: may need to change README for PyPi to exclude banners) - remove versioneer and use versioningit (use alchemlyb.__version__ directly where the version is needed, e.g., for sphinx docs) - updated CHANGES for 2.4.0 * house-keeping - gitignore _version - ignore commits for blame that contain black-reformatting (in particular we forgot to include #280) * make repo title identical to JOSS paper title (#404) - close #402 - use same title in CITATION.cff for paper and project (required for the JOSS paper publication #71) - added DOI for preferred citation in note because that is the only hint that shows up on zenodo) * [doc] tutorial: use alchemlyb.concat (#399) replace `pandas.concat()` with `alchemlyb.concat()` in the tutorial (given that we explicitly tell users to use it) * Update version * Formatting * FutureWarning * Added commenting extract_u_nk * Add names, bug fix dHdl * Bug fix columns, add name attribute * Add testing * Black, add handling for compressed files * Black for lammps parsing and handling compressed files * Address code coverage * Address test issues * Address test issues * Fix test issue * Add tol parameter to lammps.extract_u_nk for case where rounding errors are greater than machine precision * Update docstrings and tests for filenames and scaling factors * Abstract ensemble check and add description of main functions * ruff mypy * Remove unused variable * ruff remove dHdl.mul() * Update module docstring * Coverage * ruff * Fix code block * Update module docstring * Update src/alchemlyb/parsing/lammps.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix inverted logic * ruff --------- Co-authored-by: Oliver Beckstein <orbeckst@gmail.com> Co-authored-by: David L. Dotson <dotsdl@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1aa56d7 commit 0b3d44f

File tree

6 files changed

+2655
-1
lines changed

6 files changed

+2655
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build
66
docs/_build/
77
src/alchemlyb.egg-info/
88
__pycache__
9-
.coverage.*
9+
.coverage*
1010
*~
1111
dist/
1212

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Changes
3434
Enhancements
3535
- Added matrices for entropy and enthalpy for MBAR (PR #406)
3636
- Parallelise read and preprocess for ABFE workflow. (PR #371)
37+
- Add support for LAMMPS FEP files (Issue #349, PR #348)
3738

3839

3940
09/19/2024 orbeckst, jaclark5

docs/parsing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,5 @@ See the documentation for the package you are using for more details on parser u
240240
namd
241241
gomc
242242
parquet
243+
lammps
243244

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
LAMMPS Parsing
2+
=============
3+
.. automodule:: alchemlyb.parsing.lammps
4+
5+
API Reference
6+
-------------
7+
This submodule includes these parsing functions:
8+
9+
.. autofunction:: alchemlyb.parsing.lammps.extract_dHdl
10+
.. autofunction:: alchemlyb.parsing.lammps.extract_u_nk
11+
.. autofunction:: alchemlyb.parsing.lammps.extract_dHdl_from_u_n
12+
.. autofunction:: alchemlyb.parsing.lammps.extract_u_nk_from_u_n
13+
.. autofunction:: alchemlyb.parsing.lammps.extract_H
14+
.. autofunction:: alchemlyb.parsing.lammps.beta_from_units

0 commit comments

Comments
 (0)