I forwarded this to imp-dev since I am not super familiar with the MD support int IMP. My guess is that the velocities are not being added before the OptimizerState is called.
As for the other questions, the general error handler function is now IMP::base::handle_error (and is now documented). You can also do "catch throw" in gdb to break any time there is an exception, but this is a bit annoying when reading pdbs as exceptions are thrown over missing/unknown atoms.
I am getting an IMP usage exception when I try to use a
VelocityScalingOptimizerState (output run from gdb):
Traceback (most recent call last):
Â File "generateTrajectories.py", line 56, in <module>
line 107, in runMolecularDynamics
line 59, in runMdStage
line 3049, in optimize
ÂÂÂ return _IMP.Optimizer_optimize(self, *args)
_IMP.UsageException: Usage check failure: Can't get attribute that is
Context: MD 0::optimize/simulate
WARNINGÂ No frames were saved to file "HierarchySaveLink0" even though
objects were added.
WARNINGÂ Object "HierarchySaveLink0" was never used. See the
IMP::Object documentation for an explanation.
WARNINGÂ Object "lj_flex_flex" was never used. See the IMP::Object
documentation for an explanation.
[Inferior 1 (process 40694) exited with code 01]
I can use other OptimizerStates without seeing this error.
VelocityScalingOptimizerState was working before but stopped after I
changed some of my code (no IMP updates) around so I am probably not
initializing something correctly.
I tried running it with gdb but it appears to exit without allowing me
to see the backtrace (it says 'no stack' when I type backtrace).
Previously I was able to set a breakpoint when a usage exception was
occurring by typing
before running gdb. But that seems to no longer work:
(gdb) break IMP::internal::assert_fail
Function "IMP::internal::assert_fail" not defined.
Make breakpoint pending on future shared library load? (y or [n])
So my questions:
1. Does anything immediately stand out to you with the error?
2. Can I get gdb to stop upon the Usage Exception with the stack in
memory so I can track down the error?