Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N
Author
|
Let me know if you have any thoughts on this one. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's a bug in
get_tmc_mol: the SMILES round trips that fix up the transition-metal chemistry renumber the atoms, so the result isn't in input order, even though the docstring says it is. Withremove_Hs=Falsethe supplied hydrogen coordinates are also replaced by generated ones.to_rdkit([30, 17, 17], [[0, 0, 0], [2.2, 0, 0], [-2.2, 0, 0]])(ZnCl2) returns atoms[17, 30, 17]. For a zinc-ammonia complex with explicit hydrogens, the returned H positions are 0.35-0.50 Å from the ones supplied. Any input with a transition metal goes through this path with default settings.This keeps the existing chemistry corrections, matches the corrected molecule back to the input atoms with the existing
__origIdxproperties, restores input order, and puts back every supplied coordinate. If no complete match is found it raises, whichto_rdkitreports as its existingSteamrollConversionError, instead of returning atoms in the wrong order.Test:
tests/test_tmc_atom_order.py(ZnCl2, and zinc-ammonia in two input orders, with and without H removal) goes from 5 failed, 1 passed to 6 passed. The six existing transition-metal fixtures (ferrocene, UCl6, PdCl2(MeCN)2 and others) all come back with input atom order and coordinates.ruff,tyand the release smoke tests pass; the full suite passes (100), apart from an intermittent native RDKit EHT crash that also happens on main.🤖 Generated with Claude Code
https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N