The conversion should only be done for PDB files, because only in that case is
it reading the MODEL line, which must be a number. (I didn't check into what CIF
files do or if .isPDB is absolutely inclusive.) The issue was the distinction
between PDB model number listed and sequential model number. So you will see
methods in Atom, Viewer, ModelManager, and RepaintManager (where the frame stuff
is) that convert model number to model index. The model tag for XYZ files is
being drawn from the 2nd line, and I think MOL files from the first line -- you
should see important comments added to MolFileReader that indicate the MDL
format information for reference. Some changes were made there that are
important. I'd like to keep those comments there. Check for all occurances of
.isPDB and getModelNumber() in Bob200603. You'll see that there are other
references to it. I also set up ModelManager.isPDB() --> Frame.isPDB() that
could be used in general instead of group.chain.frame.isPDB, but I didn't ever
implement a call to it.
Miguel wrote:
This fixed a bug in labels with the %M format. Formerly it was
inserting the full model name, which could be very long, into the %M
atom label format.
OK ... that makes sense for %M formatting
(Which reminds me, please redo my fix of %m.)
This was reintroduced in the 10.00.50 release
Please redo that fix. There are some reader files fixes that go along
with this, as I recall. Check the commit trail.
%M will now report modelTagNumber instead of modelTag.
The implementation of getModelTagNumber() is another question.
I believe I made the
distinction now between modelTag and modelTagNumber. That's important.
getModelTagNumber() already existed.
Here is the diff ...
int getModelTagNumber() {
- try {
- return Integer.parseInt(group.chain.model.modelTag);
- } catch (NumberFormatException nfe) {
- return modelIndex + 1;
- }
+ if (group.chain.frame.isPDB) {
+ try {
+ return Integer.parseInt(group.chain.model.modelTag);
+ } finally {}
+ }
+ return getModelNumber();
}
The old code would return number if the model tag was *exactly* an integer.
The new code only tries to do this conversion if the file is a .pdb file
The question is ... what should the appropriate behavior be?
If the modelTag in the file is "4567" then I think that the modelTagNumber
should be 4567 ... regardless of the file type ... so that the
modelTagNumber reflects the number in the file if it is a number.
Q: Do you agree?
Miguel
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers