-
Notifications
You must be signed in to change notification settings - Fork 101
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
Generalize download_opls_xml
Function
#1054
base: main
Are you sure you want to change the base?
Conversation
…ization iterations
Thanks @shehan807. This looks good to me. Can you install and run the linter on your changes to ensure they match the style guidelines: https://materialsproject.github.io/atomate2/dev/dev_install.html#installing-pre-commit
|
Hi @utf, I just wanted to follow up on this. It seems like the only issue is regarding the changes I've made using the On a slightly separate note, I wanted to raise the issue regarding version control of LigParGen. Based on my issue on the LigParGen repository (Isra3l/ligpargen#31 (comment)), I learned that the server has only kept up with BOSS v4.9 (the program managed by the Jorgenson group that operates under the hood for LigParGen). Perhaps @orionarcher could comment here, since in the case of high throughput OPLS-AA simulations, I wonder if extending the current |
@@ -86,7 +110,7 @@ def download_opls_xml( | |||
|
|||
file = next(Path(tmpdir).iterdir()) | |||
# copy downloaded file to output_file using os | |||
Path(file).rename(final_file) | |||
shutil.copy(file, final_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIll this change leave extra files in the downloads directory?
One comment but LGTM, thanks @shehan807. It should be fine to build an integration that works if BOSS is available as an executable. Atomate2 has integrations with other closed-source codes like VASP. |
Summary
Include a summary of major changes in bullet points:
src/atomate2/openmm
contains utils.py, for which the LigParGen server is accessed; currently, thedownload_opla_xml
function allows only SMILES string inputs. This feature generalizes this by modifying the input dictionary (dict[str, str]
) to a dictionary of dictionaries (dict[str, dict[str, str]]
), where the new input handles the molecule's charge and number of optimization iterations. A working dictionary, then, follows:shutil.copy(file, final_file)
resolves this issue.Additional dependencies introduced (if any)
Path(file).rename(final_file)
can fail for environments where the .XML file from LigParGen is created in a/tmp
folder.shutil
allows a standard copy; it is possible that, in a high-throughput test case, this results in performance loss.TODO (if any)
If this is a work-in-progress, write something about what else needs to be done.
utils.py
, but has not been updated intests/openmm_md/test_utils.py
.Checklist
Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.
Before a pull request can be merged, the following items must be checked:
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running
ruff
andruff format
on your new code. This willautomatically reformat your code to PEP8 conventions and fix many linting issues.
Run ruff on your code.
type check your code.
Note that the CI system will run all the above checks. But it will be much more
efficient if you already fix most errors prior to submitting the PR. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply run
pre-commit install
and a check will be run prior to allowing commits.