From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Dec 16 2009 - 10:51:29 CST

Hi,
  The VMD plugin API type selection logic keys off of the dot extensions
because that is the convention most widely supported by existing
scientific software. This is also the method used by all conventional
mail programs and web browsers to determine document types
(e.g. mailcap files). There are only a few programs out there that
do something unusual with their file naming conventions, at least
among the ones I've seen so far.
I would argue that using file names ending in "_XXX" is less logical than
".XXX" since few or no other tools use that convention. Also, some
web browsers and operating systems will actually mangle filenames by
converting spaces to underscores, creating a potential problem if we
allow arbitrary delimiters for file extensions and don't add in additional
heuristics to reduce the likelihood of misinterpretations in such cases.

I'm not following what you mean by the "Show" field of the choose
molecule window. Are you referring to the file type chooser?
The FLTK window system has specific requirements for the interpretation
of special characters such as "|", and from what you're saying it sounds
to me like you have triggered FLTK's interpretation of your plugin.prettyname
string without realizing it. The VMD plugin interface doesn't allow
the use of any wildcard characters in the plugin.filename_extension
field, so this too may be creating problems. If you send me your plugin
source code I will be happy to point out areas where you've gone beyond
the specification and thus encountered the problems you're describing.

While it is technically possible to revise the plugin API to allow
unusual filename extension schemes like the one you've described for
abinit, I think this will create more problems than it solves due to
the potential for clashes between interpretation of non-abinit
filenames that contain underscores, such as those saved from
web browsers where the spaces have been automatically replaced.

In regards to the large and unweildy list of plugin types, I agree
completely. The addition of user configurability and to prioritize the order
of the list has already been on my (long) TODO list. I also plan to
reorganize the plugins into submenus for the next version of VMD if
time allows, which will help things substantially.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Dec 15, 2009 at 11:07:20PM -0800, Rob wrote:
> Hello,
>
> I raised this issue before, when I started working on the abinit plugin.
> Now that I am finalising this plugin for VMD, it is annoying me again.
>
> A plugin can give a list of extensions in a string, separated by "|",
> e.g:
>
> "_GEO|*_DEN|*_WFK|*_POT"
>
> The first one in the list ALWAYS appears with a dot in the "Show" field
> of the "Choose a molecule file" window as "*._GEO".
> There's no way to have VMD not use that dot! Very annoying.
>
> Irronically, only the first one in the list gets a dot, not the next ones
> in the list; these appear as "*_DEN", "*_WFK", and "*_POT".
> (So fortunately VMD is not consistent with its 'dot' policy ;> ).
>
> Abinit does not produce files with a dot in it.......the rigid "dot"
> persistence of VMD is thus very annoying! I can't let the file selector
> for abinit default to the common output file "foobar_GEO".
>
> Of course we can force people to write their own wrapper to squeeze
> a dot in the abinit output files, but to enforce this DOS-relic by VMD
> is rather silly, isn't it?
>
> Why not leave it up to the programmer whether a dot should be added
> in the string with the list of extensions?
>
> --------------
>
> Another point of concern I'd like to raise:
>
> The number of entries in the field "Determine file type" has gone over 70.
> On my BIG screen in high resolution, it rolls out beyond the screen borders.
> I don't think there's anyone who needs all of them on a regular basis.
> Therefore it would be much better to make this list configurable PER USER,
> so that this list can be modified according to a user configuration file
> (e.g. in $HOME/.vmd/ ).
>
> Regards,
> Rob.
>
>
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078