FileReader class#

Any data parsed from by a FileReader can be accessed much like a dictiory (i.e. some_filereader["energy"]). A nearly complete list of keys for various file types is at the bottom of this page.

class AaronTools.fileIO.FileReader(fname, get_all=False, just_geom=True, oniom=False, scan_read_all=False, freq_name=None, conf_name=None, nbo_name=None, max_length=10000000)#

class for reading files

Attributes

  • name

  • file_type

  • comment

  • atoms list(Atom) or list(OniomAtom)

  • other dict

__init__(fname, get_all=False, just_geom=True, oniom=False, scan_read_all=False, freq_name=None, conf_name=None, nbo_name=None, max_length=10000000)#
Parameters:
  • fname (str|tuple) – either a string specifying the file name of the file to read or a tuple of (str(name), str(file_type), str(content))

  • get_all (bool) – if true, optimization steps are also saved in self.all_geom; otherwise only saves last geometry

  • just_geom (bool) – if true, does not store other information, such as frequencies, only what is needed to construct a Geometry() obj

  • freq_name (str) – Name of the file containing the frequency output. Only use if this information is in a different file than fname (eg: xtb runs using the –hess runtype option)

  • nbo_name (str) – Name of the file containing the NBO orbital coefficients in the AO basis. Only used when reading .47 files.

  • max_length (int) –

    maximum array size to store from FCHK files

    any array that would be larger than this will be the size the array would be ignored

read_file(get_all=False, just_geom=True, scan_read_all=False, freq_name=None, conf_name=None, nbo_name=None, oniom=False, max_length=10000000)#

Reads geometry information from fname.

Parameters:
  • get_all (bool) – If false (default), only keep the last geom If true, self is last geom, but return list of all others encountered

  • nbo_name (str) – nbo output file containing coefficients to map AO’s to orbitals

  • max_length (int) – max. array size for arrays to store in FCHK files - anything larger will be the size the array would not be stored

read_xyz(f, get_all=False, oniom=False)#

read xyz files

read_sd(f, get_all=False)#

read sdf file

read_mol2(f, get_all=False)#

read TRIPOS mol2

read_psi4_out(f, get_all=False, just_geom=True)#

read psi4 output file

read_orca_out(f, get_all=False, just_geom=True, scan_read_all=False)#

read orca output file

read_qchem_out(f, get_all=False, just_geom=True)#

read qchem output file

read_log(f, get_all=False, just_geom=True, scan_read_all=False)#

read gaussian output file

read_com(f)#

read gaussian input file

read_fchk(f, just_geom=True, max_length=10000000)#

read formatted checkpoint file

read_pdb(f, qt=False)#

read pdb or pdbqt file

read_mmcif(f)#

read mmcif

read_nbo(f)#

read nbo data

read_crest(f, conf_name=None)#

conf_name = False to skip conformer loading (doesn’t get written until crest job is done)

read_xtb(f, freq_name=None)#

read xtb output

read_sqm(f)#

read sqm output

read_nbo_47(f, nbo_name=None)#

read nbo .47 file

read_nbo_31(f, nbo_name=None)#

read nbo .31 file

FileReader keys for various output files#

CREST output#

key

description

finished

boolean for whether the job finished without error

best_pop

population of the lowest energy structure

free_energy

free energy of the ensemble in Eh

entropy

entropy of the ensemble

avg_energy

average energy of the ensemble in Eh

energy

energy of the lowest structure (Eh)

temperature

temperature in K

error

AaronTools error code if the job errored out

error_msg

error message if the job errored out

charge

charge of the system

multiplicity

spin multiplicity of the system

finished

boolean for whether the job finished without error

conformers

structures for all of the conformers CREST found

Gaussian Output#

key

description

energy

energy of the system (Eh), might be TD-DFT energy for TD-DFT jobs

charge

total charge of the system

multiplicity

spin multiplicity of the system

archive

archive entry of the computation

opt_steps

number of steps for geometry optimizations

ECP

elements that are using an effective core potential

gradient

optimization convergence status

params

coordinates that are used for geometry optimization

scf_energy

energy from SCF

E(TD-DF/TD-DFT)

energy from TD

E(method)

energy from the specified method after SCF

mass

mass of the system in kg

n_basis

number of basis functions

n_frozen

number of basis functions that are frozen

n_occupied_alpha

number of basis functions that occupied by alpha electrons

n_virtual_beta

number of basis functions that unoccupied by alpha electrons

n_virtual_beta

number of basis functions that unoccupied by beta electrons

hpmodes

boolean for whether freq=HPModes or equivalent was requested

frequency

Frequency object for the vibrational data

X_matrix

anharmonic vibrations X matrix

X0

anharmonic vibrations X0

uv_vis

ValenceExciations object for the excitation data

S^2 before

spin before annihilation

S^2 annihilated

spin after annihilation

temperature

temperature for thermochemistry in K

rotational_temperature

rotational constants in K

equilibrium_rotational_temperature

rotational constants in K from anharmonic frequency jobs

ground_rotational_temperature

rotational constants in K from anharmonic frequency jobs

centr_rotational_temperature

rotational constants in K from anharmonic frequency jobs

E_ZPVE

zero-point vibrational energy in Eh

enthalpy

enthalpy in Eh

free_energy

RRHO free energy in Eh

ZPVE

zero-point vibrational energy correction to the electronic energy in Eh

rotational_symmetry_number

rotational symmetry number

electric_potential

electric potential for each

electric_field

electric field vector

optical_rotation_(number)

optical rotation at the given wavelength

full_point_group

point group

abelian_subgroup

Abelian subgroup of point group

concise_abelian_subgroup

concise Abelian subgroup of point group

forces

force vectors for each nucleus in Eh/Bohr

X Charges

