Hi there,

I am currently using IMP to generate several models in which I apply a set of 62 restraints, plus ExcludeVolume (I work with XYZR sphere decorators). When I try to run the script 1000 times in order to generate 1000 different models, it work. However, when I try to run it 50.000 times, it came up with an error:

The script does the following:
o = IMP.core.ConjugateGradients(model_to_optimize)
o.set_scoring_function(scoring_function) # this method return the scoring function that is being used
o.optimize(num_iterations) # The maximum number of iteration of the optimizer to perform.
# Returns the final score


When I try to run it a lot of times, the following error come up:


"""
  Traceback (most recent call last):
  File "/home/altair/bin/pycharm-community-2019.2.3/helpers/pydev/pydevd.py", line 1415, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/home/altair/bin/pycharm-community-2019.2.3/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/altair/PycharmProjects/IMP/SCRIPTS_ALTAIR/scripts/exocyst_architecture.py", line 18, in <module>
    n=50000, tags=False, log_file=False)
  File "/home/altair/PycharmProjects/IMP/SCRIPTS_ALTAIR/scripts/exocyst_main.py", line 655, in create_models
    conjugate_gradient_optimization(model, sf, num_iterations)  # OPTIMIZATION STEP #
  File "/home/altair/PycharmProjects/IMP/SCRIPTS_ALTAIR/scripts/exocyst_main.py", line 223, in conjugate_gradient_optimization
    o.optimize(num_iterations)  # The maximum number of iteration of the optimizer to perform.
  File "/home/altair/anaconda3/lib/python3.7/site-packages/IMP/__init__.py", line 5804, in optimize
    return _IMP_kernel.Optimizer_optimize(self, max_steps)
_IMP_kernel.ModelException: Failure in ConjugateGradients

Process finished with exit code 1
"""

What does it mean? Is it a problem on the max_steps of the Optimizer function? Why is this error comming up in the iteration 6000 ,e.g and not in the first one?

Thanks you!

Sincerely,

Altair