Setup will fail if .mol2 atom substructure ID matches filename
See original GitHub issueThis is very likely a niche issue (my very sloppy work found this error), but it may be worth sanitizing .mol2 files during setup–
If the substructure id for a atom in a mol2 file matches the filename, e.g.
20G.mol2
47 48 0 0 0
SMALL
GASTEIGER
@<TRIPOS>ATOM
1 C09 -2.7090 -4.5890 6.9990 C.2 203 20G 0.2532
2 N10 -3.6170 -5.6600 6.6290 N.am 203 20G -0.2986
3 C11 -4.8540 -5.3500 5.9460 C.3 203 20G 0.0164
....
Then setup will fail with the following:
2017-06-27 11:00:19,824: Setting CUDA platform to use precision model 'mixed'.
2017-06-27 11:00:19,828: Single node: executing <function _check_resume at 0x7f745d8cbe60>
2017-06-27 11:00:19,828: Single node: executing <function _setup_experiments at 0x7f745d8d1140>
2017-06-27 11:00:19,828: Setting up the systems for 4LUC, 20G and pme
2017-06-27 11:02:09,738: Single node: executing <function _safe_makedirs at 0x7f745d8d1320>
2017-06-27 11:02:09,738: Single node: executing <bound method YamlBuilder._generate_yaml of <yank.yamlbuild.YamlBuilder object at 0x7f745ccaaf50>>
2017-06-27 11:02:09,748: DSL string for the ligand: "resname 20G"
2017-06-27 11:02:09,748: DSL string for the solvent: "auto"
2017-06-27 11:02:09,749: Reading phase complex
2017-06-27 11:02:09,749: prmtop: ./setup/systems/4LUC/complex.prmtop
2017-06-27 11:02:09,749: inpcrd: ./setup/systems/4LUC/complex.inpcrd
Traceback (most recent call last):
File "/home/yanker/miniconda2/bin/yank", line 11, in <module>
load_entry_point('yank==0.16.1', 'console_scripts', 'yank')()
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/cli.py", line 71, in main
dispatched = getattr(commands, command).dispatch(command_args)
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/commands/script.py", line 100, in dispatch
yaml_builder.run_experiments()
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yamlbuild.py", line 1462, in run_experiments
for experiment_index, experiment in enumerate(self._build_experiments()):
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yamlbuild.py", line 2392, in _build_experiments
yield self._build_experiment(combination, output_dir)
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yamlbuild.py", line 2654, in _build_experiment
solvent_atoms=solvent_dsl)
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yank.py", line 90, in __init__
self.ligand_atoms = ligand_atoms
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yank.py", line 113, in ligand_atoms
self._ligand_atoms = self._resolve_atom_indices(value)
File "/home/yanker/miniconda2/lib/python2.7/site-packages/yank/yank.py", line 215, in _resolve_atom_indices
atoms_description = self._topology.select(atoms_description).tolist()
File "/home/yanker/miniconda2/lib/python2.7/site-packages/mdtraj/core/topology.py", line 933, in select
filter_func = parse_selection(selection_string).expr
File "/home/yanker/miniconda2/lib/python2.7/site-packages/mdtraj/core/selection.py", line 354, in __call__
raise ValueError('\n'.join(lines))
ValueError: Expected end of text (at char 10), (line:1, col:11): resname 20G
^^^
This occurs with the following:
yanker@hopper:~/yank_files/kras$ conda list
# packages in environment at /home/yanker/miniconda2:
#
alabaster 0.7.9 py27_0
alchemy 1.2.3 py27_0 omnia
ambermini 16.16.0 6 omnia
babel 2.3.4 py27_0
cairo 1.14.8 0
cffi 1.9.1 py27_0
click 6.7 <pip>
clusterutils 0.1.2 py27_0 omnia
conda 4.3.22 py27_0
conda-env 2.6.0 0
cryptography 1.7.1 py27_0
curl 7.49.0 1
cycler 0.10.0 py27_0
cython 0.25.2 py27_0
dbus 1.10.10 0
docopt 0.6.2 py27_1 omnia
docutils 0.12 py27_2
enum34 1.1.6 py27_0
expat 2.1.0 0
fftw3f 3.3.4 2 omnia
Flask 0.12 <pip>
fontconfig 2.12.1 3
freetype 2.5.5 2
functools32 3.2.3.2 py27_0
glib 2.50.2 1
gst-plugins-base 1.8.0 0
gstreamer 1.8.0 0
hdf4 4.2.12 0
hdf5 1.8.17 1
icu 54.1 0
idna 2.1 py27_0
imagesize 0.7.1 py27_0
ipaddress 1.0.17 py27_0
itsdangerous 0.24 <pip>
jinja2 2.8.1 py27_0
jpeg 8d 2
latexcodec 1.0.1 py27_0 omnia
libffi 3.2.1 1
libgcc 5.2.0 0
libgfortran 3.0.0 1
libiconv 1.14 0
libnetcdf 4.4.1 0
libpng 1.6.27 0
libxcb 1.12 1
libxml2 2.9.4 0
markupsafe 0.23 py27_2
matplotlib 2.0.0 np111py27_0
mdtraj 1.8.0 np111py27_1 omnia
mkl 2017.0.1 0
mpi4py 2.0.0 py27_2
mpich2 1.4.1p1 0
netcdf4 1.2.4 np111py27_0
nose 1.3.7 py27_1
numexpr 2.6.1 np111py27_2
numpy 1.11.3 py27_0
numpydoc 0.6.0 py27_0
openmm 7.2.0 py27_0 omnia/label/dev
openmmtools 0.11.0 py27_0 omnia
openmoltools 0.7.4 py27_0 omnia
openssl 1.0.2j 0
oset 0.1.3 py27_1 omnia
pandas 0.19.2 np111py27_1
parmed 2.7.1 py27_0 omnia
pcre 8.39 1
pip 8.1.2 py27_0
pixman 0.34.0 0
pyasn1 0.1.9 py27_0
pybtex 0.18 py27_0 omnia
pybtex-docutils 0.2.1 py27_1 omnia
pycairo 1.10.0 py27_0
pycosat 0.6.1 py27_1
pycparser 2.17 py27_0
pycrypto 2.6.1 py27_4
pygments 2.1.3 py27_0
pymbar 3.0.0.beta2 np111py27_0 omnia
pyopenssl 16.2.0 py27_0
pyparsing 2.1.4 py27_0
pyqt 5.6.0 py27_2
pytables 3.3.0 np111py27_0
python 2.7.12 1
python-dateutil 2.6.0 py27_0
pytz 2016.10 py27_0
pyyaml 3.12 py27_0
qt 5.6.2 2
readline 6.2 2
redis 2.10.5 <pip>
requests 2.12.4 py27_0
rq 0.7.1 <pip>
ruamel_yaml 0.11.14 py27_0
schema 0.6.2 py27_0 omnia
scipy 0.18.1 np111py27_1
setuptools 27.2.0 py27_0
sip 4.18 py27_0
six 1.10.0 py27_0
snowballstemmer 1.2.1 py27_0
sphinx 1.5.1 py27_0
sphinxcontrib-bibtex 0.3.2 py27_0 omnia
sqlite 3.13.0 0
subprocess32 3.2.6 py27_0 omnia
tk 8.5.18 0
Werkzeug 0.11.15 <pip>
wheel 0.29.0 py27_0
yaml 0.1.6 0
yank 0.16.1 py27_0 omnia
zlib 1.2.8 3
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Mol2 file format explained for beginners (Cheminformatics ...
This post will introduce you to the mol2 format in cheminformatics. ... (integer): The ID number of the substructure containing the atom ......
Read more >obabel and babel - Convert, Filter and Manipulate Chemical ...
If only input and output files are given, Open Babel will guess the file type ... Convert only molecules with the molecule in...
Read more >Maximum Common Substructure (MCS) search
Finding the Maximum Common Substructure (MCS) of two molecules is a problem with many applications in the field of cheminformatics. It can be...
Read more >choderalab/yank: 0.24.0 - Experimental support for ... - Zenodo
Peptide ligands are not currently supported (#376). Setup will fail if .mol2 atom substructure ID matches filename (#703).
Read more >Working with MOL2 Structures in DataFrames - BioPandas
atom_id (integer) = the ID number of the atom at the time the file was created. This is provided for reference only and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
DOES have such problems.
I see—the problem is that we create the
Topography
from theTopology
read in from the AMBERprmtop
file in these lines, so we would have to