**Overview**

**GUINEA** evaluates vibrational energies and properties using explicitly summed Rayleigh-Schroedinger type perturbation theory. Vibrational energies, transition intensities, dipole moment corrections and harmonic derivatives may all be calculated at the VPT2 (second-order) level of perturbation theory, and support for VPT4 is forthcoming. The numerical sums are written in such a way as to minimize the number of unnecessary intermediate states generated. This formulation is quite efficient, even for large number of modes (up to 24 modes have been tested and such calculations may be run in real-time). **GUINEA** may also explicitly form and diagonalize an effective Hamiltonian, followed by a transformation of other quantities such as transition moments, which may be useful for resonant systems. **GUINEA** uses for defining the necessary operators the files generated by the xcubic program of CFOUR, e.g. 'quadratic', 'cubic', 'rota', 'coriolis', etc. The files defining the electronic potential must be present, while the rotational files and dipole moment files are optional. VPT2 will optionally use the additional 'didq' file for third- and fourth-order Coriolis terms, which is not generated in most versions of xcubic. The **JOBARC** and **JAINDX** archive files are not required, although later versions may optionally use them for some features.

**Input**

**GUINEA** accepts user input either from a file, such as with the syntax 'xguinea < input_file', or interactively from the terminal. By default, interactive sessions prefix input lines with a prompt, '>', for clarity, while input from a file does not. Keywords are given one to a line, with any extra input for that keyword on one or more additional lines. Blank lines are ignored. Pressing the up or down directional key scrolls through previously entered keywords if any; note however that when a previously entered keyword is selected by this method, it may not be edited.
Keywords are grouped into two categories: "state commands" and "action commands". State commands add to, remove from, or otherwise modify the groups of states, called "sets", upon which the action commands act. A set may have any number of states, although only 100 sets exist at any one time. Each set has its own reference state and setting for diagonalization, while the temperature (used in the Boltzmann factor for hot bands) is shared among all sets. Action commands then run the various calculations, or specify which calculations to run later, on the states in the selected set.

**Units**

- All energies are in wavenumber units (cm
^{-1}).
- Intensities are in km/mol.
- Dipole moment corrections are in milli-Debye (mD).
- First harmonic derivatives are unitless, and second harmonic derivatives are in reciprocal wavenumber units (cm).

**Memory Management**

**GUINEA** uses its own memory management in which segments are allocated dynamically rather than from a common block. Total memory usage is limited by a user-defined limit (default is unlimited). The current version may have a few memory leaks and/or inconsistencies in the reported memory usage. However, these should be slight enough as to not affect normal usage (unless perhaps a huge number of states are shuffled in and out or the number of modes are sufficiently large).

**Keywords**

This is a summary of all of the available keywords. If a keyword accepts additional input, the syntax will be given. Note that when the summary for a calculation is printed, states are listed in order of increasing energy, not the order in which they were added to the set, and that states are sorted by symmetry as they are added to a set. For diagonalized sets, the state printed for each level is the dominant contribution the that level's eigenvector.

**I. State commands**

All state commands act on the current set.

"states": Add all of the specified states to the current set.
States are given as integer strings of length m.
states
n
s_{1,1} s_{1,2} ... s_{1,m}
s_{2,1} s_{2,2} ... s_{2,m}
...
s_{n,1} s_{n,2} ... s_{n,m}
"~states": Remove all of the specified states from the current set.
~states
n
s_{1,1} s_{1,2} ... s_{1,m}
s_{2,1} s_{2,2} ... s_{2,m}
...
s_{n,1} s_{n,2} ... s_{n,m}
"?states": List all of the states in the current set.
"~indices": Remove the states with the given indices from the
current set.
~indices
n
i_{1}
i_{2}
...
i_{n}
"combination": Add all of the states from the given combination
to the current set. This is all states with total
number of quanta m in modes q_{1} q_{2} ... q_{n}. n=0
selects states with total number of quanta m in any
mode
combination
m n
q_{1} q_{2} ... q_{n}
OR
combination
m 0
"~combination": Remove all of the states from the given combination
from the current set. Same syntax as 'combination'.
~combination
m n
q_{1} q_{2} ... q_{n}
OR
~combination
m 0
"reference": Set the reference for the current set.
reference
r_{1} r_{2} ... r_{m}
"?reference": List the reference for the current set.
"~reference": Reset the reference for the current set to |0>.
"copyset": Add all states from the given set to the current set.
copyset
i
"diagonalize": Sets that the current set should be diagonalized.
"?diagonalize": Lists whether the current set should be diagonalized.
"~diagonalize": Sets that the current set should not be diagonalized.

**II. Action commands**

Most action commands simply set up what will be calculated when "calc" is called. All commands except "calcall" act only on the current set.

Calculations:
vpt2 - VPT2 energy
vpt4 - VPT4 energy
int2 - VPT2 intensity
int4 - VPT4 intensity
dip2 - VPT2 dipole moment correction
dip4 - VPT4 dipole moment correction
harmderiv - First and second harmonic derivatives (VPT2 only)
"set": Creates a new set.
"setset": Sets the current set.
setset
i
"?set": Lists basic information about all of the sets (does
not list states).
"~set": Removes the given set, 0 for current set.
~set
i
"memory": Sets the maximum amount of memory to use, initially
unlimited. The amount must be integer for byte amounts
but may be floating point for larger units.
memory
0 [unlimited]
OR
memory
n [in bytes]
OR
memory
nKB
OR
memory
nMB
OR
memory
nGB
"?memory": Lists the current memory limit and use.
"vpt2": Turns on VPT2 energy calculations.
"?vpt2": Tells if VPT2 energy calculations are turned on.
"~vpt2": Turns off VPT2 energy calculations.
"!vpt2": Do a VPT2 energy calculation now.
"vpt4": Turns on VPT4 energy calculations.
"?vpt4": Tells if VPT4 energy calculations are turned on.
"~vpt4": Turns off VPT4 energy calculations.
"!vpt4": Do a VPT4 energy calculation now.
"int2": Turns on VPT2 intensity calculations.
"?int2": Tells if VPT2 intensity calculations are turned on.
"~int2": Turns off VPT2 intensity calculations.
"!int2": Do a VPT2 intensity calculation now.
"int4": Turns on VPT4 intensity calculations.
"?int4": Tells if VPT4 intensity calculations are turned on.
"~int4": Turns off VPT4 intensity calculations.
"!int4": Do a VPT4 intensity calculation now.
"dip2": Turns on VPT2 dipole correction calculations.
"?dip2": Tells if VPT2 dipole correction calculations are
turned on.
"~dip2": Turns off VPT2 dipole correction calculations.
"!dip2": Do a VPT2 dipole correction calculation now.
"dip4": Turns on VPT4 dipole correction calculations.
"?dip4": Tells if VPT4 dipole correction calculations are
turned on.
"~dip4": Turns off VPT4 dipole correction calculations.
"!dip4": Do a VPT4 dipole correction calculation now.
"harmderiv": Turns on harmonic derivative calculations.
"?harmderiv": Tells if harmonic derivative calculations are
turned on.
"~harmderiv": Turns off harmonic derivative calculations.
"!harmderiv": Do a harmonic derivative calculation now.
"print": Sets the print verbosity level: 1 = display < 2 =
interactive < 3 = full; interactive is the default for
terminal input, and display is the default for input
from a file.
print
[1,2,3]
OR
print
[display,interactive,full]
"?print": Lists the current print verbosity level.
"calc": Runs the specified calculations on the current set.
"calcall": Runs the specified calculations on all sets.
"?calc": Lists which calculations are turned on.
"~calc": Turns off all calculations.
"temp": Sets the temperature for hot bands.
"?temp": Prints the temperature for hot bands.
"load": Runs all of the commands in the given file.
"save": Write a file containing all of the commands
necessary to reproduce the current program state
(excluding the output of any calculations or queries).
"done": Bye-bye!

**Compilation/Installation**

Input files must be pre-processed (e.g. '-x f77-cpp-input' for g77 and '-cpp' for ifort). If compiled for a 64-bit architecture (i.e. '-i8' with ifort) the '-DINT8' flag must be present. It is not recommend to use '-O3', rather use '-O2'. **GUINEA** is not parallelized with either MPI or OpenMP. If the memory management subroutines (memallocd.f et al.) are not included in the main source directory, the external memory library libmem.a must be linked with, and the libmem source directory must be included in the flags as an include directory (e.g. with '-I...'). You must also link with liblibr.a from the **CFOUR** directory (it is recommended to use the same compiler and flags as was used to compile libr) and with **BLAS** and **LAPACK** libraries.

**References**

TODO

**Examples**

**Example 1 Input**
**Example 1 Output**

(this example uses a quartic force field of water)

**See Also**

**Calculation Of Anharmonic Force Fields**