Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for vendor extensions #22

Closed
papillot opened this issue Apr 22, 2024 · 4 comments
Closed

Support for vendor extensions #22

papillot opened this issue Apr 22, 2024 · 4 comments

Comments

@papillot
Copy link

I understand that the whole point of the project is to be vendor agnostic, but let's say that a given vendor would like to store extra elements in a spec file, is there a way to ensure that the file is still compliant with the specs?

One use case of such an extension mechanism, would be the CommonChem JSON format, which has an extension property which may contain vendor specific data
https://github.com/CommonChem/CommonChem/blob/master/spec.md#extension-object

@JonStargaryen
Copy link
Member

Interesting suggestion. With the current approach, it would e.g. be possible to include vendor-specific data in the source CIF file, in a custom CIF category. Specific viewers could consider that data without affecting the behavior of other viewers.

@papillot
Copy link
Author

I see, yes some kind data might be amenable to this CIF based approach.

I was thinking also about the case where one would want to give extra properties to some objects of the molview hierarchy. For example, the scenario for describing a color scheme as 'color by secondary structure' has been suggested before ( #19 ).
With an extension it could be possible to remain consistent with the specs (describe the color for each residue) and also have the extended property which some consumers can interpret.

But, I completely get the concern with implementing escape hatches in a standard: this may get nasty very quickly...

@dsehnal
Copy link
Member

dsehnal commented Oct 18, 2024

Hi @papillot, we have merged initial support for this where a custom: dict field can be added to any (well, most of for now) nodes.

@papillot
Copy link
Author

Great! That would be super flexible!

At the time I wrote this, we were envisioning MVS as a kind of universal storage for a custom viewer (probably based on NGL) with the capability of generating scenes from different sources (the viewer itself but also CLI tools).
The scope has changed now and we are relying on Mol* and its state, so we don't have an immediate need for this. But still, having a CLI tool generating visualizations with custom properties that we can control is something we may use.

I'll close this issue as fixed as I think the custom property fits that need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants