Skip to content

Load a trajectory without the GUI #54

@ixdi

Description

@ixdi

Hi,

I'm new to MDSrv and would like to initiate it and use the API to load a trajectory into NGL without the GUI. My intention is to load files from another location.
I know, correct me if I'm wrong, that file must be copied to the config folder prior using it and that a link can't be used.

I've seen an example where they use

NGL.DatasourceRegistry.add("file", new NGL.MdsrvDatasource( window.location.origin + "/tool-mdsrv/" ));
NGL.DatasourceRegistry.listing = NGL.DatasourceRegistry.get( "file" );
NGL.DatasourceRegistry.trajectory = NGL.DatasourceRegistry.get( "file" );

What are the purpouse of these functions? I imagine that setup where MDSrv is but what they do internally?

I've tried to get the data directly from the server function get_frame_string() #mdsrv/trajectory.py and I get a byte representation of the data in the browser following the convention of the documentation

How is supposed that the binary data recived from the server has to be loaded into NGL? I want to load a trr trajectory and component.addTrajectory() throws an error.

Any help would be appreciated. Thanks

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