Add fixed atoms feature to ML-FSM#27
Conversation
…e checking/inting errors
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Hi @joegomes, I've added a 2 commits that satisfy some of the type checking and linting. The only meaningful changes I have added are in the fsm_example.py where I removed a duplicate parse_indices function, and in coords.py where I shifted some code around such that fixed_atoms is an attribute of the base coordinates class so both redundant and Cartesian simply inherit it. Please look over it and make sure it still behaves identically to your original code, open to suggestions about how to better organize all of this. If all looks good feel free to merge into main, I'll write a fixed atoms test case before we cut a new version to appease codecov bot |
|
Hi @jonmarks12, I've tested these changes and things look good on my end! I forgot to update my code for |
jonmarks12
left a comment
There was a problem hiding this comment.
I believe this results in identical behavior to the code added in my prior commit on this pr. My original intent was to standardize fixed_atoms as an attribute defined once in the base Coordinates class, which is what the Redundant class currently uses.
As far as I can tell this doesn't introduce any functional difference, but it does create a stylistic difference between cartesian and redundant object implementations. If you agree, I'd suggest rolling this back so both classes follow the same pattern, and future classes can avoid having these ~5 lines every time.
if there is a difference I'm missing here please let me know, happy to keep it if so. Thanks!
|
Thanks for catching this. I originally had some failing test cases with LST and CART interpolation but I can't reproduce those errors now after rolling back the changes to |
This pull request adds:
In order to keep atom coordinates fixed during interpolation and optimization steps, several changes are needed:
CartesianOptimizeris supported.I'm guessing there are code tests that will fail, but I want to address the final point of (1) before fixing those issues. To test this out, I've added a job for proton transfer TS on a zeolite cluster where the terminal hydrogens are fixed to maintain crystallographic position. The job may be ran like
python fsm_example.py data/09_proton --calculator xtb --stepsize 0.2 --fixed "1-12". Here, atoms 1-12 are fixed. The code for parsing the fixed atoms flag should be flexible to handle mixed strings of comma-separated and hyphenated range values.