Hello,
I'm using the MC optimizer to optimize protein complexes represented by spheres. My script loops through various sets of restraints (either distance or MS-connectivity) and generates an ensemble of structures for each restraint set. My problem is that the speed of the optimizer changes drastically each time over the loop, and there is no correlation between the complexity of the restraint set and the speed of the optimizer. The speed usually varies between 10 and 30 models per second, but will sometimes slow to 1 model/10minutes forces me to terminate the script.
I always initialize each optmization cycle with new random coordinates, so I know I'm not simply getting stuck in a local minima, and I know the restraint sets themselves are all fine since I could loop over the same restraint set many times and the speed would change unpredictably. I've also tried setting up a completely new model instance for each restraint set, which doesn't solve the problem either.
for restraint set:
for oc in range(self.optimization_cycles): for particle in self.system.ds: ## RANDOMIZE COORDINATES init_coors = IMP.algebra.get_random_vector_in(self.system.bb ) particle.set_coordinates(init_coors)
T = self.initial_temperature for mc in range(self.mc_cool_cycles): ## DO THE ANNEALING MC T = 0.99*T self.optimizer.set_kt(T) self.optimizer.optimize(self.mc_cool_steps)
Any input is greatly appreciated.
Joe
On 4/12/16 7:48 PM, Joseph Eschweiler wrote: > I'm using the MC optimizer to optimize protein complexes represented by > spheres. My script loops through various sets of restraints (either > distance or MS-connectivity) and generates an ensemble of structures for > each restraint set. My problem is that the speed of the optimizer > changes drastically each time over the loop, and there is no correlation > between the complexity of the restraint set and the speed of the > optimizer. The speed usually varies between 10 and 30 models per second, > but will sometimes slow to 1 model/10minutes forces me to terminate the > script.
I can't think of anything in IMP that would cause such a drastic speed difference. (There are certain caches which, when invalidated, would have to be rebuilt, which will slow things down a bit - for example, the nonbonded list used by close pairs restraints - but that shouldn't be that noticeable.) Have you tried profiling or attaching a debugger during the slow steps? Possibly you are hitting a corner case where the MS-connectivity restraint gets confused; that restraint isn't used very often outside of native MS work.
Ben