#532 Please don't auto-detect of best representation on load

open-fixed
Bob Hanson
5
2012-08-30
2012-08-25
k. siegmund
No

Hi,

when loading files from the gui interface, the types of molecules in the file is auto-detected and the appropriate representation chosen.
This _only_ happens when a (pdb) file is loaded from the gui, not when a pdb entry is fetched from the net or a file is specified via the commandline.
What's worse, autodetect sometimes fails (e.g. on single amino/nucleic acids e.g. guanosine) and no molecule is shown.
Please make it an option in GUI to switch between default and autodetected representation.

Cheers,
I.

Discussion

  • Bob Hanson
    Bob Hanson
    2012-08-25

    Sorry, you will have to be more specific. What exactly are you trying to do, what is the site in question, and where is the problem? It sounds to me like the site you are using for the source of files is not serving up good PDB files. I'd like to see some of them...

     
  • Bob Hanson
    Bob Hanson
    2012-08-25

    Also -- I don't see how there could be no difference between any of these loads -- the exact same methods are executed. So very important to provide the exact commands you are giving that seem to be causing the problem.

    Version of Jmol?

     
  • k. siegmund
    k. siegmund
    2012-08-29

    Sorry for the delay...
    When I open a file from the commandline, e.g.jmol 2BQ2.pdb.gz (which is PDB entry 2BQ2), then I get a balls-and-sticks representation of the molecule (a short piece of DNA) and "history" of the console shows "load "2BQ2.pdb.gz"

    Loading a structure via "file->get PDB" again results in a ball-and-stick representation

    If i use the GUI instead to open the same file (File->open), the console shows:
    zap; load "file:///[...]2BQ2.pdb.gz";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * }
    Consequently, all protein/DNA moieties are displayed in a cartoon representation.

    This is ok if it works, but pretty annoying if it doesnt... loading a file with just one guanine molecule is detected as DNA, but a cartoon-representation of a single molecule is an empty screen. While that's a separate bug as such, I think the bigger problem is, that auto-detection can fail in various ways and so the user should have control to switch it on and off?

    Hope that helped to make my first post clearer.

    cheers,
    I.

     
  • Bob Hanson
    Bob Hanson
    2012-08-29

    Yes, thanks. That makes it clearer. "Autodetection" for me was in relation to determining file type, not rendering. The cartoon-rendering script reads:

    zap; load "C:/jmol-dev/bobtest/1crn.pdb";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * }

    so all you have to do is

    set defaultLoadScript " "

    to turn that automated rendering off.

     
  • Angel Herraez
    Angel Herraez
    2012-08-29

    I've never quite liked the different default rendering depending on the method used for loading the file, but I won't fight over this feature.
    There is, however, a point in Iridos's observation with single-residue "proteins" or "nucleics", or otherwise any pdb-formatted file that is not a macromolecule. I've had such seemingly empty Jmol on occasions, until I changed the rendering via popup menu. Quite confusing for users.
    Maybe we could implement an additional filter that checks e.g. for a minimum number of residues=groups in addition to the pdb filetype.

     
  • Bob Hanson
    Bob Hanson
    2012-08-30

    That's fixed for Jmol 13.1.2 and 13.0.2. See http://chemapps.stolaf.edu/jmol/Jmol-13.zip

    I'm leaving the drag-drop and file|open dialogs to default to show cartoons. Just about all programs do that. But I've added a "PDB cartoons" checkbox to the dialog so that it is easy enough to turn that off.

     
  • k. siegmund
    k. siegmund
    2012-08-30

    Just to clarify: I installed jmol on our local pool and came upon those problems when creating examples for our help page... obviously I know how to work around it for the cases where it's needed now, but I still think it's very confusing specially to new users. And yes... I totally agree that the representation chosen should be the same independent on how you load a file into jmol to keep with the approach of the "least surprise".

    There were two problems I saw on load - the one mentioned that single nucleotides/amino acids are invisible in a cartoon representation and that the automatically selected parameters for an iso-surface resulted in a near-invisible molecule. If you don't prefer me to describe it here, I would file separate bugs for these (and a drag&drop java issue I also encounterd) over the next couple of days.

    Cheers,
    I.

     
  • k. siegmund
    k. siegmund
    2012-08-30

    PS. thanks for the really great quick reaction and fix - I had a look at http://chemapps.stolaf.edu/jmol/Jmol-13.zip and yes, that is a solution supposing that people realize that the empty screen they get if something went wrong is due to the cartoon representation (which I think is not a given).

     
  • Bob Hanson
    Bob Hanson
    2012-08-30

    understood. File|Open and Drag/drop should be consistent. If you see that that is not true, please let me know. That is what I am after.

    There is no particular reason these have to be the same as the simple "load" command, in my mind at least. They are application-specific and nothing says that "file|open" has to be "LOAD". It doesn't say "load" -- it says "open", and there is no command for that. That's my logic, anyway.

    But, yes, let's get these giving something reasonable in all cases. That's my goal.
    I don't think you can get the empty screen now even if you do have a one-protein-residue model. I can still imagine a problem with some models (one residue plus water, for example). But that's just a script modification.

     
  • Bob Hanson
    Bob Hanson
    2012-08-30

    • status: open --> open-fixed
     
  • Bob Hanson
    Bob Hanson
    2012-08-30

    13.1.2 has a new feature:

    set defaultDropScript

    which by default is:

    defaultDropScript = "zap; load %FILE;if (%ALLOWCARTOONS && _loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb' && {(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex) { select protein or nucleic;cartoons Only;if ({visible}){color structure}else{wireframe -0.1};if (!{visible}){spacefill 23%}; select * }"

    That also fixes a bug in {visible} that was reading true for 1-residue groups, which is not true if all they are is cartoons, strands, etc.