-
Notifications
You must be signed in to change notification settings - Fork 7
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
drawing a Box and Volume data #2
Comments
In brief, yes I would be interested in this. I will have a look at how much work it will be and get back to you. |
I have implemented the loading of volume data and the box outline. Try isosurface = IsoSurface("benzene.cube", 0.01)
box = Box([0.0, 0.0, 0.0], [6.0, 6.0, 6.0])
viewfile("benzene.sdf", "sdf", isosurface=isosurface, box=box) I'll have a look at the other stuff too. |
That is beautiful! Thanks!
|
Thanks.
The isoval to view the surface at. See
Not sure, might be an issue in one of the files? Perhaps one of the unit cell definitions, or the way 3Dmol deals with unit cells? Or it might require changing the isoval.
This would be possible, probably using the draw line functionality to draw each edge of the box.
Sure, if you put them in the
The instructions should work for Julia 1.0 as is. Currently there is no tagged version so all access is via master. When the package is released everything should be in the released version, and I can change |
I get the following working when I use
Another idea for usability: Pull request coming soon! |
Ah okay I'll change to Yes the automatic guessing of file type is a good idea, that was on my list too. I'll implement it. |
Above two things added. I have also added drawing of the unit cell from a vtk file. It's not in the tutorial yet, but try: viewfile("SBMOF-1.xyz", vtkcell="SBMOF-1.vtk") I have played with the isosurface scaling issue a bit. It seems the voxel definitions at the top of the cube file are in different units to 3Dmol by a factor of 2. So if I replace the 3 cases of |
Thanks, the I found in the source code that 3Dmol.js uses Bohr or Angstrom (the latter is what I assumed) depending on the sign of the integers denoting the number of grid points. 1 Angstrom is approx. 1.88 Bohr, so your finding makes sense. I'll make a PR to update my .cube files. I also saw some maybe relevant issues for saving to png. Is it possible for me to host a visualization like this on my Github pages website? Thanks! |
Ah, that makes sense. I'll have a look at the saving to png stuff.
If you are asking for permission to do it then yes that's fine. If you are asking for how to do it, one way is to get the html to create a standalone viewer using the new
Then add this to your pages' html directly. By the way I switched to using Requires.jl to reduce the need for Blink and BioStructures (quite heavy dependencies) for those who just want to use notebooks. Let me know if you run into any problems. |
The new version works correctly on my machine! Removing the dependency will make it easier to integrate into our package Thanks a lot, the One odd phenomenon is that, when I visualize an isosurface of IRMOF-1 in We have another paper we are prioritizing at the moment, but we will invite you to our Overleaf when we start writing our paper on |
Very wicked. Is it possible to set a view vector, such as |
The isosurface disappearing issue is annoying, I'll see if I can fix it. And I'll have a look at the other features: saving, view angle and axes. |
View angle and axes display are kind of implemented, see the last example in the tutorial notebook, though need a bit more documentation. I also combined the tutorial notebooks into one. It seems you can save from Jupyter by right-clicking or shift-right-clicking and selecting save image, this could be a good way forward. |
@jgreener64 Great, thanks! I'm getting an error for the last example in the tutorial notebook:
The option to save the image doesn't appear in my Jupyter Lab. I often need to make images in high-throughput, so I think saving via a command like in matplotlib would be best, ideally publication quality (instead of whatever resolution Jupyter gives you). Plus then you can make videos systematically, e.g. by changing the view with your new feature and generating a series of PNGs. Thanks again! |
Ah yes I renamed it to Okay cool I'll have a look at the image saving. |
Thank you!
Bio3DView.jl
can drastically improve our workflow!Is there any way you can extend the API to include:
We routinely need to make figures like this:
e.g. see here.
If you can do this, our code to write and visualize potential energy grids of adsorbed gas molecules in porous crystals,
PorousMaterials.jl
(see here) would be complete. We'd be happy to have you join as a well-deserved coauthor on our software publication if you could get this working. We can provide.cube
volume data for an example to work with.The text was updated successfully, but these errors were encountered: