vibrav.vibronic.combine_ham module

vibrav.vibronic.combine_ham.combine_ham_files(paths, nmodes, out_path='confg{:03d}', debug=False)[source]

Helper script to combine the Hamiltonian files of several claculations. This is helpful as one can calculate the Hamiltonian elements of a displaced structure separately for each spin as the Hamiltonian elements between different spin-multiplicities are 0 by definition and this can drastically reduce the computational complexity. This function can grab the different ‘ham-sf.txt’ files in each of the specified paths and combine them into one gigantic ‘ham-sf.txt’ file. The resulting ‘ham-sf.txt’ files will be written to the given path with the same indexing scheme.

Note

The ordering of the multiplicities will be inferred from the ordering of the paths. That is to say, whichever order the paths are given will be the order of the multiplicities.

Parameters:
  • paths (list) – List of the paths to where the ‘ham-sf.txt’ files are located for each of the multiplicites to combine. Must be able to use the python format function for these and the proper padding for the indexing must be used. NOTHING is assumed.

  • nmodes (int) – Number of normal modes in the molecule.

  • out_path (str, optional) – String object to folders where the new ‘ham-sf.txt’ files will be written to. Must be in the format to use the python `format` function. Defaults to ‘confg{:03d}’.

  • debug (bool, optional) – Turn on some light debug text.