Closed timholy closed 3 years ago
There are also other projects for plotting molecules, which already have a dependency on Makie: https://github.com/ffreyer/LatPhysPlottingMakie.jl https://github.com/kool7d/BioMakie.jl
You can also make a hard dependency on AbstractPlotting, which will allow the user to switch backends!
Thank you very much! It looks really exciting.
If the basic 3D display can be simply implemented by using Makie or AbstractPlotting, I prefer using @require
.
More specialized and larger codes unrelated to molecular graph model should be in separate packages.
I would be happy if you could add the functionality.
OK, see #47. I added an atom radius table, picking the covalent radius rather than van der Waals radius in part because I could find nearly-comprehensive tables for covalent radii but not for VdW radii. That means that my spacefilling
function is not really space-filling in the usual sense; compare https://en.wikipedia.org/wiki/File:Thc.pdb.gif with
I'm happy to make changes in the implementation, or to rename it to be something else.
@SimonDanisch, I tried setting strokecolor=nothing
to see if I could prevent it from drawing the surface of each of the spheres in black, but that was not effective. Any ideas? It's not a big deal, and maybe I'd prefer it with the surfaces drawn, but I thought I'd at least see what it looks iike without.
I'd use meshscatter in this case ;) If you want them to look flat, you can set shading=false
!
I like meshscatter
. Interesting: meshscatter
interprets markersize
as a radius, but scatter
interprets it as a diametersomething else. xref https://github.com/JuliaPlots/Makie.jl/issues/772
For comparison:
Using Makie it's possible to create 3d plots:
(This would be improved by having a table of atomic radii.)
If you're interested I could make a pull request. There are really three options wrt implementation:
@require Makie
block using RequiresI suspect the latter two are the best options. If you're interested, which do you prefer? One concern about the Requires approach is that it's not currently compatible with precompilation, but putting it in a separate package would allow that. Makie itself is not very well precompilable now, so at present it wouldn't really make any difference, but hopefully Makie will get more precompilable over time.
CC @SimonDanisch