I just fixed the bug that was causing the headers to not be added to all the files and the %1% file to be created. Sorry about that. The test cases were a bit too simple to catch the bug. They have been improved and hopefully will catch such problems better in the future.


On Jun 13, 2011, at 9:46 AM, Davide Bał wrote:

Hi, 

I have some problem in understanding how the new writers work.

I'm using the CMMwriter like, writing out only the final model (frame):
# Setup a CMM writer
writer = IMP.display.CMMWriter("model.%1%.cmm")
log = IMP.display.WriteOptimizerState(writer)
g = IMP.display.XYZRsGeometry(ps)
log.add_geometry(g)
log.update()

This generates the model file with the coordinates (each line is a chimera marker) and a file called "model.%1%.cmm", which only contains the header line:
<marker_set name="model.0.cmm">

This header should be in the model file, but since it is missing it causes a problem with chimera. Is there a way to get rid of the model.%1%.cmm file so that to have just one file containing all the informations? I've tried without the %1% string:
writer = IMP.display.CMMWriter("model.1.cmm")

but that rises the error:
e = o.do_optimize(steps)
  File "/usr/src/imp/trunk/build/lib/IMP/core/__init__.py", line 4338, in do_optimize
    return _IMP_core.MonteCarlo_do_optimize(self, *args)
_IMP.InternalException: Cannot set frame on writer without file name pattern.

Thanks,
Davide


--
Davide Bał
Structural Genomics Laboratory
Bioinformatics & Genomics Department, Prince Felipe Research Center
Avda. Autopista del Saler 16, 46012 Valencia, Spain
Tel: +34 96 328 96 80 (ext. 1004)  Fax: +34 96 328 97 01
email: 
dbau@cipf.es  web: http://bioinfo.cipf.es/dbau/


_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev