-
Notifications
You must be signed in to change notification settings - Fork 4
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
"Downloading" files within my machine #24
Comments
Hi @Raiyan-Rizwan, Please see #18 for details. Best, |
Good Afternoon, def get_drive_download_link(drive_url): Then I run the download link through the builder(made using molviewspec built in functions). However, I get the following error. Do you have any suggestions for fixing this error? Thanks |
Indeed, thanks for giving this a try. We'll look into this, though I'm not sure if this is fixable in Mol*/MolViewSpec or if this is a more general issue with how Google Drive decides to share files. |
Good Afternoon, Thanks |
@midlik Do you think this can be addressed in the Mol* code or is this a limitation of Google Drive? |
Hi, this looks as a CORS problem. |
If you have no possibility of hosting those structure files with CORS enabled, you can still use relative URL and pack you MVSJ + structure files into a MVSX file (https://molstar.org/mol-view-spec-docs/#mvsx). Something like this: builder.download(url='./my-structure.cif')
...
builder.save_state(destination='example.mvsj')
import zipfile
with zipfile.ZipFile('example.mvsx', mode='w') as z:
z.write('example.mvsj', arcname='index.mvsj')
z.write('my-structure.cif', arcname='my-structure.cif') |
It worked with S3. Thanks! |
The following is an example from the code you guys provided within your Python Collab Notebook: builder = mvs.create_builder() 1st structure colored in orangestructure1.component(selector='polymer').representation(type='cartoon').color(color='#e19039') structure2 = ( 2nd structure colored in bluestructure2.component(selector='polymer').representation(type='cartoon').color(color='#4b7fcc') print(builder.get_state()) I have used a similar structure in my code to represent two different protein structures together. However, When I directly convert the JSON form of the state into a URL and use it on the web, I get a "URI too long" error. However, you guys were successfully able to visualize it. May I ask what technique you guys used for the URL conversion? It would be very helpful for me.Thanks |
Hello, Thanks |
Hi Raiyan, Find some documentation here: http://molstar.org/mol-view-spec-docs/mvs-molstar-extension/ |
Hi, In the current MVS implementation, we don't have any mechanism to specify the parameter values, unfortunately. |
Hi,
I noticed that the API allows download via url, but what would I do if I am to use a pdb file within my machine's file system?
The text was updated successfully, but these errors were encountered: