Is there any way to use the default `opengate/contrib/GateMaterials.db` in my simulation?
I wrote a custom function add_default_material_database(sim) in opengate/contrib/__init__.py in my local installation of opengate. Is there a better way to use the default GateMaterials?
Function add_default_material_database(sim)
import pathlib
def add_default_material_database(sim):
# Assuming your base directory is where your script or application is located
base_directory = pathlib.Path(__file__).resolve().parent
# Define the path to the "opengate.contrib" folder
opengate_contrib_folder = base_directory / "opengate.contrib"
sim.volume_manager.add_material_database(pathlib.Path(__file__).resolve().parent / "GateMaterials.db")
I wrote a custom function
add_default_material_database(sim)
inopengate/contrib/__init__.py
in my local installation of opengate. Is there a better way to use the default GateMaterials?Function add_default_material_database(sim)
Originally posted by @franky180 in https://github.com/OpenGATE/opengate/issues/325#issuecomment-1892288031