Skip to content

Allow opening Amber NetCDF files - #34

Open
axsk wants to merge 1 commit into
molstar:mainfrom
axsk:main
Open

axsk wants to merge 1 commit into
molstar:mainfrom
axsk:main

Conversation

@axsk

@axsk axsk commented Sep 22, 2024

Copy link
Copy Markdown

According to https://molstar.org/docs/plugin/file-formats/ .nc or .nctraj are supported as well.

This allows to open them from the context menu.

@a-r-j

a-r-j commented Sep 22, 2024

Copy link
Copy Markdown
Collaborator

Hi @axsk! Thanks for the PR :)

Have you tried this out? I expect it may require some manipulation of the loading command to dispatch the appropriate command depending on the file type:

@axsk

axsk commented Sep 23, 2024

Copy link
Copy Markdown
Author

I am not sure how that feature is supposed to work.
I selected files in the VSCode explorer and ran the Lauch Protein Viewer from File(s) command, but only get an error message:

Command 'Lauch Protein Viewer from File(s)' resulted in an error
Cannot read properties of undefined (reading 'map')
2024-09-23 10:43:29.489 [error] TypeError: Cannot read properties of undefined (reading 'map')
    at Function.renderFromFiles ([...]home/.vscode-server/extensions/arianjamasb.protein-viewer-0.1.0/src/panels/ProteinViewerPanel.ts:36:33)
    at [...]home/.vscode-server/extensions/arianjamasb.protein-viewer-0.1.0/src/extension.ts:20:22
    at h ([...]home/.vscode-server/cli/servers/Stable-38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40/server/out/vs/workbench/api/node/extensionHostProcess.js:161:210554)
@axsk

axsk commented Sep 23, 2024

Copy link
Copy Markdown
Author

Oh, maybe I misunderstood. Are you suggesting that we need to translate the file extension to a valid extension type as below?

if (extension === 'cif' || extension === 'mmCIF' || extension === 'CIF' || extension === 'MMCIF' || extension == '.mCIF' || extension == '.mcif') {
extension = 'mmcif';

@axsk

axsk commented Sep 23, 2024

Copy link
Copy Markdown
Author

Unfortunately I haven't managed to get the extension dev framework working so I cannot test my suggestions :O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants