ValueError: attempt to get argmin of an empty sequence for p
See original GitHub issueWith the latest version of YANK, running the p-xylene-implicit example, via:
yank prepare binding amber --setupdir=setup --ligand=“resname BEN” --store=output --iterations=1000 --restraints=harmonic --gbsa=OBC2 --temperature=300*kelvin --verbose
Results in the following error:
Traceback (most recent call last):
File "/Users/FFF/anaconda/bin/yank", line 9, in <module>
load_entry_point('yank==0.9.0', 'console_scripts', 'yank')()
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/cli.py", line 105, in main
dispatched = getattr(commands, command).dispatch(args)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/commands/prepare.py", line 40, in dispatch
return dispatch_binding(args)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/commands/prepare.py", line 254, in dispatch_binding
utils.config_root_logger(verbose, log_file_path=os.path.join(store_dir, 'prepare.log'))
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/utils.py", line 128, in config_root_logger
file_handler = logging.FileHandler(log_file_path)
File "/Users/FFF/anaconda/lib/python2.7/logging/__init__.py", line 905, in __init__
StreamHandler.__init__(self, self._open())
File "/Users/FFF/anaconda/lib/python2.7/logging/__init__.py", line 935, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/Users/FFF/anaconda/pkgs/yank/examples/p-xylene-implicit/output/prepare.log'
To get around this, if you mkdir “output” in the same directory, and re-run the above command, the new error becomes:
2016-06-01 00:20:02,601: reading phase complex:
2016-06-01 00:20:02,602: prmtop: setup/complex.prmtop
2016-06-01 00:20:02,602: inpcrd: setup/complex.inpcrd
2016-06-01 00:20:02,972: reading phase solvent:
2016-06-01 00:20:02,973: prmtop: setup/solvent.prmtop
2016-06-01 00:20:02,973: inpcrd: setup/solvent.inpcrd
2016-06-01 00:20:03,000: TOTAL ATOMS : 2621
2016-06-01 00:20:03,000: receptor : 2621
2016-06-01 00:20:03,000: ligand : 0
2016-06-01 00:20:03,000: phases: ['complex-implicit', 'solvent-implicit']
2016-06-01 00:20:03,000: systems: ['complex-implicit', 'solvent-implicit']
2016-06-01 00:20:03,001: positions: ['complex-implicit', 'solvent-implicit']
2016-06-01 00:20:03,001: atom_indices: ['complex-implicit', 'solvent-implicit']
2016-06-01 00:20:03,001: thermodynamic_state: <ThermodynamicState object, temperature = 300 K, pressure = 1 atm>
2016-06-01 00:20:03,266: Creating receptor-ligand restraints...
Traceback (most recent call last):
File "/Users/FFF/anaconda/bin/yank", line 9, in <module>
load_entry_point('yank==0.9.0', 'console_scripts', 'yank')()
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/cli.py", line 105, in main
dispatched = getattr(commands, command).dispatch(args)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/commands/prepare.py", line 40, in dispatch
return dispatch_binding(args)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/commands/prepare.py", line 336, in dispatch_binding
yank.create(phases, systems, positions, atom_indices, thermodynamic_state)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/yank.py", line 231, in create
self._create_phase(phase, systems[phase], positions[phase], atom_indices[phase], thermodynamic_state, protocols=protocols)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/yank.py", line 328, in _create_phase
restraints = HarmonicReceptorLigandRestraint(thermodynamic_state, reference_system, reference_positions, atom_indices['receptor'], atom_indices['ligand'])
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/restraints.py", line 104, in __init__
self.restrained_ligand_atom = self._closestAtomToCentroid(self.coordinates, self.ligand_atoms)
File "/Users/FFF/anaconda/lib/python2.7/site-packages/yank-0.9.0-py2.7-macosx-10.5-x86_64.egg/yank/restraints.py", line 389, in _closestAtomToCentroid
closest_atom = int(np.argmin(distances))
File "/Users/FFF/anaconda/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 1028, in argmin
return argmin(axis, out)
This is run on OSX 10.11.13 using YANK 0.9.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
ValueError: attempt to get argmax of an empty sequence
The code is processing information from images sent to it from simulator. It runs well at first but when the array Rover.nav_angles is...
Read more >ValueError: attempt to get argmin of an empty sequence #249
When I do an attack with the foolbox, for 6 pictures everything works fine, but the i get the following error: File ...
Read more >Python ValueError: max() arg is an empty sequence Solution
The “ValueError: max() arg is an empty sequence” error is raised when you try to find the largest item in an empty list...
Read more >ValueError: attempt to get argmax of an empty ... - Biostars
Hi guys, I'm performing Multi-Trait Analysis of GWAS (mtag) (see the following link: https://github.com/JonJala/mtag.
Read more >attempt to get argmin of an empty sequence' on a Pandas ...
Coding example for the question Python how to fix 'ValueError: attempt to get argmin of an empty sequence' on a Pandas groupby object-Pandas,Python....
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
We can probably raise an informative exception if the DSL fails to match any atoms
Closing this as it was only an error in the command parameters. The PR #389 adds a more informative error message.