QCORR

class qcorr(**kwargs)

Class containing all the functions from the QCORR module.

Parameters

kwargsargument class

Specify any arguments from the QCORR module (for a complete list of variables, visit the AQME documentation)

analyze_abnormal(errortype, cclib_data, outlines)

Analyze errors from calculations that did not finish normally

analyze_isom(file, cartesians, atom_types, errortype)

Check if the initial structure isomerized during QM geometry optimization

analyze_normal(duplicate_data, errortype, cclib_data, file_name)

Analyze errors from normally terminated calculations

cclib_init(file, file_name)

Determine termination and error types (initial determination), create json files with cclib and load the data in the cclib json files

fix_imag_freqs(cclib_data, cartesians)

Fixes undersired (extra) imaginary frequencies from QM calculations. This function multiplies the imaginary normal mode vectors by the selected amplitude (0.2 is the default amplitude in the pyQRC script from GitHub, user: bobbypaton). By default, all the extra imaginary modes are used (i.e. in calculations with three extra imaginary frequencies, all the three modes will be used to displace the atoms). This can be tuned with the --ifreq_cutoff option (i.e. only use freqs lower than -50 cm-1).

Parameters

cclib_datacclib object

Variables parsed with cclib

cartesianslist of lists

List of lists containing the molecular coordinates as floats

Returns

cartesianslist of lists

New set of cartesian coordinates generated after displacing the original coordinates along the normal modes of the corresponding imaginary frequencies

json_gen(file, file_name)

Create a json file with cclib and load a dictionary

organize_outputs(file, termination, errortype, file_terms)
  1. Moves the QM output files to their corresponding folders after the analysis.

  2. Keeps track of the number of calculations with the different types of terminations and error types

Parameters

filestr

Output file

terminationstring

Type of termination of the QM output file (i.e. normal, error, unfinished)

errortypestring

Type of error type of the QM output file (i.e. None, not_specified, extra_imag_freq, etc)

file_termsdict

Keeps track of the number of calculations for each termination and error type

Returns

file_termsdict

Keeps track of the number of calculations for each termination and error type

qcorr_fixing(cclib_data, file, atom_types, cartesians)

Create com files for resubmission with the suggested protocols to correct the errors

qcorr_processing()

General function of the QCORR module that:

  1. Analyzes the QM output files and moves output files with normal termination and no extra imaginary frequencies to the same folder

  2. Generates input files to fix errors and extra imaginary frequencies

  3. Generates input files with new keywords line(s) from the normally terminated files from point 1 (i.e. single-point energy corrections)

write_qcorr_csv(file_terms)

Write information about the QCORR analysis in a csv

Parameters

fileslist of str, default=''

Filenames of QM output files to analyze. If .log (or other strings that are not lists such as *.out) are specified, the program will look for all the log files in the working directory through glob.glob(.log)

w_dir_mainstr, default=os.getcwd()

Working directory

fullcheckbool, default=True

Perform an analysis to detect whether the calculations were done homogeneously (i.e. same level of theory, solvent, grid size, etc)

varfilestr, default=None

Option to parse the variables using a yaml file (specify the filename)

ifreq_cutofffloat, default=0.0

Cut off for to consider whether a frequency is imaginary (absolute of the specified value is used)

amplitude_ifreqfloat, default=0.2

Amplitude used to displace the imaginary frequencies to fix

freq_convstr, default=None

If a string is defined, it will remove calculations that converged during optimization but did not convergence in the subsequent frequency calculation. Options: opt keyword as string (i.e. 'opt=(calcfc,maxstep=5)'). If readfc is specified in the string, the chk option must be included as well.

im_freq_inputstr, default='opt=(calcfc,maxstep=5)' (Gaussian), 'n%geomnCalc_Hess truenMaxStep 0.05nend' (ORCA)

When extra imaginery frequencies are detected by QCORR, it automatically adds hessian calcs before starting geometry optimizations. This option can be disabled using im_freq_input=None.

s2_thresholdfloat, default=10.0

Cut off for spin contamination during analysis in % of the expected value (i.e. multiplicity 3 has an the expected <S**2> of 2.0, if s2_threshold = 10, the <S**2> value is allowed to be 2.0 +- 0.2). Set s2_threshold = 0 to deactivate this option.

dup_thresholdfloat, default=0.0001

Energy (in hartree) used as the energy difference in E, H and G to detect duplicates

ro_thresholdfloat, default=0.1

Rotational constant value used as the threshold to detect duplicates

isom_typestr, default=None

Check for isomerization from the initial input file to the resulting output files. It requires the extension of the initial input files (i.e. isom_type='com' or 'gjf') and the folder of the input files must be added in the isom_inputs option

isom_inputsstr, default=os.getcwd()

Folder containing the initial input files to check for isomerization

vdwfracfloat, default=0.50

Fraction of the summed VDW radii that constitutes a bond between two atoms in the isomerization filter

covfracfloat, default=1.10

Fraction of the summed covalent radii that constitutes a bond between two atoms in the isomerization filter

nodup_checkbool, default=False

If True, the duplicate filter is disabled

Note

New input files are generated through the QPREP module and, therefore, all QPREP arguments can be used when calling QCORR and will overwrite default options. For example, if the user specifies qm_input='wb97xd/def2svp', all the new input files generated to fix issues will contain this keywords line. See examples in the 'Example_workflows' folder for more information.