Skip to content
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

[Python 3.9] Clar SciPy Re-implementation, pythoncall Debugging, Optional RMS #2694

Merged
merged 165 commits into from
Dec 3, 2024

Conversation

JacksonBurns
Copy link
Contributor

This PR replaces #2623 as discussed in this comment: #2687 (comment)

ChrisBNEU and others added 27 commits May 17, 2024 15:36
added per sevy's review

Co-authored-by: Sevy Harris <[email protected]>
also update the final run example - the point of specifying the `PYTHONPATH` was so that users _don't_ have to give the full path to `rmg.py` - the `python` executable can search it out
- clearer error messages

Co-authored-by: Hao-Wei Pang <[email protected]>
1. Replace lpsolve APIs with the scipy milp APIs. The new implementation potentially have a slightly better performance (due to vectorization, less data transfer, comparable solver performance, etc.) and improved readability.
2. Decouple the MILP solving step (as _solve_clar_milp ) from the MILP formulation step. The motivation is to avoid unnecessary computation. The original approach includes molecule analysis (specifically `get_aromatic_rings`) into the recursive calls. However, this is not necessary, as molecules are just copied and not modified at all. Therefore analyzing once is enough.
@JacksonBurns
Copy link
Contributor Author

Docs build might not need to build Julia stuff anymore

@JacksonBurns
Copy link
Contributor Author

pydest-xdist works in pure python mode, so you can run the tests in parallel! 🎉

@JacksonBurns
Copy link
Contributor Author

Need to update graphviz version to the latest

@JacksonBurns
Copy link
Contributor Author

After optimization to get the Clar number, brute force enumerate all structures with that Clar number.

@JacksonBurns
Copy link
Contributor Author

Also, we should not optimize past the most optimal clar structure.

@JacksonBurns
Copy link
Contributor Author

Tweak formulation for this - rather than recursively calling, just add a new constraint that the previous clar number must be met, then stop iterating once infeasible (need to continually copy the molecule?).

@JacksonBurns
Copy link
Contributor Author

Latest commits have successfully re-implemented the solver with SciPy. I will merge this PR now, resolve the few oustanding unit test failures in the base branch, and then work toward adding back Julia and getting this ready to go to main.

@JacksonBurns JacksonBurns marked this pull request as ready for review December 3, 2024 18:31
@JacksonBurns JacksonBurns merged commit 10ddb5c into feat/py39 Dec 3, 2024
1 of 7 checks passed
@JacksonBurns JacksonBurns deleted the feat/resonance_scipy branch December 3, 2024 18:31
@JacksonBurns JacksonBurns restored the feat/resonance_scipy branch December 3, 2024 18:33
JacksonBurns added a commit that referenced this pull request Dec 3, 2024
JacksonBurns added a commit that referenced this pull request Dec 3, 2024
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.