Skip to content

Fix scan energy positions, explicit empty pKa element lists, and folder lookup past the first page - #19

Closed
rpinho wants to merge 1 commit into
rowansci:masterfrom
rpinho:fix-scan-pka-folder
Closed

rpinho wants to merge 1 commit into
rowansci:masterfrom
rpinho:fix-scan-pka-folder

Conversation

@rpinho

@rpinho rpinho commented Nov 14, 2026

Copy link
Copy Markdown

Three small bugs, each with a test:

  1. ScanResult.get_energies drops calculations with a null UUID before pairing energies with scan points, so the positions shift. For a 1D scan with scan_points=['first', None, 'last'] (one point still running), result(wait=False).get_energies() raises ValueError from zip. For a 2D grid, the remaining energies land on the wrong grid points. Missing points now get None and keep their position.
  2. submit_pka_workflow fills its defaults with or, so an explicit protonate_elements=[] sends [7] and deprotonate_elements=[] sends [7, 8, 16]. The defaults now apply only when the argument is None.
  3. get_folder only searches the first page of matching folders. With more than 100 matches, an existing folder past the first page isn't found, so it creates a duplicate (or raises with create=False). It now pages through the matches.

I know this repo mirrors your internal one (#18), so feel free to take these there instead.

Tests: tests/test_scan_results.py, tests/test_pka_selection.py and tests/test_folder_lookup.py fail on master (10 failed) and pass here. ruff format, ruff check and ty check are clean; pytest: 99 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

…ookup paging

- ScanResult.get_energies keeps scan-point positions when a calculation is missing.
- submit_pka_workflow applies element defaults only for None, not [].
- get_folder pages through matches before creating a folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N
@jevandezande

Copy link
Copy Markdown
Contributor

Thanks for the suggestions. We don't take external code (as you rightly recognized, this is a mirror). I'll look into fixing these issues.

@rpinho

rpinho commented Nov 17, 2026

Copy link
Copy Markdown
Author

Thanks so much!

@rpinho

rpinho commented Nov 19, 2026

Copy link
Copy Markdown
Author

Hey, I understand this is not helpful. What would be helpful? We would be glad to help in any way we can. What's a hard problem?

@jevandezande

Copy link
Copy Markdown
Contributor

Hey, I understand this is not helpful. What would be helpful? We would be glad to help in any way we can. What's a hard problem?

In general, reporting well-scoped and validated issues is helpful, we just don't accept PRs. This repo is a mirror of our internal code, and thus we can't take PRs on it, and we like to make sure we write the code ourselves to ensure we understand all the minutæ in our codebase.

If you are interested in solving bigger problems, I recommend checking out our blog post from last year on Open-Source Projects We Wish Existed. Some of them have been solved but many of them are still open and difficult questions. I personally would like to see more standalone (i.e. only numpy and scipy, no ase) open-source (MIT or BSD, no GPL) packages solving things in the transition-state finding space.

@rpinho

rpinho commented Nov 19, 2026

Copy link
Copy Markdown
Author

Thanks, that's helpful.

@rpinho

rpinho commented Nov 19, 2026

Copy link
Copy Markdown
Author

I saw your blog post on open-source projects you wish existed, so we built the NEB one: https://github.com/rpinho/nudged-elastic-band

It's plain NumPy and MIT. It matches ASE's CI-NEB + FIRE on Baker25 with GFN2-xTB. I'm doing this with AI agents. Is this useful?

@jevandezande

Copy link
Copy Markdown
Contributor

Not particularly. The value comes from ensuring that it is robust and efficient for a large variety of different structures, has well-validated criteria, and outperforms other codes in this space. I've personally written NEB since we published the blog post and it required a lot of work to make an efficient and performant code. Things like linear interpolation often fail for even trivial things like a phenyl rotation. Also, the Baker25 test set is very small and I question the validity of at least one of its reported transition states.

@rpinho

rpinho commented Nov 19, 2026

Copy link
Copy Markdown
Author

Makes sense. Thanks for looking into this.

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.

2 participants