Skip to content

Enable auto-including local files as data for molstar_notebook #67

@prihoda

Description

@prihoda

Currently you need to pass local files using data argument:

builder = mvs.create_builder()
(
    builder.download(url='local.cif')
    .parse(format='mmcif')
    .model_structure()
    .component()
    .representation()
)

with open('local.cif') as f:
    cif_data = f.read()

builder.molstar_notebook(data={'local.cif': cif_data})

It would be cool if we could detect local paths automatically and load them behind the scenes. Is there a way to extract all referenced urls/uris and check if they are local?

This could be added here: https://github.com/prihoda/mol-view-spec-fork/blob/master/molviewspec/molviewspec/builder.py#L346-L348

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions