0841f1190bdfb7dc0f4ea8de0b91cee3a8c33624
SDF Molfile parser and molecule renderer with Raylib
Compilation
zig cc -o test -lraylib -L /usr/local/lib -I /usr/local/include main.c -DDEBUG
or
gcc $(pkg-config --cflags raylib) -L/usr/local/lib main.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -o ass -DDEBUG
Or without DEBUG flag to omit debug logging
Example files
SDF molfiles of ethanol and methyl vinyl ketone are available. 3D SVG images were generated from these using OpenBabel for comparison with the Raymol output. Conversion command:
obabel methyl-vinyl-ketone.sdf -Omethyl-vinyl-ketone.svg -xS
TODO
- Drag and drop molfiles Raylib supporst this nicely
- Use meshes instead of DrawSphere/Cylinder for performance (GPU already getting toasty)
- Use periodic table data for colors and bond properties etc, made an
Element
struct for this
By @bdnugget
Description
Languages
C
80.4%
Go
19.6%