Skip to content

KubiV/3D-Print-Molecules

Repository files navigation

3D Print Molecules in Colour

Python based program which makes easier to 3D print moleculs in muliticolour by automatical separation and export of atoms of each kind.

Program output and PYMOL output comparison

Usage

GUI Description

  1. Eneter molecule name, CID number or PDB code into the text filed or select your own PDB or SDF file with atom coordinates.
  2. Fetch data using Enter key or apropriate button.
  3. Check folder for savin the output file.
  4. Choose molecule 3D representation for export (now only VDW - Van der Waals model - spheres).
  5. Check molecule information in the table.
  6. Set quality of the model (be aware of large file protection - program automatically sets low quality for molecules with high number of carbons).
  7. Generate the model!

Example usage

  1. Import to PrusaSlicer all STL files at once! And confirm "Multi part object" -> YES. Molecule for 3D printing in PrusaSlicer (left) and in PyMOL (right)

  2. The script only exports models for all present atoms separatelly and storers them into a ZIP file

  3. Scale the molecules, set the colours for multicolour printing and slice the model.

  4. 3D print your molecule!

To do

  • Auto import to slicer
  • export selection butttons (modify what exactly do you want to export, quality settings ...)
  • custom relative size of bond or atom
  • add a settings tab (manualy edit paths for PyMOL and Open Babel)

Common problems

  • Not installed Python - see links
  • Default output folder selected incorrectly

Pyinstaller

Use the pyinstaller command insiode the "pyinstaller" folder (cd version2/pyinstaller)

macOS: pyinstaller --onefile --windowed --add-data "Settings.json:." --name "3D print Multi-color Molecules" --icon=../../graphical/default_icon.icns --debug=all --noconsole --exclude=PyQt6 --clean --noupx --strip --optimize=2 ../src/main.py

Windows: pyinstaller --onefile --add-data "Settings.json;." --windowed --name "3D print Multi-color Molecules" --icon=..\..\graphical\default_icon.ico --debug=all ..\src\main.py


pyinstaller -y --clean -F -w -i graphical/default_icon.icns --debug=all src/main.py

Links