In this study, we proposed a model and developed a Python package for code synthesis of domain specific languages, and applied it to the quantum chemistry program ORCA. We devised three methods for synthetic data generation of increased sophistication. We explored the effects of finetuning, prompt engineering, and retrieval-augmented generation on the performance of GPT-3.5 Turbo in synthesizing ORCA input files and showed that our best model was able to outperform the recently developed GPT-4o model significantly.