Skip to content

Conversation

@DavidW99
Copy link
Contributor

@DavidW99 DavidW99 commented Feb 6, 2026

This pull request introduces several improvements across the documentation, Python, and C++/Kokkos codebases for FLARE. The changes include updating documentation and installation instructions, improving error handling in the LAMMPS plugin C++ code, and correcting data types for Kokkos compatibility. Additionally, there are minor bug fixes and code cleanups.

Documentation and Installation Updates:

  • Updated installation instructions to use Python 3.10 and GCC 11, removed the requirement to clone the development branch, and updated example paths to reflect Python 3.10. [1] [2] [3] [4]
  • Revised tutorial links and descriptions in colabs.rst, updating the main FLARE tutorial and improving clarity.

LAMMPS Plugin and C++ Improvements:

  • Added error handling for file reading in the LAMMPS plugin C++ code, ensuring errors on unexpected end-of-file conditions. [1] [2] [3] [4] [5] [6] [7]

Kokkos Codebase Corrections:

  • Updated Kokkos floating-point types including from X_FLOAT/F_FLOAT to KK_FLOAT/KK_ACC_FLOAT throughout the Kokkos pair potential implementation. [1] [2] [3] [4] [5] [6] [7] [8]

Python Code Fixes:

  • Fixed handling of model_post and compute commands in flare/md/lammps.py to use lists consistently, preventing string concatenation bugs. Also, corrected the expected type for the velocity parameter for ASE LAMMPS calculator. [1] [2]
  • Corrected a typo in a comment from "intialize" to "initialize" in flare/scripts/otf_train.py.

Workflow Simplification:

  • Removed a patch step for ASE in the GitHub Actions workflow.

@DavidW99 DavidW99 requested review from anjohan and Copilot February 6, 2026 04:01
@DavidW99 DavidW99 self-assigned this Feb 6, 2026
@DavidW99 DavidW99 added bug Something isn't working enhancement New feature or request labels Feb 6, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances the FLARE codebase with comprehensive improvements across documentation, C++ LAMMPS plugins, Kokkos implementations, and Python code. The changes focus on updating installation requirements, improving error handling in file I/O operations, modernizing Kokkos type definitions, and fixing several bugs in Python code.

Changes:

  • Updated installation documentation to use Python 3.10 and GCC 11, and removed the development branch requirement
  • Added comprehensive error handling for file reading operations in LAMMPS C++ plugins with NULL checks on fgets() calls
  • Migrated Kokkos code from deprecated float types (X_FLOAT, F_FLOAT, E_FLOAT) to modern types (KK_FLOAT, KK_ACC_FLOAT)
  • Fixed Python bugs in LAMMPS calculator related to list/string type handling and corrected sscanf pointer usage in C++ code

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_mgp.py Moved pytest skip check from decorator to inside fixture body for better clarity
tests/test_lammps.py Corrected velocity parameter type from list to string to match ASE LAMMPS API
lammps_plugins/pair_mgp.cpp Added NULL checks for fgets() calls and fixed sscanf char array pointer usage
lammps_plugins/pair_flare.cpp Added NULL checks for fgets() calls and fixed sscanf char array pointer usage
lammps_plugins/compute_flare_std_atom.cpp Added comprehensive error handling for file reading operations
lammps_plugins/kokkos/pair_mgp_kokkos.h Updated type definitions from F_FLOAT/E_FLOAT to KK_FLOAT/KK_ACC_FLOAT
lammps_plugins/kokkos/pair_mgp_kokkos.cpp Replaced all deprecated Kokkos float types with modern equivalents
lammps_plugins/kokkos/pair_flare_kokkos.h Updated Kokkos type definitions and view types
lammps_plugins/kokkos/pair_flare_kokkos.cpp Migrated to KK_FLOAT and KK_ACC_FLOAT throughout
flare/scripts/otf_train.py Fixed typo: "intialize" → "initialize"
flare/md/lammps.py Fixed model_post list append operations and velocity parameter type
docs/source/tutorials/colabs.rst Updated main tutorial link and description
docs/source/installation/install.rst Updated Python version examples from 3.8 to 3.10
.github/workflows/flare.yml Updated to GCC 11 and removed ASE patch step

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant