Skip to content

ENH: Support sockets for NWChem #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Aug 17, 2025
Merged

Conversation

HaoZeke
Copy link
Collaborator

@HaoZeke HaoZeke commented Aug 14, 2025

Basically a manyfold increase compared to the existing ASE wrapper. Over 16 steps of a minimization times are:

40s with unix sockets
47s with TCP/IP
78s with ASE

This implements an independent "server" which implements enough of the i-Pi protocol to talk to NWChem. Closes #247.

@HaoZeke HaoZeke requested a review from Copilot August 14, 2025 23:34
Copilot

This comment was marked as outdated.

@HaoZeke
Copy link
Collaborator Author

HaoZeke commented Aug 15, 2025

Best to wait until nwchemgit/nwchem#1145 with which times go down to around 17s (with a local build including scalapack).

@HaoZeke HaoZeke requested a review from Copilot August 15, 2025 18:08
Copilot

This comment was marked as outdated.

@HaoZeke HaoZeke requested a review from Copilot August 17, 2025 22:08
Copy link
Contributor

@Copilot 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 PR implements a socket-driven NWChem potential that provides significant performance improvements over the existing ASE wrapper by communicating directly with NWChem using the i-PI protocol.

  • Adds SocketNWChemPot class that implements TCP/IP and UNIX domain socket communication with NWChem
  • Refactors ZBL potential parameter handling to use structured options approach
  • Includes comprehensive test infrastructure and example configurations

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
eon/schema.py Adds SocketNWChemPot configuration schema and updates ZBL parameter formatting
eon/config.yaml Adds SocketNWChemPot configuration options
client/potentials/SocketNWChem/* Core implementation of socket-based NWChem potential with header, source, and build files
client/potentials/ZBL/ZBLPot.cpp Updates to use structured ZBL options from parameters
client/Parameters.* Adds socket_nwchem_options struct and refactors ZBL options
client/BaseStructures.h Adds SocketNWChem to PotType enum
client/gtests/* Comprehensive test infrastructure for socket NWChem functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HaoZeke
Copy link
Collaborator Author

HaoZeke commented Aug 17, 2025

Needs some documentation for later, but generally with rgpycrumbs this is fairly easy to work with:

generate_nwchem_input.py
mpirun -np 8 /home/rgoswami/Git/Github/Fortran/nwchem/bin/LINUX64/nwchem nwchem_socket.nwi
# other terminal
eonclient

where a good default for the nwchem_settings.nwi is

basis noprint
  * library 3-21G
end

scf
  nopen 0
  thresh 1e-8
  maxiter 200
end

@HaoZeke HaoZeke merged commit c458013 into TheochemUI:main Aug 17, 2025
5 checks passed
HaoZeke added a commit to HaoZeke/eOn that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Enhance the nwchem socket parameters
1 participant