For Developers¶
Debugging¶
For debugging it is adviced to run the program from the console:
python3 TheorChem2Blender.py
This way, the print statements from the MainBody.py file are exposed to the user.
GUI overview:¶
The TheorChem2Blender.py application provides a graphical user interface (GUI) for converting Gaussian input files into 3D object files using Blender’s API. The main script, utilizing tkinter, manages different regions and functionalities, including input, output, console, and ion management.
Key GUI Modules:¶
Information.py: Manages help and about sections, providing instructions and application details.BlenderPath.py: Allows users to set the path to the Blender executable.InputRegion.py: Handles input file selection and management.OutputRegion.py: Manages output paths and file types.ConsoleRegion.py: Displays console output and error messages.IonRegion.py: Manages ion information for the molecules.IonConventions.py: Displays ion coordination codes and their meanings.ActionsRegion.py: Provides buttons for resetting values and initiating conversions.Utility.py: Contains utility functions for file management.Coordinates.py: Extracts Cartesian coordinates from molecular structure files.TextRedirector.py: Redirects print statements to the console region within the GUI.
File structure¶
For users interested in extending the functionality of the program. This project is organized into several directories and files as follows:
GaussianToBlender/¶
LICENSE.txt: License fileREADME.md: Project documentation in README formGaussianToBlender.exe: Executable file created from GaussianToBlender.pyGaussianToBlender.py: Python script for converting Gaussian data to Blender models (with tkinter GUI)
gui/¶
Folder containing GUI-related scripts
__init__.py: Optional init file for the gui packageInformation.py: Manages help and about sections, provides instructions and application detailsBlenderPath.py: Allows users to set the path to the Blender executableInputRegion.py: Handles input file selection and managementOutputRegion.py: Manages output paths and file typesConsoleRegion.py: Displays console output and error messagesIonRegion.py: Manages ion information for the moleculesIonConventions.py: Displays ion coordination codes and their meaningsActionsRegion.py: Provides buttons for resetting values and initiating conversionsUtility.py: Contains utility functions for file managementCoordinates.py: Extracts Cartesian coordinates from molecular structure filesTextRedirector.py: Redirects print statements to the console region within the GUI… (Other GUI-related files)
scripts/¶
Folder containing Blender API related scripts and modules
__init__.py: Optional init file for the scripts packageMain_Body.py: Main script that orchestrates the molecular data conversion processAtomData.py: Stores atomic and ionic data (e.g., radii, colors)ImportData.py: Extracts and filters molecular data from input filesRefineData.py: Refines molecular coordinates and connectivity dataRefineElements.py: Identifies unique elements, positions, and connectivityCreate_Materials.py: Manages materials for molecular elements in BlenderPrimitives.py: Instantiates and manages 3D primitives for atoms and bondsExport_Data.py: Exports Blender scenes and animationsIons.py: Handles ionic data within molecular structuresInstantiate_Molecules.py: Instantiates 3D geometries from Cartesian coordinatesRaw_Parameters.py: Extracts and processes raw coordinates/connectivityAnimate.py: Manages animation of molecular structuresClear_Transforms.py: Applies transformations to bonds and elementsReceive_Parameters.py: Extracts and processes parameter data into a dictionary… (Other Blender-related scripts)
input_examples/¶
Folder containing example input files
com_files/example1.com: Example input file 1 (e.g., Gaussian .com format)xyz_files/example2.xyz: Example input file 2 (e.g., xyz format)
output/¶
Default folder for exporting molecules and animation results
folder starts empty