-
Notifications
You must be signed in to change notification settings - Fork 93
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
Partial charge methods fail in clean environment #1911
Comments
Thanks for the detailed writeup. I'm unable to reproduce on an ARM mac, but I'm charging my old intel mac to try it there. |
Some of our CI should be testing on intel macs, and I'm not seeing any issues there, though
|
Unable to reproduce with intel mac on OSX 13.2.1, updating to 14 and will report back. |
Thanks! And on my end, this is reproducible (not related to this specific molecule/solvent box). Hit the bug trying to use OpenFE stuff (on real ligands) with @mikemhenry and we initially thought it might be related to RDKit, but it does not seem to be. I'm happy to do additional debugging if you need. |
Darn, my intel macbook isn't compatible with OSX 14. If you're up to iterate a bit, could you let me know if this reproduces the issue? from openff.toolkit import Molecule
mol = Molecule.from_smiles('[H][O][C]([H])([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[H]')
mol.assign_partial_charges("am1bcc") |
And if that DOES reproduce the issue, could you run mol.generate_conformers()
mol.to_file('temp.sdf', file_format='sdf') and in the terminal
and let me know what happens? |
The small snippet does not reproduce the error. |
Oh wait! I ran it once and it completed without error. I ran it a second time and it did reproduce the error. Fun. ~/tmp is 📦 v0.1.0 via 🐍 v3.12.4 via 🅒 openff-clean took 10s
❯ python tmp5.py
(openff-clean)
~/tmp is 📦 v0.1.0 via 🐍 v3.12.4 via 🅒 openff-clean took 27s
❯ python tmp5.py
/Users/slochowe/miniforge3/envs/openff-clean/bin/wrapped_progs/antechamber: Fatal Error!
Cannot properly run "/Users/slochowe/miniforge3/envs/openff-clean/bin/sqm -O -i sqm.in -o sqm.out".
Traceback (most recent call last):
File "/Users/slochowe/tmp/tmp5.py", line 3, in <module>
mol.assign_partial_charges("am1bcc")
File "/Users/slochowe/miniforge3/envs/openff-clean/lib/python3.12/site-packages/openff/toolkit/topology/molecule.py", line 2677, in assign_partial_charges
toolkit_registry.call(
File "/Users/slochowe/miniforge3/envs/openff-clean/lib/python3.12/site-packages/openff/toolkit/utils/toolkit_registry.py", line 280, in call
raise ValueError(msg)
ValueError: No registered toolkits can provide the capability "assign_partial_charges" for args "()" and kwargs "{'molecule': Molecule with name '' and SMILES '[H][O][C]([H])([H])[C]([H])([H])[C]([H])([H])[C]([H])([H])[H]', 'partial_charge_method': 'am1bcc', 'use_conformers': None, 'strict_n_conformers': False, 'normalize_partial_charges': True, '_cls': <class 'openff.toolkit.topology.molecule.Molecule'>}"
Available toolkits are: [ToolkitWrapper around The RDKit version 2024.03.5, ToolkitWrapper around AmberTools version 23.6, ToolkitWrapper around Built-in Toolkit version None]
ToolkitWrapper around The RDKit version 2024.03.5 <class 'openff.toolkit.utils.exceptions.ChargeMethodUnavailableError'> : partial_charge_method 'am1bcc' is not available from RDKitToolkitWrapper. Available charge methods are {'mmff94': {}, 'gasteiger': {}}
ToolkitWrapper around AmberTools version 23.6 <class 'subprocess.CalledProcessError'> : Command '['antechamber', '-i', 'molecule.sdf', '-fi', 'sdf', '-o', 'charged.mol2', '-fo', 'mol2', '-pf', 'yes', '-dr', 'n', '-c', 'bcc', '-nc', '0.0']' returned non-zero exit status 1.
ToolkitWrapper around Built-in Toolkit version None <class 'openff.toolkit.utils.exceptions.ChargeMethodUnavailableError'> : Partial charge method "am1bcc"" is not supported by the Built-in toolkit. Available charge methods are {'zeros': {'rec_confs': 0, 'min_confs': 0, 'max_confs': 0}, 'formal_charge': {'rec_confs': 0, 'min_confs': 0, 'max_confs': 0}} |
🫠 |
@slochower can you try this? |
Looks like 5/10. Perfect. I made a slight modification Here's another version:
|
Okay, so it's Ambertools that is leading to the mess.
WHen it fails, it's linked to And this is what happens when
|
The input file should have the coordinates in it after the
|
Can you try installing ambertools 22? Hopefully it doesn't cause too much package churn, on my system it looks like this:
which for our testing purposes isn't too bad, another option would be to keep ambertools 23, but just install an older build, like before mpi support was added for example. |
Oof. Couldn't install with the existing 3.12 environment. Stepped back to 3.11, also dependency conflicts. Stepped back to 3.10, also dependency conflicts...
|
sigh, how about |
Sadly not. Looks like
|
Is that making a fresh env? Using some hacks (I am on linux) it looks like it should solve on osx-arm64 |
Good point. Although 23.3 is still flaky. I can step back to 22 in a new environment.
Here's
😰 |
okay one more idea, see if adding the |
I think that needs something after it? |
You are correct! Another option to pass in is |
I don't think this is a problem inside
|
IIUC, the toolkit doesn't actually write that file, so something before that step is failing? I can't reproduce this behavior this morning using |
Describe the bug
In a new, clean OpenFF environment on an x86-64 Mac (14.4.1), partial charge methods fail. This is either from
antechamber
or possiblysqm
and probably related to issues that I've seen @mattwthompson talking about with the Amber folks.For this test script:
I'm seeing:
The test cases also fail.
To Reproduce
conda create --name openff-clean
mamba install -c conda-forge openff-toolkit
tmp.py
python tmp.py
Output
`conda list`
CC @mikemhenry
The text was updated successfully, but these errors were encountered: