Cuby can do some simple calculations even without any external software. The following input will run an optimization of water dimer with a built-in water forcefield. Save the following to a file input.yaml:
job: optimize geometry: start.xyz interface: water_ff
The job keyword specifies the computational protocol used,in this case geometry optimization. The geometry keyword refers to a file (in the standard .xyz format or other format recognized by Cuby) with the starting geometry. The interface keyword invokes the interface that will provide the potential, in this case it is the water_ff forcefield which is included in Cuby.
We will also need a starting geometry, copy the following into a file start.xyz:
6 O -0.702196054 -0.056060256 0.009942262 H -1.022193224 0.846775782 -0.011488714 H 0.257521062 0.042121496 0.005218999 O 2.220871067 0.026716792 0.000620476 H 2.597492682 -0.411663274 0.766744858 H 2.593135384 -0.449496183 -0.744782026
To run the calculation, use a command
The output listing all the steps of the optimization is printed to the standard output. Additionally, two separate files are produced: history_input.xyz containing the evolution of the geometry during the optimization and optimized.xyz which contains the final optimized geometry.
Let us now calculate the interaction energy in the optimized geometry. To do so, we do not have to change the input, we can redefine some of the keywords from commandline. Namely, the -j switch modifies the job keyword and -g changes the geometry keyword:
cuby4 -j interaction -g optimized.xyz input.yaml
Cuby automagically recognizes that there are two molecules in the system and calculates the interaction energy between them.
The best way to learn Cuby is to use it. Browse the documentation of the interfaces and protocols, you will find many examples that you can try out-of-the-box. These examples are the best starting point for preparing your own calculations.