Py-ChemShell for Tcl-ChemShell users
We hope that experienced Tcl-ChemShell users will find Py-ChemShell scripts recognisable, and for the most part keyword options etc. remain the same. However, there are some significant differences between the two codes, usually arising from differences between the Tcl and Python programming languages. We list these ‘gotchas’ here for the benefit of Tcl-ChemShell users.
Running ChemShell
The number of parallel processes is specified by
-np
and the number of task-farming workgroups by-nwg
.
Tasks
The Tcl-ChemShell single-point drivers
energy
andeandg
are not distinguished in Py-ChemShell, which features a singleSP()
driver.DL-FIND optimisation is called via the
Opt()
driver. The arguments are the same as in the Tcl-ChemShelldl-find
command.
Theories
External code interfaces are implemented as Python classes, e.g.:
nwchem = NWChem(frag=water, method='dft', functional='blyp' ...)The theory is then called as part of a task driver as e.g.:
task = SP(theory=nwchem, ...)If preferred the theory definition can be nested, e.g.:
task = SP(theory=NWChem(frag=water, ...), ...)In Tcl-ChemShell, specification of DFT functionals was inconsistent between interfaces. In Py-ChemShell DFT functionals are always specified by
method='dft' functional='...'
.
Objects
As Python is an object-oriented language, ChemShell objects are implemented as Python classes, so for example a Fragment object can be created with:
frag = Fragment( ... )Commands relating to ChemShell objects are implemented as Python methods, e.g. to save an object call the save method:
frag.save('filename.cjson')Fragments may be saved either to ChemShell punch format or Chemical JSON.