msmbuilder / msmbuilder-legacy

Legacy release of MSMBuilder
http://msmbuilder.org
GNU General Public License v2.0
25 stars 28 forks source link

Bug detecting existing Assignmemts.h5 in Assign.py #349

Open kyleabeauchamp opened 10 years ago

kyleabeauchamp commented 10 years ago

So if you do this:

Cluster.py rmsd kcenters -k 50
Assign.py rmsd

You end up with a totally arcane error:

{'generators': 'Data/Gens.h5',
 'metric': 'rmsd',
 'output_dir': 'Data/',
 'project': 'ProjectInfo.yaml',
 'quiet': False,
 'rmsd_atom_indices': 'AtomIndices.dat'}
Traceback (most recent call last):
  File "/home/kyleb/opt/bin/Assign.py", line 5, in <module>
    pkg_resources.run_script('msmbuilder==2.8', 'Assign.py')
  File "/home/kyleb/opt/lib/python2.7/site-packages/pkg_resources.py", line 505, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/kyleb/opt/lib/python2.7/site-packages/pkg_resources.py", line 1245, in run_script
    execfile(script_filename, namespace, namespace)
  File "/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/EGG-INFO/scripts/Assign.py", line 99, in <module>
    main(args, metric)
  File "/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/EGG-INFO/scripts/Assign.py", line 90, in main
    distances_path, atom_indices_to_load=atom_indices)
  File "/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/msmbuilder/assigning.py", line 165, in assign_with_checkpoint
    fh_a, fh_d = _setup_containers(project, assignments_path, distances_path)
  File "/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/msmbuilder/assigning.py", line 55, in _setup_containers
    check_container(assignments_fn)
  File "/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/msmbuilder/assigning.py", line 45, in check_container
    if fh.root.completed_trajs.shape != (project.n_trajs,):
  File "/home/kyleb/opt/lib/python2.7/site-packages/tables/group.py", line 813, in __getattr__
    return self._f_get_child(name)
  File "/home/kyleb/opt/lib/python2.7/site-packages/tables/group.py", line 683, in _f_get_child
    self._g_check_has_child(childname)
  File "/home/kyleb/opt/lib/python2.7/site-packages/tables/group.py", line 407, in _g_check_has_child
    % (self._v_pathname, name))
tables.exceptions.NoSuchNodeError: group ``/`` does not have a child named ``completed_trajs``
Closing remaining open files: Data/Assignments.h5... done

The issue is that Assign.py supports checkpointing, but when Cluster.py auto-assigns, it doesn't save the checkpointing data.

garrettjchan commented 10 years ago

I have the same issue. Were you able to find a solution?

schwancr commented 10 years ago

This happens when Cluster.py has already written the Assignments.h5 file. When you cluster with a stride of 1 it uses all of your data, which means you do not need to run Assign.py