environment.yaml pulls new versions of packages that probably don't work together with this code
Is it possible to provide a list of package versions that once worked and can now be pinned? I find that the scripts here are not working and I am guessing the issues are related to changes to package versions newer than this one.
- Creating the env and attempting to run prep_SepTop_solvent.py gives me the error:
File "/Users/chrisneale/opt/anaconda3/envs/septop/lib/python3.12/site-packages/openff/toolkit/utils/ambertools_wrapper.py", line 64, in __init__ ambertools_version = out.decode("utf-8").split("\n")[1].split()[3].strip(":")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
When I run 'antechamber -L' I get output that doesn't have the version info but instead a blank line on line 2. Presumably I am getting AmberTools 24.8 now and before maybe the second line was not empty?
$ antechamber -L
List of the File Formats
file format type abbre. index | file format type abbre. index
--------------------------------------------------------------
Antechamber ac 1 | Sybyl Mol2 mol2 2
I can fix this simply by modifying site-packages/openff/toolkit/utils/ambertools_wrapper.py near line 64 to set ambertools_version = 'unknown' instead of trying to parse it.
- After fixing that, I get the error below. I'm not sure yet if that is a package issue or if I did something wrong, but having a list of pinned package versions that should work would really help here so that I could know that it should work.
File "/Users/chrisneale/opt/anaconda3/envs/septop/lib/python3.12/site-packages/parmed/gromacs/gromacstop.py", line 1060, in parametrize
atom.atom_type = params.atom_types[atom.type]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'dLIG2_O2D'
Thank you, Chris.
Could you share what package versions you have installed?
$ conda env create -f environment.yml -n septop --solver=libmamba
...
$ conda list -n septop
# packages in environment at /Users/chrisneale/opt/anaconda3/envs/septop:
#
# Name Version Build Channel
ambertools 24.8 cuda_None_nompi_py312h9f183f7_101 conda-forge
amberutils 21.0 pypi_0 pypi
arpack 3.9.1 nompi_hdfe9103_102 conda-forge
blosc 1.21.6 hd145fbb_1 conda-forge
brotli 1.1.0 h00291cd_2 conda-forge
brotli-bin 1.1.0 h00291cd_2 conda-forge
bzip2 1.0.8 hfdf4475_7 conda-forge
c-ares 1.34.5 hf13058a_0 conda-forge
c-blosc2 2.17.1 h62acda9_0 conda-forge
ca-certificates 2025.4.26 hbd8a1cb_0 conda-forge
cairo 1.18.4 h950ec3b_0 conda-forge
chardet 5.2.0 pyhd8ed1ab_3 conda-forge
colorama 0.4.6 pyhd8ed1ab_1 conda-forge
contourpy 1.3.2 py312hc47a885_0 conda-forge
cycler 0.12.1 pyhd8ed1ab_1 conda-forge
cyrus-sasl 2.1.27 hf9bab2b_7 conda-forge
edgembar 3.0 pypi_0 pypi
exceptiongroup 1.2.2 pyhd8ed1ab_1 conda-forge
fftw 3.3.10 nompi_h292e606_110 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 h77eed37_3 conda-forge
fontconfig 2.15.0 h37eeddb_1 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
fonttools 4.57.0 py312h3520af0_0 conda-forge
freetype 2.13.3 h694c41f_1 conda-forge
freetype-py 2.3.0 pyhd8ed1ab_0 conda-forge
greenlet 3.2.1 py312haafddd8_0 conda-forge
hdf4 4.2.15 h8138101_7 conda-forge
hdf5 1.14.6 nompi_h1607680_101 conda-forge
icu 75.1 h120a0e1_0 conda-forge
importlib-metadata 8.6.1 pyha770c72_0 conda-forge
iniconfig 2.0.0 pyhd8ed1ab_1 conda-forge
joblib 1.4.2 pyhd8ed1ab_1 conda-forge
khronos-opencl-icd-loader 2024.10.24 h6e16a3a_1 conda-forge
kiwisolver 1.4.8 py312h9275861_0 conda-forge
krb5 1.21.3 h37d8d59_0 conda-forge
lcms2 2.17 h72f5680_0 conda-forge
lerc 4.0.0 hcca01a6_1 conda-forge
libaec 1.1.3 h73e2aa4_0 conda-forge
libblas 3.9.0 31_h7f60823_openblas conda-forge
libboost 1.86.0 hf0da243_3 conda-forge
libboost-python 1.86.0 py312hdf63323_3 conda-forge
libbrotlicommon 1.1.0 h00291cd_2 conda-forge
libbrotlidec 1.1.0 h00291cd_2 conda-forge
libbrotlienc 1.1.0 h00291cd_2 conda-forge
libcblas 3.9.0 31_hff6cab4_openblas conda-forge
libcurl 8.13.0 h5dec5d8_0 conda-forge
libcxx 20.1.4 hf95d169_0 conda-forge
libdeflate 1.23 hcc1b750_0 conda-forge
libedit 3.1.20250104 pl5321ha958ccf_0 conda-forge
libev 4.33 h10d778d_2 conda-forge
libexpat 2.7.0 h240833e_0 conda-forge
libffi 3.4.6 h281671d_1 conda-forge
libfreetype 2.13.3 h694c41f_1 conda-forge
libfreetype6 2.13.3 h40dfd5c_1 conda-forge
libgfortran 5.0.0 14_2_0_h51e75f0_103 conda-forge
libgfortran5 14.2.0 h51e75f0_103 conda-forge
libglib 2.84.1 h3139dbc_1 conda-forge
libiconv 1.18 h4b5e92a_1 conda-forge
libintl 0.24.1 h27064b9_0 conda-forge
libjpeg-turbo 3.1.0 h6e16a3a_0 conda-forge
liblapack 3.9.0 31_h236ab99_openblas conda-forge
liblzma 5.8.1 hd471939_0 conda-forge
libnetcdf 4.9.2 nompi_h924628f_117 conda-forge
libnghttp2 1.64.0 hc7306c3_0 conda-forge
libntlm 1.8 h6e16a3a_0 conda-forge
libopenblas 0.3.29 openmp_hbf64a52_0 conda-forge
libpng 1.6.47 h3c4a55f_0 conda-forge
libpq 17.4 h9c5cfc2_1 conda-forge
librdkit 2025.03.2 h616af64_0 conda-forge
libsqlite 3.49.1 hdb6dae5_2 conda-forge
libssh2 1.11.1 hed3591d_0 conda-forge
libtiff 4.7.0 hb77a491_4 conda-forge
libwebp-base 1.5.0 h6cf52b4_0 conda-forge
libxcb 1.17.0 hf1f96e2_0 conda-forge
libxml2 2.13.7 h93c44a6_1 conda-forge
libzip 1.11.2 h31df5bb_0 conda-forge
libzlib 1.3.1 hd23fc13_2 conda-forge
llvm-openmp 20.1.4 ha54dae1_0 conda-forge
lz4-c 1.10.0 h240833e_1 conda-forge
matplotlib-base 3.10.1 py312h535dea3_0 conda-forge
mdtraj 1.10.3 py312h7bd2c7a_0 conda-forge
mmpbsa-py 16.0 pypi_0 pypi
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
ncurses 6.5 h0622a9a_3 conda-forge
netcdf-fortran 4.6.1 nompi_hc6d3b56_109 conda-forge
networkx 3.4.2 pyh267e887_2 conda-forge
numexpr 2.10.2 py312ha51eba0_0 conda-forge
numpy 2.2.5 py312h6693b03_0 conda-forge
ocl_icd_wrapper_apple 1.0.0 hbcb3906_0 conda-forge
opencl-headers 2024.10.24 h240833e_0 conda-forge
openeye-toolkits 2024.2.1 py312_0 openeye
openff-forcefields 2024.09.0 pyhff2d567_0 conda-forge
openff-toolkit 0.10.6 pyhd8ed1ab_0 conda-forge
openff-toolkit-base 0.10.6 pyhd8ed1ab_0 conda-forge
openjpeg 2.5.3 h7fd6d84_0 conda-forge
openldap 2.6.9 hd8a590d_0 conda-forge
openmm 8.2.0 py312h5ac0382_2_khronos conda-forge
openssl 3.5.0 hc426f3f_1 conda-forge
packaging 25.0 pyh29332c3_1 conda-forge
packmol-memgen 2025.1.29 pypi_0 pypi
pandas 2.2.3 py312hec45ffd_3 conda-forge
parmed 4.3.0 py312h9a1398e_1 conda-forge
pcre2 10.45 hf733adb_0 conda-forge
pdb4amber 22.0 pypi_0 pypi
perl 5.32.1 7_h10d778d_perl5 conda-forge
pillow 11.1.0 py312hd9f36e3_0 conda-forge
pip 25.1 pyh8b19718_0 conda-forge
pixman 0.46.0 h1fd1274_0 conda-forge
pluggy 1.5.0 pyhd8ed1ab_1 conda-forge
pthread-stubs 0.4 h00291cd_1002 conda-forge
py-cpuinfo 9.0.0 pyhd8ed1ab_1 conda-forge
pycairo 1.28.0 py312h4c91fdb_0 conda-forge
pymsmt 22.0 pypi_0 pypi
pyparsing 3.2.3 pyhd8ed1ab_1 conda-forge
pytables 3.10.2 py312hbf54895_3 conda-forge
pytest 8.3.5 pyhd8ed1ab_0 conda-forge
python 3.12.10 h9ccd52b_0_cpython conda-forge
python-constraint 1.4.0 pyhff2d567_1 conda-forge
python-dateutil 2.9.0.post0 pyhff2d567_1 conda-forge
python-tzdata 2025.2 pyhd8ed1ab_0 conda-forge
python_abi 3.12 7_cp312 conda-forge
pytraj 2.0.6 pypi_0 pypi
pytz 2025.2 pyhd8ed1ab_0 conda-forge
qhull 2020.2 h3c5361c_5 conda-forge
rdkit 2025.03.2 py312h1148e59_0 conda-forge
readline 8.2 h7cca4af_2 conda-forge
reportlab 4.4.0 py312h01d7ebd_0 conda-forge
rlpycairo 0.2.0 pyhd8ed1ab_0 conda-forge
sander 22.0 pypi_0 pypi
scipy 1.15.2 py312hd04560d_0 conda-forge
setuptools 80.1.0 pyhff2d567_0 conda-forge
six 1.17.0 pyhd8ed1ab_0 conda-forge
smirnoff99frosst 1.1.0 pyh44b312d_0 conda-forge
snappy 1.2.1 haf3c120_1 conda-forge
sqlalchemy 2.0.40 py312h01d7ebd_0 conda-forge
tk 8.6.13 h1abcd95_1 conda-forge
tomli 2.2.1 pyhd8ed1ab_1 conda-forge
typing-extensions 4.13.2 h0e9735f_0 conda-forge
typing_extensions 4.13.2 pyh29332c3_0 conda-forge
tzdata 2025b h78e105d_0 conda-forge
unicodedata2 16.0.0 py312h01d7ebd_0 conda-forge
wheel 0.45.1 pyhd8ed1ab_1 conda-forge
xmltodict 0.14.2 pyhd8ed1ab_1 conda-forge
xorg-libice 1.1.2 h6e16a3a_0 conda-forge
xorg-libsm 1.2.6 h6e16a3a_0 conda-forge
xorg-libx11 1.8.12 h217831a_0 conda-forge
xorg-libxau 1.0.12 h6e16a3a_0 conda-forge
xorg-libxdmcp 1.1.5 h00291cd_0 conda-forge
xorg-libxext 1.3.6 h00291cd_0 conda-forge
xorg-libxt 1.3.1 h6e16a3a_0 conda-forge
zipp 3.21.0 pyhd8ed1ab_1 conda-forge
zlib 1.3.1 hd23fc13_2 conda-forge
zlib-ng 2.2.4 h04d1b7c_0 conda-forge
zstd 1.5.7 h8210216_2 conda-forge
For the second error, I can reproduce by simply trying to read the hybrid top file that was generated earlier in the script.
import parmed as pmd
gro = pmd.load_file('step1.top')
$ grep O2D step1.top
O2D 6 12.010780 0.00000000 A 0.34806469 0.36350306
49 dLIG2_O2D 2 UNL C1 49 0.0 12.010780 scaled_LIG2_O2D -0.05662000 12.010780
Still unclear if I am doing something wrong or if this is also related to versions. All I did was clone the repo, create/activate the env, modify the example script as below and then run it.
$ diff ../build/SeparatedTopologies/prep_SepTop_solvent.py prep_SepTop_solvent.py
13c13
< path = ''
---
> path = '../build/SeparatedTopologies/example/BACE/solvent'
16,17c16,17
< ligand_A = ''
< ligand_B = ''
---
> ligand_A = 'lig_13'
> ligand_B = 'lig_16'
I tried building with ambertools=22, which gave me this version:
ambertools 22.5 py310hb305a0b_0 conda-forge
and indeed the second line of the “antechamber -L” output there has the version information, so I think issue A is just versioning:
Welcome to antechamber 22.0: molecular input file processor.
I do still get the “KeyError: 'dLIG2_O2D'” error, but perhaps my usage is just wrong for that case.
Issue B (the KeyError) was resolved by pinning parmed=3.4.4, which gave me:
parmed 3.4.4 py39h7a8716b_0 conda-forge
In summary, pinning ambertools 22 and parmed 3.4.4 resolved all issues arising from running prep_SepTop_solvent.py on the provided BACE example system.
You almost surely want ParmEd 3