5.3. Interfaces to External Programs
ABCluster provides programming interfaces so you can write your own interfaces for any computational chemistry programs. Now we will see how to do this.
When isomer
and geom
is running, it will generate a geometry with a long name like x-34
. You do not need to know its exact name but just need to know that x
is generated automatically by ABCluster, and 34
means this is the 34th calculation. In ABCluster, this name is represented by $xxx$
. This geometry will be saved in standard XYZ format, a file called x-34.xxxxxyz
, represented by $inp$
. Then, commands between the two >>>>
will be run one by one. Finally, the optimized geometry and energy should be written in XYZ format to a file called x-34.ooooout
(The title line is the energy), represented by $out$
. Then isomer
will read optimized geometry and energy from $out$
and save it, launching next search. This mechanism is shown below.
Now let’s see how we let isomer
work with Gaussian. For the following commands:
1>>>>
2xyz2gaussian optfile $inp$ > $xxx$.gjf
3g16 < $xxx$.gjf > $xxx$.log 2>/dev/null
4gaussian2xyz $xxx$.log > $out$
5>>>>
xyz2gaussian
uses the structure$inp$
generated byisomer
andoptfile
to generate a Gaussian input file named$xxx$.gjf
.Call Gaussian to perform the local optimization and output to
$xxx$.log
.gaussian2xyz
extracts optimized structure and its energy from Gaussian output file$xxx$.log
and save them to$out$
.
Tip
In summary, your task is to write programs or scripts that can transform the XYZ format geometry $inp$
into the format that the external program understands, and perform the calculation, then extract optimized geometry and its energy from program output and save them in another XYZ file $out$
(title line being the energy).
Tip
You can read the interfaces provided in misc
to better understand how to write your own interfaces.