Describe the bug
toolkit_registry = ToolkitRegistry(toolkit_precedence=[AmberToolsToolkitWrapper, RDKitToolkitWrapper])
molecule = Molecule.from_smiles('CC(=O)[O-]')
molecule.compute_partial_charges_am1bcc(toolkit_registry=toolkit_registry)
Output
Antechamber complains about the central carbon only having three bonds
Solution
Turn acdoctor off using -dr n command line arguments.
Similar issue is listed here: http://archive.ambermd.org/201705/0020.html
One complication is that this may not work with AmberMini, since acdoctor wasn't bundled into antechamber until recently.
Computing environment (please complete the following information):
MacOS X
(off-dev) jwagner@MBP-S$ conda list
# packages in environment at /Users/jwagner/miniconda3/envs/off-dev:
#
# Name Version Build Channel
alabaster 0.7.12 py_0 conda-forge
ambertools 18.0 0 omnia
appnope 0.1.0 py37_1000 conda-forge
arrow-cpp 0.13.0 py37h43d7656_7 conda-forge
asn1crypto 1.0.1 py37_0 conda-forge
atomicwrites 1.3.0 py_0 conda-forge
attrs 19.2.0 py_0 conda-forge
babel 2.7.0 py_0 conda-forge
backcall 0.1.0 py_0 conda-forge
bleach 3.1.0 py_0 conda-forge
boost 1.70.0 py37haf112f3_1 conda-forge
boost-cpp 1.70.0 h75728bb_2 conda-forge
brotli 1.0.7 h6de7cb9_1000 conda-forge
bson 0.5.8 py_0 conda-forge
bzip2 1.0.8 h01d97ff_1 conda-forge
ca-certificates 2019.11.28 hecc5488_0 conda-forge
cairo 1.16.0 he1c11cd_1002 conda-forge
certifi 2019.11.28 py37_0 conda-forge
cffi 1.12.3 py37hccf1714_0 conda-forge
chardet 3.0.4 py37_1003 conda-forge
codecov 2.0.15 py_1 conda-forge
coverage 5.0.2 py37h0b31af3_0 conda-forge
cryptography 2.7 py37h212c5bf_0 conda-forge
cython 0.29.13 py37h6de7cb9_0 conda-forge
dbus 1.13.6 h2f22bb5_0 conda-forge
decorator 4.4.0 py_0 conda-forge
defusedxml 0.6.0 py_0 conda-forge
docutils 0.15.2 py37_0 conda-forge
double-conversion 3.1.5 h4a8c4bd_2 conda-forge
entrypoints 0.3 py37_1000 conda-forge
expat 2.2.5 h6de7cb9_1003 conda-forge
fftw3f 3.3.4 2 omnia
fontconfig 2.13.1 h6b1039f_1001 conda-forge
freetype 2.10.0 h24853df_1 conda-forge
gettext 0.19.8.1 h46ab8bc_1002 conda-forge
gflags 2.2.2 h4a8c4bd_1002 conda-forge
glib 2.58.3 h9d45998_1002 conda-forge
glog 0.4.0 h6de7cb9_1 conda-forge
h5py 2.10.0 nompi_py37h106b333_101 conda-forge
hdf5 1.10.5 nompi_h3e39495_1104 conda-forge
icu 64.2 h6de7cb9_1 conda-forge
idna 2.8 py37_1000 conda-forge
imagesize 1.1.0 py_0 conda-forge
importlib_metadata 0.23 py37_0 conda-forge
ipykernel 5.1.2 py37h5ca1d4c_0 conda-forge
ipython 7.8.0 py37h5ca1d4c_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 7.5.1 py_0 conda-forge
jedi 0.15.1 py37_0 conda-forge
jinja2 2.10.3 py_0 conda-forge
jpeg 9c h1de35cc_1001 conda-forge
jsonschema 3.1.1 py37_0 conda-forge
jupyter 1.0.0 py_2 conda-forge
jupyter_client 5.3.3 py37_1 conda-forge
jupyter_console 6.0.0 py_0 conda-forge
jupyter_core 4.5.0 py_0 conda-forge
libblas 3.8.0 13_openblas conda-forge
libcblas 3.8.0 13_openblas conda-forge
libclang 8.0.1 h770b8ee_1 conda-forge
libcxx 9.0.0 0 conda-forge
libcxxabi 9.0.0 0 conda-forge
libevent 2.1.10 hafa8578_0 conda-forge
libffi 3.2.1 h6de7cb9_1006 conda-forge
libgcc 4.8.5 1 conda-forge
libgfortran 4.0.0 2 conda-forge
libiconv 1.15 h01d97ff_1005 conda-forge
liblapack 3.8.0 13_openblas conda-forge
libllvm8 8.0.1 h770b8ee_0 conda-forge
libopenblas 0.3.7 h4bb4525_1 conda-forge
libpng 1.6.37 h2573ce8_0 conda-forge
libprotobuf 3.8.0 hfbae3c0_0 conda-forge
libsodium 1.0.17 h01d97ff_0 conda-forge
libtiff 4.0.10 hd08fb8f_1003 conda-forge
libxml2 2.9.9 h12c6b28_5 conda-forge
llvm-openmp 9.0.0 h40edb58_0 conda-forge
lz4-c 1.8.3 h6de7cb9_1001 conda-forge
m2r 0.2.1 py_0 conda-forge
markupsafe 1.1.1 py37h1de35cc_0 conda-forge
mistune 0.8.4 py37h1de35cc_1000 conda-forge
more-itertools 7.2.0 py_0 conda-forge
msgpack-python 0.6.2 py37h770b8ee_0 conda-forge
nbconvert 5.6.0 py37_1 conda-forge
nbformat 4.4.0 py_1 conda-forge
nbsphinx 0.4.3 py_0 conda-forge
nbval 0.9.4 py_0 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
networkx 2.4 py_0 conda-forge
nglview 2.7.1 pyh5ca1d4c_0 conda-forge
notebook 6.0.1 py37_0 conda-forge
nspr 4.20 h0a44026_1000 conda-forge
nss 3.46 hcec2283_0 conda-forge
numpy 1.17.2 py37h6b0580a_0 conda-forge
numpydoc 0.9.1 py_0 conda-forge
olefile 0.46 py_0 conda-forge
openeye-toolkits 2019.10.2 py37_0 openeye
openforcefield 0.5.1+9.gd2e7173.dirty dev_0 <develop>
openforcefields 1.0.0 py37_0 omnia
openmm 7.4.1 py37_cuda101_rc_1 omnia
openssl 1.1.1d h0b31af3_0 conda-forge
packaging 19.2 py_0 conda-forge
pandas 0.25.1 py37h86efe34_0 conda-forge
pandoc 2.7.3 0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
parmed 3.2.0 py37_0 omnia
parquet-cpp 1.5.1 2 conda-forge
parso 0.5.1 py_0 conda-forge
pcre 8.41 h4a8c4bd_1004 conda-forge
pexpect 4.7.0 py37_0 conda-forge
pickleshare 0.7.5 py37_1000 conda-forge
pillow 6.2.0 py37hb6f49c9_0 conda-forge
pint 0.10.1 py_0 conda-forge
pip 19.2.3 py37_0 conda-forge
pixman 0.38.0 h01d97ff_1003 conda-forge
plotly 4.5.0 py_0 conda-forge
pluggy 0.13.0 py37_0 conda-forge
prometheus_client 0.7.1 py_0 conda-forge
prompt_toolkit 2.0.10 py_0 conda-forge
psutil 5.6.7 py37h0b31af3_0 conda-forge
ptyprocess 0.6.0 py_1001 conda-forge
py 1.8.0 py_0 conda-forge
py-cpuinfo 5.0.0 py_0 conda-forge
pyarrow 0.13.0 py37he1943e6_2 conda-forge
pycairo 1.18.1 py37h650f75e_0 conda-forge
pycparser 2.19 py37_1 conda-forge
pydantic 1.4 py37h0b31af3_0 conda-forge
pygments 2.4.2 py_0 conda-forge
pyopenssl 19.0.0 py37_0 conda-forge
pyparsing 2.4.2 py_0 conda-forge
pyqt 5.12.3 py37h2a560b1_0 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
pyrsistent 0.15.4 py37h01d97ff_0 conda-forge
pysocks 1.7.1 py37_0 conda-forge
pytest 5.3.2 py37_0 conda-forge
pytest-cov 2.8.1 py_0 conda-forge
python 3.7.3 h93065d6_1 conda-forge
python-dateutil 2.8.0 py_0 conda-forge
pytz 2019.3 py_0 conda-forge
pyyaml 5.1.2 py37h01d97ff_0 conda-forge
pyzmq 18.1.0 py37hee98d25_0 conda-forge
qcelemental 0.13.0 py_0 conda-forge
qcengine 0.13.0 py_0 conda-forge
qcportal 0.13.0 py_0 conda-forge
qt 5.12.5 h1b46049_0 conda-forge
qtconsole 4.5.5 py_0 conda-forge
rdkit 2019.03.4 py37h3471270_1 conda-forge
re2 2020.01.01 h4a8c4bd_0 conda-forge
readline 8.0 hcfe32e1_0 conda-forge
requests 2.22.0 py37_1 conda-forge
retrying 1.3.3 py_2 conda-forge
send2trash 1.5.0 py_0 conda-forge
setuptools 41.4.0 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
smirnoff99frosst 1.1.0 py37_1 omnia
snappy 1.1.7 h4a8c4bd_1003 conda-forge
snowballstemmer 2.0.0 py_0 conda-forge
sphinx 2.2.1 py_0 conda-forge
sphinx_bootstrap_theme 0.6.4 py_0 conda-forge
sphinxcontrib-applehelp 1.0.1 py_0 conda-forge
sphinxcontrib-devhelp 1.0.1 py_0 conda-forge
sphinxcontrib-htmlhelp 1.0.2 py_0 conda-forge
sphinxcontrib-jsmath 1.0.1 py_0 conda-forge
sphinxcontrib-qthelp 1.0.2 py_0 conda-forge
sphinxcontrib-serializinghtml 1.1.3 py_0 conda-forge
sqlite 3.30.1 h93121df_0 conda-forge
terminado 0.8.2 py37_0 conda-forge
testpath 0.4.2 py_1001 conda-forge
thrift-cpp 0.12.0 h874095a_1004 conda-forge
tk 8.6.9 h2573ce8_1003 conda-forge
toml 0.10.0 py_0 conda-forge
tornado 6.0.3 py37h01d97ff_0 conda-forge
tqdm 4.42.1 py_0 conda-forge
traitlets 4.3.3 py37_0 conda-forge
urllib3 1.25.6 py37_0 conda-forge
wcwidth 0.1.7 py_1 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.33.6 py37_0 conda-forge
widgetsnbextension 3.5.1 py37_0 conda-forge
xmltodict 0.12.0 py_0 conda-forge
xz 5.2.4 h1de35cc_1001 conda-forge
yaml 0.1.7 h1de35cc_1001 conda-forge
zeromq 4.3.2 h6de7cb9_2 conda-forge
zipp 0.6.0 py_0 conda-forge
zlib 1.2.11 h0b31af3_1006 conda-forge
zstd 1.4.0 ha9f0a20_0 conda-forge
Additional context
Add any other context about the problem here.
While there's no antechamber --version we can parse, they do have different help messages we can parse to distinguish them. Notice the first line:
antechamber -h in ambermini:
antechamber -h
Usage: antechamber -i input file name
-fi input file format
-o output file name
-fo output file format
-c charge method
-cf charge file name
-nc net molecular charge (int)
-a additional file name
-fa additional file format
-ao additional file operation
crd : only read in coordinate
crg : only read in charge
radius: only read in radius
name : only read in atom name
type : only read in atom type
bond : only read in bond type
-m multiplicity (2S+1), default is 1
-rn residue name, overrides input file, default is MOL
...
antechamber in ambertools==19:
antechamber -h
Welcome to antechamber 19.0: molecular input file processor.
Usage: antechamber -i input file name
-fi input file format
-o output file name
-fo output file format
-c charge method
-cf charge file name
-nc net molecular charge (int)
-a additional file name
-fa additional file format
-ao additional file operation
crd : only read in coordinate
crg : only read in charge
radius: only read in radius
name : only read in atom name
type : only read in atom type
bond : only read in bond type
-m multiplicity (2S+1), default is 1
-rn residue name, overrides input file, default is MOL
-rf residue toplogy file name in prep input file,
default is molecule.res
-ch check file name for gaussian, default is 'molecule'
-ek mopac or sqm keyword, inside quotes; overwrites previous ones
-gk gaussian job keyword, inside quotes
Hm, I'm realizing that, with the addition of WBO calculations in AmberToolsToolkitWrapper (#508), as well as the antechamber API changes in this issue, we might not WANT to provide support for AmberMini (which is based on AmberTools16) in our next release. Trying to support both would involve
compute_partial_charges_am1bcc depending on which version of AT is presentForcing all users to upgrade to AT19 would be a bit painful up front, but on the other hand, it would help with things like #130 (which can only be solved with an AT upgrade). Thoughts?
+1 on dropping support for AmberTools < 19 - it seems the maintenance overhead added by trying to support both would not be worth the effort, and migrating to 19 would provide significant benefits.
If this causes significant issues for users, they could always implement their own subclass of AmberToolsToolkitWrapper which uses older amber versions and use that in place of the default. If enough users complain, this could be added to the toolkit directly but probably isn't worth the effort unless many complaints appear on the issue tracker.
Yes, agree relating to force an upgrade. We should require the more recent version.
Maybe a deprecation warning in an intermediate release?
This reminds me that I should also add a run_constrained: ambermini=999999 to the CF ambertools package to avoid having both installed in the same environment.
I can do this now or as part of the AT 20 release.
I can do this now or as part of the AT 20 release.
Oh, it's awesome that you can make them mutually exclusive.
OFFTK 0.7.0 will miss its next-monday deadline, so accounting for conference travel, it will likely be out mid-March. So, if you could have the latest ambertools package built with the ambermini exclusion by March 15, that would be great for our timeline. (it's not important whether that's AT19 or AT20, just whatever the default conda install will pull)
Maybe a deprecation warning in an intermediate release?
I'd be OK with an _informative error_, but I'm not sure about a deprecation _warning_, since then we still have to do all of the work of supporting both versions simultaneously.
Don't get me wrong -- We do add deprecation warnings -- we're even adding some for compute_partial_charges_am1bcc in the coming 0.7.0 release. I just think that we can save a lot of time here by not trying to support both AmberTools versions simultaneously.
I jumped the gun on this and switched the openforcefield recipe from ambermini to ambertools on Jan 25. We can additionally pin to ambertools>=19 if you want!
We might only use acdoctor to get more information to include in an exception if the antechamber call fails for some reason.
No worries! We didn't have a test that triggered this behavior until now, so I'm also to blame (heck, it's on me that we were missing the test in the first place, and ALSO I approved the PR for the switch).
Most helpful comment
Yes, agree relating to force an upgrade. We should require the more recent version.