partial atomic charges calculated using X scheme (e.g., NBO)

error

AaronTools error code if the job errored out

error_msg

error message if the job errored out

theory

Theory object for this job type (might not be perfect)

finished

boolean for whether the job finished without error

Gaussian Formatted Checkpoint File#

The keys for .fchk files are mostly the same as the labels in the .fchk file. No string entries are parsed from .fchk files. There is also an orbitals key with an Orbitals object.

NBO Output#

key

description

ao_types

type of each orbital

ao_atom_ndx

index of the atom for each atomic orbital

nao_type

description for the natural orbitals

ao_occ

orbital occupancies

ao_nrg

orbital energies

Natural Charges

partial atomic charges based on natural population analysis

core_occ

core occupancies

valence_occ

valence occupancies

rydberg_occ

Rydberg occupancies

wiberg_nao

Wiberg bond orders

wiberg_nao

Wiberg bond orders

shell_to_atom

maps each shell to an atom

momentum_label

angular momentum label for each atomic orbital

orbit_kinds

description for the orbitals (e.g., C 1-O 2 bond)

alpha_coefficients

orbital coefficients

funcs_per_shell

number of primitive functions in each shell

orbitals

Orbitals object

n_prim_per_shell

number of primitive functions in each shell

n_prim_per_shell

number of primitive functions in each shell

ORCA Output#

key

description

energy

energy of the system (Eh)

scf_energy

energy from SCF (Eh) - might not include dispersion corrections

SOC CIS/TD root energy

TD energy for the specified root from a TD-DFT computation with SOC

CIS/TD root energy

TD energy for the specified root from a TD-DFT computation

X correlation energy

correlation energy from X method (e.g., MP2)

forces

force vectors for each atom in Eh/Bohr

frequency

Frequency object for the vibrational modes

temperature

temperature for thermochemistry

mass

mass of the system in kg

charge

charge of the system

multiplicity

spin multiplicity of the system

rotational_symmetry_number

rotational symmetry number

ZPVE

zero-point energy correction in Eh

enthalpy

enthalpy in Eh

free_energy

free energy in Eh(ORCA prints Quasi-RRHO)

rotational_temperature

rotational constants in K

full_point_group

point group

gradient

optimization convergence status

Löwdin Charges

partial atomic charges based on Löwdin population analysis

Mulliken Charges

partial atomic charges based on Mulliken population analysis

basis_set_by_ele

basis set parameters for each element

n_basis

number of basis functions

SOC GS stabilization energy

ground state stabilization due to SOC (Eh)

soc x

X component of the SOC (cm-1)

soc y

Y component of the SOC (cm-1)

soc z

Z component of the SOC (cm-1)

soc (cm^-1)

magnitude of the SOC for each pair of roots from TD-DFT (cm-1)

uv_vis

ValenceExciations object for excitation data

alpha_coefficients

alpha molecular orbital coefficients

beta_coefficients

beta molecular orbital coefficients

alpha_nrgs

alpha molecular orbital energies

beta_nrgs

beta molecular orbital energies

alpha_occupancies

molecular orbital occupancies

beta_occupancies

molecular orbital occupancies

shell_to_atom

maps each basis set function to an atom index

n_alpha

number of alpha electrons

n_beta

number of beta electrons

opt_steps

number of optimization steps

ao_overlap

atomic orbital overlap matrix

finished

whether the job finished without error

error

AaronTools error code if the job errored out

error_msg

error message if the job errored out

orbitals

Orbitals instace

Psi4 Output#

key

description

key

description

energy

energy of the system (Eh)

charge

charge of the system

multiplicity

spin multiplicity of the system

mass

mass of the system (kg)

ZPVE

zero-point energy correction (Eh)

E_ZPVE

zero-point energy (Eh)

enthalpy

enthalpy (Eh)

free_energy

RRHO free energy (Eh)

rotational_symmetry_number

rotational symmetry number

rotational_temperature

rotational constants in K

frequency

Frequency object for the vibrational modes

finished

whether the job finished without error

gradient

geometry optimization convergence status

forces

force vector for each atom (Eh/Bohr)

scf_energy

energy from SCF (Eh/Bohr)

X correlation energy

correlation energy from method X (e.g., MP2)

full_point_group

point group

molecular_point_group

point group that Psi4 could take advantage of

uv_vis

ValenceExciations object for excitation data

error

AaronTools error job if the job errored out

error_msg

error message

Q-Chem Output#

key

description

energy

energy of the system (Eh)

scf_energy

SCF energy of the system (Eh)

E(corr)

correlation energy (Eh)

full_point_group

point group

abelian_subgroup

Abelian point group subgroup

Mulliken Charges

partial atomic charges based on Mulliken population analysis

gradient

geometry optimization convergence status

frequency

Frequency object for vibrational data

temperature

temperature for thermochemistry

rotational_symmetry_number

rotational symmetry number

mass

mass of the system in kg

charge

net charge of the system

multiplicity

spin multiplicity of the system

uv_vis

ValenceExciations object for excitation data

forces

force on each atom in Eh/Bohr (only parsed from analytic force computations)

finished

whether the job finished without error

error

AaronTools error code if the job errored out

SQM Output#

key

description

energy

energy of the system (Eh)

finished

whether the job finished without error

error

AaronTools error code if the job errored out (currently only UNKNOWN)

error_msg

error message if the job errored out

xTB Output#

key

description

energy

energy of the system (Eh)

error

AaronTools error code if the job errored out

error_msg

error message if the job errored out

finished

whether the job finished without error

charge

net charge of the system

multiplicity

spin multiplicity of the system

ZPVE

zero-point energy correction (Eh)

free_energy

free energy (Eh)

temperature

temperature for thermochemistry

frequency

Frequency object for vibrational modes