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

Load a trajectory without the GUI #54

Open
ixdi opened this issue Nov 19, 2020 · 0 comments
Open

Load a trajectory without the GUI #54

ixdi opened this issue Nov 19, 2020 · 0 comments

Comments

@ixdi
Copy link

ixdi commented Nov 19, 2020

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

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

1 participant