Command-line interface (CLI) scripts#

TCutility comes with some helpful CLI scripts for you to use. Please find an overview and examples here. You can also access information by using the tc -h command. This will show you an overview of the available CLI scripts. More detailed descriptions can be accessed using the tc {program name} -h commands.

Overview#

CLI scripts are invoked using the parent tc command followed by the sub-program (see below). If you have suggestions for useful scripts please contact the developers or open an issue on our GitHub page.

usage: tc [-h] {read,optimize,concat-irc,cite,geo} ...

TCutility command-line scripts#

subprogram

Possible choices: read, optimize, concat-irc, cite, geo

Sub-commands#

read#

Read results from a calculation.

tc read [-h] [-s] [-p] workdir [keys ...]
Positional Arguments#
workdir

The calculation directory to read the results from.

keys

The keys to read from the results.

Named Arguments#
-s, --status

Shortcut to only print the status of the calculation.

Default: False

-p, --properties

Shortcut to only print calculated properties for the calculation.

Default: False

optimize#

Set up and run a geometry optimization on a given structure.

tc optimize [-h] [-l LEVEL] [-c CHARGE] [-s SPINPOL] [-o OUTPUT] [-k] xyzfile
Positional Arguments#
xyzfile

The molecule to optimize, in extended xyz-format. See https://theochem-vu.github.io/TCutility/api/tcutility.html#module-tcutility.molecule for more information.

Named Arguments#
-l, --level

Set the level of theory for the optimization. For example, “GFN1-xTB” or “BLYP-D3(BJ)/TZ2P” Can be set in the xyz-file with the ‘level_of_theory’ flag.

-c, --charge

The charge of the system. Can be set in the xyz-file with the ‘charge’ flag.

-s, --spinpol

The spin-polarization of the system. Can be set in the xyz-file with the ‘spinpol’ flag.

-o, --output

The file to write the optimized result to. By default will be written to ‘{xyzfile}_optimized.xyz’.

-k, --keep

Keep the calculation directory after finishing the calculation.

Default: False

concat-irc#

Scripts that takes in two or more directories containing an IRC file (“ams.rkf”) and concatenates them through the RMSD values. Produces a .xyz and .amv file in the specified output directory. The output directory is specified with the -o flag. If not specified, the output will be written to the current working directory. In addition, the -r flag can be used to reverse the trajectory.

Note: ALWAYS visualize the .amv file in AMSView to verify the trajectory.

tc concat-irc [-h] [-r] [-o OUTPUT] [-l LOG_LEVEL] [jobs ...]
Positional Arguments#
jobs

Job directories containing the ams.rkf of the irc calculation(s)

Named Arguments#
-r, --reverse

Reverses the trajectory

Default: False

-o, --output

Directory in which the outputfile will be saved

Default: './'

-l, --log_level

Set the log level. The lower the value, the more is printed. Default is 20 (info).

Default: 20

cite#

Generate citations for objects. Currently supports generating citations for functionals, basis-sets, programs, methodologies and DOIs. This program also generates, and if possible, opens a Word document that contains the formatted citations. Multiple objects can be given separated by spaces. If the supplied object is also a file path it will read each line as a separate object.

Example usage:

> tc cite ADF Program ORCA

[10.1002/wcms.81] F. Neese, WIREs Comput. Mol. Sci. 2011, 2, 73-78. [10.1063/5.0004608] F. Neese, F. Wennmohs, U. Becker, C. Riplinger, J. Chem. Phys. 2020, 152. [10.1002/wcms.1606] F. Neese, WIREs Comput. Mol. Sci. 2022, 12.

> tc cite BP86 BLYP OLYP OPBE D3BJ Functional BP86

[10.1103/PhysRevA.38.3098] A. D. Becke, Phys. Rev. A 1988, 38, 3098-3100. [10.1103/PhysRevB.33.8800] J. P. Perdew, W. Yue, Phys. Rev. B 1986, 33, 8800-8802.

Functional BLYP

[10.1103/PhysRevA.38.3098] A. D. Becke, Phys. Rev. A 1988, 38, 3098-3100. [10.1103/PhysRevB.37.785] C. Lee, W. Yang, R. G. Parr, Phys. Rev. B 1988, 37, 785-789.

Functional OLYP

[10.1080/00268970010018431] N. C. Handy, A. J. Cohen, Mol. Phys. 2001, 99, 403-412. [10.1103/PhysRevB.37.785] C. Lee, W. Yang, R. G. Parr, Phys. Rev. B 1988, 37, 785-789.

Functional OPBE

[10.1080/00268970010018431] N. C. Handy, A. J. Cohen, Mol. Phys. 2001, 99, 403-412. [10.1103/PhysRevLett.77.3865] J. P. Perdew, K. Burke, M. Ernzerhof, Phys. Rev. Lett. 1996, 77, 3865-3868.

Methodology D3BJ

[10.1002/jcc.21759] S. Grimme, S. Ehrlich, L. Goerigk, J. Comput. Chem. 2011, 32, 1456-1465.

tc cite [-h] [-w] [-a] [-r] [-o OUTPUT] [-l] [objects ...]
Positional Arguments#
objects

the objects to generate citations for. This can be functionals, basis-sets, programs, methodologies or DOIs.

Named Arguments#
-w, --wiley

set the citation style to Wiley. This is the default style.

-a, --acs

set the citation style to ACS.

-r, --rsc

set the citation style to RSC.

-o, --output

the output Word file to write the citations to.

Default: 'citations.docx'

-l, --list

list currently available citations.

Default: False

geo#

Calculate geometrical parameters for atoms at the provided indices.

For 1 index this program returns the cartesian coordinate for this atom. For 2 indices return bond length between atoms. For 3 indices return bond angle, with the second index being the central atom. For 4 indices return dihedral angle by calculating the angle between normal vectors described by atoms at indices 1-2-3 and indices 2-3-4. If the -p/–pyramidal flag is turned on it calculates 360° - ang1 - ang2 - ang3, where ang1, ang2 and ang3 are the angles described by indices 2-1-3, 3-1-4 and 4-1-2 respectively.

tc geo [-h] [-p] xyzfile atom_indices [atom_indices ...]
Positional Arguments#
xyzfile

The molecule to calculate the parameter for.

atom_indices

The indices of the atoms to calculate the parameters for.

Named Arguments#
-p, --pyramidal

Instead of calculating dihedral angles, calculate pyramidalisation angle.

Default: False