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

Allow opening Amber NetCDF files #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Allow opening Amber NetCDF files #34

wants to merge 1 commit into from

Conversation

axsk
Copy link

@axsk axsk commented Sep 22, 2024

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
Copy link
Collaborator

a-r-j commented Sep 22, 2024

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
Copy link
Author

axsk commented Sep 23, 2024

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
Copy link
Author

axsk commented Sep 23, 2024

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
Copy link
Author

axsk commented Sep 23, 2024

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants