Columbus Parser
- class pyopencap.analysis.colparser(molden_file, tranls)[source]
A class that parses COLUMBUS electronic structure package generated files to generate state density and transition density matrices for projected-CAP calculation on MR-CI level.
- __init__(molden_file, tranls)[source]
Initializes the colparser class
- Parameters
molden_file (str) – molden MO filename (generated in MOLDEN/ folder in COLUMBUS calculation Directory)
tranls (str) – Path to tranls file generated by Columbus in WORK directory
- get_H0(correction_type='eci+pople', filename='ciudgsm')[source]
Parses energies from a Columbus ciudgsm file.
- Parameters
correction_type (str, optional) – One of {‘eci+pople’, ‘eci’, ‘eci+dv1’, ‘eci+dv2’, ‘eci+dv3’ }. Default is ‘eci+pople’
filename (str, optional) – Path to Columbus ciudgsm file located in WORK directory. If unspecified, assumed to be ‘./ciudgsm’.
Notes
See https://aip.scitation.org/doi/pdf/10.1063/1.5144267 for discussion of corrections.
- Returns
H0_mat – Diagonal hamiltonian with CI energies.
- Return type
np.ndarray
- mo_summary()[source]
Prints information about active space and symmetries of MOs.
- Returns
Total number of basis functions (nbft) Number of basis functions in each symmetry block (NBPSY). Number of orbitals in each of the symmetry blocks.(NMPSY<= NBSPSY) Number of frozen orbitals in each of the symmetry blocks (NFCSY ). Character labels for the symmetry blocks (SLABEL).
- Return type
str
- sdm_ao(i, DRTn=1, data_dir='.', filename=None)[source]
Returns state density matrix in atomic orbital basis by parsing a Columbus cid1trfl.iwfmt file.
- Parameters
i (int) – State index
DRTn (int, optional) – DRT index
data_dir (str, optional) – Directory to search for .iwfmt file. Should not be used in conjunction with filename kwarg
filename (str, optional) – Path to file to parse. If not specified, the filename is assumed to be cid1trfl.FROMdrt{drtFrom}.state{i}TOdrt{drtTo}.state{i}.iwfmt in the current directory.
- Returns
sdm – State density matrix in AO basis
- Return type
np.ndarray
- sdm_ao_cid1fl(i, DRTn)[source]
Read CI state densities from state density cid1fl*.iwfmt files.
Currently NYI.
- Parameters
i (int) – State index
DRTn (int) – DRT index
- Raises
NotImplementedError –
- Returns
State density matrix in AO basis
- Return type
np.ndarray
- tdm_ao(iFROM, iTO, drtFrom=1, drtTo=1, data_dir='.', filename=None)[source]
Returns transition density matrix in atomic orbital basis by parsing a Columbus cid1trfl.iwfmt file.
- Parameters
iFROM (int) – Initial state index and final state indices respectively.
iTO (int) – Initial state index and final state indices respectively.
drtFrom (int, optional) – DRT indices
drtTo (int, optional) – DRT indices
data_dir (str, optional) – Directory to search for .iwfmt file. Should not be used in conjunction with filename kwarg
filename (str, optional) – Path to file to parse. If not specified, the filename is assumed to be cid1trfl.FROMdrt{drtFrom}.state{iFrom}TOdrt{drtTo}.state{iTO}.iwfmt in the current directory.
- Returns
tdm – Transition density matrix in AO basis
- Return type
np.ndarray