esipy.atomicfiles

Module Contents

Functions

read_aoms([path])

Reads the AOMs from ESIpy's writeaoms() method or from an AIMAll calculation.

write_aoms(mol, mf, name, aom[, ring, partition])

Writes the input for the ESI-3D code from the AOMs.

read_molinfo(path)

Reads all *.int files from a directory and builds the molinfo dictionary.

read_wfx_info(path[, wfx_filename])

Searches for a .wfx file in the given path or the previous path, reads the coordinates and charges,

get_partition(path, int_file)

Extracts the partition type from the given file.

read_occs(file_path)

Extracts the NO coefficients from a Restricted, natural orbitals AIMAll calculation.

read_orbs(file_path)

Extracts the NO coefficients from a Restricted, natural orbitals AIMAll calculation.

write_wfx(path, name, mol, mf, aom, wf[, occ])

Minimal helper to write a .wfx file for ESIpy. This writes a compact WFX-like

Attributes

wfxnotfound

esipy.atomicfiles.wfxnotfound = False[source]
esipy.atomicfiles.read_aoms(path='.')[source]

Reads the AOMs from ESIpy’s writeaoms() method or from an AIMAll calculation.

Parameters

path (str) – Path of the directory of the files.

Returns

The AOMs in ESIpy format stored in ‘ESI.aom’.

Return type

list

esipy.atomicfiles.write_aoms(mol, mf, name, aom, ring=[], partition=None)[source]

Writes the input for the ESI-3D code from the AOMs.

Parameters
  • mol (PySCF instance) – Molecule object from PySCF.

  • mf (PySCF instance) – Calculation object from PySCF.

  • name (str) – Name of the calculation.

  • aom (list) – Concatenated list of Atomic Overlap Matrices (AOMs) in the MO basis.

  • ring (list of int, optional) – Connectivity of the atoms in the ring. Can be more than one ring as a list of lists.

  • partition (str, optional) – Partition scheme for the AOMs. Options are “mulliken”, “lowdin”, “meta-lowdin”, “nao”, “iao”.

Returns

None

Generates
  • A ‘_atomicfiles/’ directory with all the files created.

  • A ‘.int’ file for each atom with its corresponding AOM.

  • A ‘name.files’ file with a list of the names of the ‘.int’ files.

  • A ‘name.bad’ file with a standard input for the ESI-3D code.

  • A ‘name.wfx’ file with the occupancies for the ESI-3D code.

esipy.atomicfiles.read_molinfo(path)[source]

Reads all *.int files from a directory and builds the molinfo dictionary.

Parameters

path (str) – Path to the directory containing *.int files.

Returns

A dictionary containing molecular information.

Return type

dict

esipy.atomicfiles.read_wfx_info(path, wfx_filename=None)[source]

Searches for a .wfx file in the given path or the previous path, reads the coordinates and charges, and stores them in molinfo[“geom”].

Parameters
  • path (str) – Directory path containing the file.

  • wfx_filename (str) – Optional filename of the .wfx file.

Returns

NumPy array with coordinates.

Return type

numpy.ndarray

esipy.atomicfiles.get_partition(path, int_file)[source]

Extracts the partition type from the given file.

Parameters
  • path – Directory path containing the file.

  • int_file – File name to read.

Returns

Partition type as a string.

esipy.atomicfiles.read_occs(file_path)[source]

Extracts the NO coefficients from a Restricted, natural orbitals AIMAll calculation.

Parameters

file_path (str) – Path to the file to process.

Returns

List of extracted Occ_MO(i) values.

Return type

list of float

esipy.atomicfiles.read_orbs(file_path)[source]

Extracts the NO coefficients from a Restricted, natural orbitals AIMAll calculation.

Parameters

file_path (str) – Path to the file to process.

Returns

List of extracted Occ_MO(i) values.

Return type

list of float

esipy.atomicfiles.write_wfx(path, name, mol, mf, aom, wf, occ=None)[source]

Minimal helper to write a .wfx file for ESIpy. This writes a compact WFX-like file named <name>.wfx into the provided path. If occ is provided it will be used for the MO occupations (expected as a diagonal matrix); otherwise a sensible default is built from wf and aom.