the headers are now added to the coordinate files but the files containing the header are still generated, e.g. setting "writer = IMP.display.CMMWriter("model.%1%.cmm")" generates a file named
"model.1.-1.cmm" which contains the following lines:
<marker_set name="model.1.0.cmm">
<marker_set name="model.1.0.cmm">
</marker_set>
Davide
On Jun 13, 2011, at 9:14 PM, Daniel Russel wrote:
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