Hello,
We just came across an interesting bug here this afternoon. In fact it
was two interesting bugs, and we wouldn't have found either if it hadn't
been for both, so that was slightly bizarre. Both bugs are in Analysis
1.0.8 and neither are in earlier releases (the latest FormatConverter
release, 1.0.10, will have the same problem). One of the bugs is already
fixed (ccp/util/Molecule.py) and is on the update server. (That code was
introduced to make molecule creation much faster, it bypasses the API in
one or two spots which is always a dangerous thing to do, and is what
caused the problem.)
The other affects the API and is not yet fixed, and when it is fixed the
only way to get a proper fix will be to have a new release (but again,
1.0.7 and earlier release users are ok). Some of you might be aware that
we are in the process of changing the API generating machinery and this is
one of the bugs that cropped up because of that. (1.0.8 was the first
release with the new machinery's API output.)
Each XML file that holds your project's data is at runtime pointed to
something called a storage. If when using Analysis (or the
FormatConverter or whatever) you modify data pointed to by a given
storage, a flag (isModified) should be set to True. When that happens,
the next time you do a save that XML file gets updated on disk. The above
two bugs meant that the first time you created a molecule for a project
the molecule storage was not having its isModified flag set to True. So
it was not being saved (rather inconveniently). If you grabthe
Molecule.py file on the update server then (if you actually add residues
to the molecule) this problem will be sorted (even with the other bug).
The general API bug has the same issue. Sometimes (and it's only in
certain circumstances) a storage will be modified and it will not have
been noted as having been so done. Fortunately most times that a storage
is modified it is actually modified in several ways before a save, and
most of those would set the isModified flag to True. So that's why this
bug was so obscure, with "normal" usage you might never see it (we haven't
until now, after a couple of months of using the new API).
A couple of things you can do if you are right now in the middle of a
1.0.8 session. At the Python prompt (in the shell) if you want to just,
say, save the molecule storage, then do the following:
>>> p = top.project
>>> s = p.findFirstStorage(package='ccp.Molecule')
>>> s.save()
and if you want to just save everything (regardless of whether or not the
API thinks it is modified, because of this bug) then do:
>>> p = top.project
>>> p.saveAll()
Wayne
|