iodata.formats.wfn module¶
Gaussian/GAMESS-US WFN file format.
Only use this format if the program that generated it does not offer any alternatives that HORTON can load. The WFN format has the disadvantage that it cannot represent contractions and therefore expands all orbitals into a decontracted basis. This makes the post-processing less efficient compared to formats that do support contractions of Gaussian functions.
-
build_obasis
(icenters, type_assignments, exponents, lit)[source]¶ Construct a basis set using the arrays read from a WFN or WFX file.
- Parameters
icenters (
ndarray
) – The center indices for all basis functions. shape=(nbasis,). Lowest index is zero.type_assignments (
ndarray
) – Integer codes for basis function names. shape=(nbasis,). Lowest index is zero.exponents (
ndarray
) – The Gaussian exponents of all basis functions. shape=(nbasis,)
- Return type
Tuple
[MolecularBasis
,ndarray
]
-
dump_one
(f, data)[source]¶ Dump a single frame into a WFN file.
- Parameters
f (
Textio
) – A writeable file object.data (
IOData
) – An IOData instance which must have the following attributes initialized:atcoords
,atnums
,energy
,mo
,obasis
,title
,extra
.
Notes
None
- Return type
None
-
get_mocoeff_scales
(obasis)[source]¶ Get the L2-normalization of the un-normalized Cartesian basis functions.
- Parameters
obasis (
MolecularBasis
) – The molecular orbital basis.- Returns
Scaling factors to be multiplied into the molecular orbital coefficients.
- Return type
scales
-
load_one
(lit)[source]¶ Load a single frame from a WFN file.
- Parameters
lit (
LineIterator
) – The line iterator to read the data from.- Returns
A dictionary with IOData attributes. The following attributes are guaranteed to be loaded:
atcoords
,atnums
,energy
,mo
,obasis
,title
,extra
.- Return type
data
Notes
-
load_wfn_low
(lit)[source]¶ Load data from a WFN file into arrays.
- Parameters
lit (
LineIterator
) – The line iterator to read the data from.- Return type
Tuple