Hello,
I just upgraded from 2.0 to 2.2 and now encounter an error that I'm unable to fix.
File "angle.py", line 64, in get_conformations cs = sampler.create_sample() File "/usr/lib64/python2.6/site-packages/IMP/kernel/__init__.py", line 4106, in create_sample return _IMP_kernel.Sampler_create_sample(self) _IMP_base.UsageException: Usage check failure: No optimized particles found Context: MCCG Sampler 0::create_sample/MCCG Sampler 0::do_sample
The code is pretty straightforward,
sampler = IMP.core.MCCGSampler(m) sampler.set_bounding_box(bb) sampler.set_number_of_conjugate_gradient_steps(1000) sampler.set_number_of_monte_carlo_steps(1000) sampler.set_number_of_attempts(10) cs = sampler.create_sample
What can I change to make this run again on 2.2?
Thank you for your time,
On 5/21/14, 4:03 PM, Joseph Eschweiler wrote: > _IMP_base.UsageException: Usage check failure: No optimized particles found > Context: MCCG Sampler 0::create_sample/MCCG Sampler 0::do_sample
Samplers are only really supposed to move particles that have been marked as optimizable. MC in 2.0 and earlier was a bit lax about actually enforcing this though - but as you've seen it was tightened up in 2.2. You'll need to mark your actual particles as optimizable, e.g. by calling XYZ::set_coordinates_are_optimized().
Ben