From: FX (
Date: Sat Mar 28 2020 - 13:29:56 CDT

Dear John,

> It would be great to have a full CIF plugin available in VMD,
> whether using Gemmi, or by other means.

I’m happy to use another C/C++ library for CIF, but I haven’t found one that would fit the bill: most libraries only read a subset (mmCIF for example). Gemmi seems like the best option, and the fact that it’s header-only makes it a simple dependency. The licence is permissive, which is a good thing as well.

> One complication is that it's described as being based C++11.
> If accurate, this creates a compiler dependency that is incompatible
> with a large number of existing production systems in the field, so
> we can't expect to provide a pre-compiled binary that would work
> on any but the latest Linux distros, for example.

I must say I’m a bit surprised, I thought C++11 support was now a standard compiler feature. For GCC, I find that GCC 4.8.1 was the first feature-complete implementation of the 2011 C++ standard. It was released in May 2013, and all distributions seem to ship that or something more recent. Even Debian oldoldstable (jessie) ships GCC 4.9.2.

> There are a number of ways of doing this.
> And you can always force a file to be loaded with a specific plugin
> using the graphical interface in VMD. (choose the plugin to use manually
> rather than automatically)

That’s a big drawback.

> Something that would make this easier would be to add some new code and
> scripting APIs (maybe a GUI also) to allow a user preference
> for a specific plugin to be associated with a file extension rather than
> the default sorting by plugin major/minor version numbers.

Is it possible to combine two plugins into one? For example, when two plugins are registered for a given file extension, let them (in any order suitable) try to load the file, and if they fail to open it, given the other plugins registered with this extension a chance?

Or simply, should I implement the Gemmi-based reading code as part of the existing plugin registered with CIF files?