Extended CML to save display properties

  1. What name for new format will you propose (Avogadro Document, Extended CML, etc)? What file extension (.cml or other)?
    You actually don’t need a new format. CML and Open Babel have the capability of reading/writing arbitrary metadata through the OBPairData interface. So what I did was to create OBPairData with names that began with “Avogadro:” and imported/exported that into our QSettings. That much was easy. It leaves a “normal” CML file, but with Avogadro data in our own namespace.

That’s great! Nevertheless, I think addition new “format” will not be useless, e.g. to give a possibility to save CML with or without Avogadro’s metadata. CML is widely used, some programs (e.g., MarvinSketch) allow to write extended CML files and manages them as separate format.

So there were three problems with my approach:

  1. I only handled molecule-level custom data. I didn’t yet handle customizations for residues, bonds, or atoms, although that’s possible using OB.
  2. I didn’t realize that beyond just loading settings, you needed to tell GLWidget and all other objects to reload their settings.
  3. There’s no separation between “levels” of settings. I mean, we might want:
  • Global settings which can only be changed by the Settings window and Plugin manager
  • Document-level settings like the camera viewpoint, etc.
  • Per-atom level settings?

IMHO, per-atom settings must be in document level. For example, in one molecule, where Co(II) has tetrahedral coordination sphere, I’d like to fill it with violet, in another with octahedral coordination I’d like to use pink, another compound is yellow because it contains Co(III), etc.


Regards,
Konstantin

P.S. Please, set up reply to the list :slight_smile: