schrodinger.application.qsite.output module¶
A class for parsing of QSite output files.
This module provides a class QSiteOutput
that holds the information from
a QSite run.
- class schrodinger.application.qsite.output.QSiteResults[source]¶
Bases:
schrodinger.application.jaguar.results.JaguarResults
- energy_precision = 1e-06¶
- __init__()¶
Create a JaguarResults object.
- alie_analysis_precision = 0.01¶
- alpha_polar_precision = 0.001¶
- property atom_total¶
Return the number of atoms in the structure geometry.
- balance_alie_precision = 0.001¶
- balance_esp_precision = 0.001¶
- beta_polar_precision = 0.001¶
- diff(other, short_circuit=False, factor=1.0)¶
Return a set of attributes that differ.
- Parameters
other (JaguarResults) – The instance to compare against.
short_circuit (bool) – If True, return immediately upon finding a difference.
factor (float) – A fudge factor to apply to most comparison precision values. The allowed difference between values is multiplied by factor.
- property energy¶
The overall/final energy for the calculation. Meant to be a simple handle for one to get the energy of a calculation, since there are many different types of energies in JaguarResults. The energy types range from general to method-specific - energy, solution_phase_energy, gas_phase energy, scf_energy, RI-MP2, LMP2, Neural Net (NN), external. More general energy types can be assigned the value of other energy types depending on the calculation.
For instance, a gas-phase HF job has energy = scf_energy. But a gas-phase RI-MP2 job has energy = rimp2_energy, since that is the “final” energy of the calculation. Solution-phase calculations have more layers.
The code that assigns values to the various energy types is split between _getEnergy() and the various functions in textparser.py. For instance see the rimp2_energies, nn_gas/sol_energy fxns.
- esp_analysis_precision = 0.01¶
- exc_precision = 0.0006¶
- property forces¶
Convenient access to forces for all atoms as a numpy array.
- gamma_polar_precision = 0.1¶
- getAtomTotal()¶
- getStructure(properties=None)¶
Get a schrodinger.Structure object for a specific geometry.
- property_names (list of tuples of (string, object))
A list of properties names and values belonging to the overall job these results are a part of.
- lo_precision = 0.01¶
- nucrep_precision = 1e-08¶
- osc_precision = 0.001¶
- rxn_coord_precision = 0.001¶
- spin_splitting_precision = 0.01¶
- tdm_precision = 0.02¶
- ts_component_precision = 0.1¶
- zpe_precision = 0.01¶
- class schrodinger.application.qsite.output.QSiteTextParser(jaguar_output, file_iter=None)[source]¶
Bases:
schrodinger.application.jaguar.textparser.TextParser
A subclass of the Jaguar output text parser that adds QSite specific parsing.
- callback = {'scf': {re.compile('^\\s*number of electrons\\.+\\s+(\\d+)'): <function nelectron>, re.compile('^\\s*Sz\\*\\(Sz\\+1\\)[\\s\\.]+(\\S+)'): <function sz2>, re.compile('^\\s*<S\\*\\*2>[\\s\\.]+(\\S+)'): <function s2>, re.compile('^\\s*GVB:\\s+(\\S+)'): <function npair>, re.compile('(^etot.*$)'): <function etot>, re.compile('(?<!\\()SCFE.*\\s+(-?[\\.\\d]+)\\s+hartrees'): <function scfe>, re.compile('\\(B\\)\\s+Nuclear-nuclear\\.+\\s+(-?[\\.\\d]+)'): <function nucrep1>, re.compile('\\(A\\)\\s+Nuclear repulsion\\.+\\s+(-?[\\.\\d]+)'): <function nucrep2>, re.compile('\\(E\\)\\s+Total one-electron terms\\.+\\s+(-?[\\.\\d]+)'): <function one_e_terms>, re.compile('\\(I\\)\\s+Total two-electron terms\\.+\\s+(-?[\\.\\d]+)'): <function two_e_terms>, re.compile('\\(L\\)\\s+Electronic energy\\.+\\s+(-?[\\.\\d]+)'): <function electronic_e>, re.compile('\\(N0\\).*correction\\.+\\s+(-?[\\.\\d]+)'): <function aposteri_e>, re.compile('(Alpha|Beta)? HOMO energy:\\s+(\\S+)'): <function homo>, re.compile('(Alpha|Beta)? LUMO energy:\\s+(\\S+)'): <function lumo>, re.compile('(?P<type>Alpha|Beta)? Orbital energies( \\(hartrees\\))?(?P<label>/symmetry label)?:'): <function orbital_energies>, re.compile('Energy computed with NOPS on.'): <function nops_on>, re.compile('Energy computed with NOPS off.'): <function nops_off>, re.compile('^\\sPCM solvation energy (electrostatic)\\.+\\s*(-?[\\.\\d]+)'): <function solvation>, re.compile('\\(V\\).*Solvation energy\\.+\\s*(-?[\\.\\d]+)'): <function solvation>, re.compile('^\\sSolution phase energy\\.+\\s*(-?[\\.\\d]+)'): <function solution_phase>, re.compile('\\(P\\).*Solution phase energy\\.+\\s*(-?[\\.\\d]+)'): <function solution_phase>, re.compile('^\\sGas phase energy\\.+\\s*(-?[\\.\\d]+)'): <function gas_phase>, re.compile('\\(O\\).*Gas phase energy\\.+\\s*(-?[\\.\\d]+)'): <function gas_phase>, re.compile('The zero point energy \\(ZPE\\):\\s+(\\S+) k(\\w+)/mol'): <function zpe>}, 'pre': {re.compile('net molecular charge:\\s+(-?\\d+)'): <function molchg>, re.compile('multiplicity:\\s+(\\d+)'): <function multip>, re.compile('number of basis functions\\.\\.\\.\\.\\s+(\\d+)'): <function nbasis>, re.compile('Molecular weight:\\s+([0-9.]+)'): <function mol_weight>, re.compile('Stoichiometry:\\s+(\\w+)'): <function stoichiometry>, re.compile('basis set:\\s+(\\S+)'): <function basis_set>, re.compile('Number of optimization coordinates:\\s+(\\d+)'): <function coords_opt>, re.compile('Number of independent coordinates:\\s+(\\d+)'): <function coords_ind>, re.compile('Number of non-redundant coordinates:\\s+(\\d+)'): <function coords_nred>, re.compile('Number of constrained coordinates:\\s+(\\d+)'): <function coords_frozen1>, re.compile('Number of frozen coordinates:\\s+(\\d+)'): <function coords_frozen2>, re.compile('Number of harmonic constraints:\\s+(\\d+)'): <function coords_harmonic>, re.compile('Solvation energy will be computed'): <function solvation_job>, re.compile('Numerical 2nd derivatives will be computed'): <function numerical_freqs>, re.compile('Electrostatic potential fit to point charges on atomic centers'): <function esp_fit_atoms>, re.compile('and bond midpoints'): <function esp_fit_atoms_and_bonds>, re.compile('(Input|new) geometry:'): <function start_geometry>, re.compile('Path geometry: \\(interpolated\\, X\\=.*\\)'): <function path_geometry>, re.compile('Z-variables: (.*)$'): <function z_variables>, re.compile('Maestro file \\(output\\):\\s+(\\S.*)'): <function mae>, re.compile('Maestro file \\(input\\):\\s+(\\S.*)'): <function mae_in>, re.compile('Molecular Point Group:\\s+(\\w+)'): <function point_group>, re.compile('Point Group used:\\s+(\\w+)'): <function point_group_used>, re.compile('Number of atoms treated by QM:\\s+(\\w+)'): <function qm_atoms>, re.compile('SCF calculation type: ([A-Za-z0-9/_-]+)'): <function calc_type>, re.compile('Post-SCF correlation type: (\\w+)'): <function correlation_type>, re.compile('DFT=(\\S+)\\s*(\\(.+\\))?'): <function functional>, re.compile('^ *User Defined Functional:'): <function custom_functional>, re.compile('Geometry from &zmat(2|3), &zvar(2|3)'): <function qst_geometries>, re.compile('Symmetrized geometry:'): <function symmetrized_geometry>, re.compile('Initial geometry: \\(interpolated\\)'): <function qst_initial_geometry>, re.compile('Geometry scan coordinates:(?:\\s*\\((angstroms|bohr) and (degrees|radians)\\))?'): <function scan_coordinates>, re.compile('Non-default print settings:'): <function non_default_print_options>, re.compile('Fully analytic SCF calculation: pseudospectral method not used'): <function pseudospectral>, re.compile('Total LO correction:\\s+(\\S+)\\s+kcal/mole'): <function total_lo_correction>, re.compile('Target molecule has a ligand field spin-splitting score of\\s+(\\S+)'): <function spin_splitting_score>, re.compile('rotational constants:'): <function rotational_constants>, re.compile('^Total number of atoms:\\s+(\\d+)'): <function total_atoms>, re.compile('^Number of atoms passed to Jaguar:\\s+(\\d+)'): <function jaguar_atoms>, re.compile('^Number of atoms treated by QM:\\s+(\\d+)'): <function qm_atoms>, re.compile('^Number of atoms treated by NDDO:\\s+(\\d+)'): <function nddo_atoms>, re.compile('^Number of hydrogen caps:\\s+(\\d+)'): <function nhcaps>, re.compile('^Number of NDDO hydrogen caps:\\s+(\\d+)'): <function nddo_hcaps>, re.compile('^Number of frozen orbital cuts:\\s+(\\d+)'): <function ncuts>, re.compile('^Number of constrained MM atoms:\\s+(\\d+)'): <function nconmm>, re.compile('^Number of frozen MM atoms:\\s+(\\d+)'): <function nfrzmm>}, 'read_external_gradient': {re.compile('Energy From External Program \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function external_program_energy>}, 'nn_energy': {re.compile('ANI Gas-Phase Energy \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function nn_gas_energy>, re.compile('qRNN Gas-Phase Energy \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function nn_gas_energy>, re.compile('qRNN Solution-Phase Energy \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function nn_sol_energy>, re.compile('ANI Committee Standard Deviation \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function external_program_nn_energy_stddev>, re.compile('qRNN Committee Standard Deviation \\(a\\.u\\.\\)\\s+(-?[\\.\\d]+)'): <function external_program_nn_energy_stddev>}, 'rimp2': {re.compile('RI-MP2 Energies, in hartrees'): <function rimp2_energies>}, 'lmp2': {re.compile('Total LMP2.*\\s+(-?[\\.\\d]+)'): <function mp2>, re.compile('\\(V\\).*Solvation energy\\.+\\s*(-?[\\.\\d]+)'): <function solvation>, re.compile('\\(P\\).*Solution phase energy\\.+\\s*(-?[\\.\\d]+)'): <function solution_phase>, re.compile('\\(O\\).*Gas phase energy\\.+\\s*(-?[\\.\\d]+)'): <function gas_phase>}, 'gvblmp2': {re.compile('Total LMP2.*\\s+(-?[\\.\\d]+)'): <function mp2>, re.compile('Total GVB-LMP2.*\\s+(-?[\\.\\d]+)'): <function gvblmp2>}, 'rolmp2': {re.compile('Total LMP2.*\\s+(-?[\\.\\d]+)'): <function mp2>}, 'scanner': {re.compile('(Input|new) geometry:'): <function start_geometry>, re.compile('end of geometry scan step'): <function end_scan>, re.compile('Geometry scan step\\s+\\d+\\s*:'): <function geometry_scan_step>}, 'geopt': {re.compile('new geometry:'): <function geopt_geometry>, re.compile('String geometry: \\(iteration=.* point=.*energy=.*\\)'): <function sm_geometry>, re.compile('end of geometry optimization iteration'): <function end_geometry>, re.compile('(stopping optimization: maximum number of iterations reached|Geometry optimization complete)'): <function stopping_optimization>, re.compile('optimization seems to be stuck'): <function geopt_stuck1>, re.compile('Convergence category (\\d+)'): <function convergence_category>, re.compile('IRC point found -\\s+(Forward|Reverse|Downhill)\\s+#\\s+(\\d+)'): <function irc_point>, re.compile('Summary of IRC Reaction Path:'): <function irc_summary>, re.compile('restarting optimization from step'): <function doubted_geom>, re.compile('[Gg]eometry optimization step\\s+(\\d+)'): <function geopt_step_number>, re.compile('Setting nops=0, recomputing energy'): <function geopt_nops_on>, re.compile('to be a stuck geometry'): <function geopt_stuck2>, re.compile('SCF will be redone to get proper energy & wavefunction.'): <function nofail_geopt_restart>, re.compile('Taking the geometry with the lowest energy \\(iteration (\\d+)\\)'): <function nofail_geopt>, re.compile('Z-variables: (.*)$'): <function z_variables>, re.compile('First excited state energy:\\s+(\\S+) hartrees'): <function tddft_geopt_energy>, re.compile('rotational constants:'): <function rotational_constants>}, 'tddft_g': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'rimp2g': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'der1b': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'lmp2gb': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'lmp2gdb': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'nude': {re.compile('forces \\(hartrees/bohr\\) : (total|numerical)'): <function forces>}, 'sole': {re.compile('\\(V\\).*Solvation energy\\.+\\s*(-?[\\.\\d]+).*\\(P-O\\)'): <function solvation>, re.compile('\\(P\\).*Solution phase energy\\.+\\s*(-?[\\.\\d]+)'): <function solution_phase>}, 'onee': {re.compile('number of canonical orbitals\\.\\.\\.\\.\\.\\s+(\\d+)'): <function canorb>, re.compile('smallest eigenvalue of S:\\s+(\\S+)'): <function s_min_eval>, re.compile('^ bond-charge repulsion energy\\.+\\s+(\\S+) '): <function bondchg_repulsion_energy>}, 'ch': {re.compile('Atomic charges from electrostatic potential'): <function esp_charges>, re.compile('Atomic charges from Lowdin population analysis'): <function lowdin_charges>, re.compile('Atomic Spin Densities from Lowdin analysis'): <function lowdin_spins>, re.compile('Atomic charges from Mulliken population analysis'): <function mulliken_charges>, re.compile('Atomic Spin Densities from Mulliken analysis'): <function mulliken_spins>, re.compile('Stockholder charges from Hirshfeld partitioning'): <function stockholder_charges>, re.compile('Moments from quantum mechanical wavefunction'): <function multipole_qm>, re.compile('Moments from electrostatic potential charges'): <function multipole_esp>, re.compile('Moments from Mulliken charges'): <function multipole_mulliken>, re.compile('Atomic Fukui indices'): <function fukui_indices>}, 'etit': {re.compile('^ Reading '): <function electron_transfer>}, 'fdpol': {re.compile('polarizability \\(in AU\\) alpha\\(\\s+([0-9.-]+) eV;\\s+([0-9.-]+) eV'): <function alpha_fdpolar>, re.compile('hyperpolarizability \\(in AU\\) beta\\(\\s+([0-9.-]+) eV;'): <function beta_fdpolar>}, 'polar': {re.compile('^ polarizability \\(in AU\\):'): <function alpha_polar>}, 'cpolar': {re.compile('^ polarizability \\(in AU\\):'): <function alpha_polar>, re.compile('^ first hyperpolarizability \\(in AU\\):'): <function beta_polar>, re.compile('^ second hyperpolarizability \\(in AU\\):'): <function gamma_polar>}, 'elden': {re.compile('^ Electrostatic Potential at the Nuclei'): <function epn>, re.compile('^ Analysis of ESP on isodensity surface:'): <function esp_analysis>, re.compile('^ Analysis of ALIE on isodensity surface:'): <function alie_analysis>}, 'nmrcphf': {re.compile('NMR Properties for atom\\s+(\\S+)'): <function get_nmr>}, 'cis': {re.compile('CI size ='): <function cis_excitation_energies>}, 'sotdener': {re.compile('Ground State Dipole Moments'): <function reset_tddft_excitation_energies>, re.compile('(.*)Excited State\\s+\\d+:\\s+$'): <function tddft_excitation_energies>}, 'tdener': {re.compile('Ground State Dipole Moments'): <function reset_tddft_excitation_energies>, re.compile('(.*)Excited State\\s+\\d+:\\s+$'): <function tddft_excitation_energies>, re.compile('(.*)Excited State\\s+\\d+:\\s+(\\S+) eV'): <function tddft_excitation_energies_old>}, 'stdener': {re.compile('Ground State Dipole Moments'): <function reset_tddft_excitation_energies>, re.compile('(.*)Excited State\\s+\\d+:\\s+$'): <function tddft_excitation_energies>}, 'freq': {re.compile('The zero point energy \\(ZPE\\):\\s+(\\S+) k(\\w+)/mol'): <function zpe>, re.compile('Valid transition vector #\\s+(\\b[0-9]+\\b)'): <function get_vetted_vec_index>, re.compile('normal modes in mass-weighted cartesian coordinates:\\s+(\\d+)'): <function frequencies>, re.compile('normal modes in cartesian coordinates:\\s+(\\d+)'): <function frequencies>, re.compile('normal modes in cartesian coordinates:\\s+$'): <function frequencies_old>, re.compile('\\s*rotational symmetry number:\\s+([0-9]+)'): <function symmetry_number>}, 'before pre': {re.compile('^JobId:\\s+(\\S+)', re.IGNORECASE|re.MULTILINE): <function jobid>}, None: {re.compile('start of program (\\w+)'): <function start_of_program>, re.compile('glibc:\\s+(\\S+)'): <function glibc>, re.compile('\\s+Summary of Natural Population Analysis:'): <function nbo_charges>, re.compile('Job .+ completed on \\S+ at (\\w.*)$'): <function end_time>, re.compile('ERROR *(\\d+)?: fatal error( -- debug information follows)?'): <function fatal_error>}, 'impact': {re.compile(' calling (\\S+)\\s+atomtyping'): <function ffld>, re.compile('^ Cutoff radius:\\s+(\\S+)'): <function nb_cutoff>, re.compile('^ Update frequency: every\\s+(\\d+) '): <function nb_update>, re.compile('^ Total Energy of the system\\.+\\s+(\\S+) '): <function total_energy>, re.compile('^ Total Potential Energy\\.+\\s+(\\S+) '): <function total_potential_energy>, re.compile('^ Total Kinetic Energy\\.+\\s+(\\S+) '): <function total_kinetic_energy>, re.compile('^ Bond Stretch Energy\\.+\\s+(\\S+) '): <function bond_stretch_energy>, re.compile('^ Angle Bending Energy\\.+\\s+(\\S+) '): <function angle_bend_energy>, re.compile('^ Torsion Angle Energy\\.+\\s+(\\S+) '): <function torsion_energy>, re.compile('^ 1,4 Lennard Jones Energy\\.+\\s+(\\S+) '): <function lj14_energy>, re.compile('^ 1,4 Electrostatic Energy\\.+\\s+(\\S+) '): <function electrostatic14_energy>, re.compile('^ Lennard Jones Energy\\.+\\s+(\\S+) '): <function lj_energy>, re.compile('^ Electrostatic Energy\\.+\\s+(\\S+) '): <function electrostatic_energy>, re.compile('^ H-bond Energy\\.+\\s+(\\S+) '): <function hbond_energy>, re.compile('^ QM/MM Electrostatic Energy\\.+\\s+(\\S+) '): <function qmmm_electrostatic_energy>, re.compile('^ QM/MM Stretch Energy\\.+\\s+(\\S+) '): <function qmmm_stretch_energy>, re.compile('^ QM/MM Bend Energy\\.+\\s+(\\S+) '): <function qmmm_bend_energy>, re.compile('^ QM/MM Torsion Energy\\.+\\s+(\\S+) '): <function qmmm_torsion_energy>}}¶
- __init__(jaguar_output, file_iter=None)¶
Parameters
file_iter (iterator returning lines of Jaguar output file)
jaguar_output (JaguarOutput instance)
- endGeopt(jo)¶
Clean up at the end of a geopt step.
Adds the current results to the geopt list and creates a new current results object if appropriate.
- endIRC(direction)¶
Set state indicating the end of an IRC step and its direction.
- direction (str)
Must be ‘Forward’ or ‘Reverse’.
- endScan(jo)¶
Clean up at the end of a scan step.
Adds the current results to the scan list and creates a new current results object. Or, if this a relaxed scan, archives the geopt steps to the scan list and creates an empty geopt_step list.
- first_line_re = re.compile('^Job .+ started on (\\S+) at (\\w.*)$')¶
- parse(jaguar_output=None)¶
Parse the provided file iterator.
Return a JaguarOutput instance populated with properties parsed from the output file.
Parameters
- jaguar_output (JaguarOutput instance)
If jaguar_output is provided, that instance will be populated with the properties parsed from the output file. Otherwise, the object provided to the TextParser constructor will be used.
- Raises
StopIteration – In cases of unexpected file termination
JaguarParseError – For parsing errors
- class schrodinger.application.qsite.output.QSiteOutput(output=None, partial_ok=False)[source]¶
Bases:
schrodinger.application.jaguar.output.JaguarOutput
A class to hold output information from a QSite run.
- OK = 1¶
- SPLAT = 2¶
- UNKNOWN = 0¶
- __init__(output=None, partial_ok=False)¶
Initialize from an output filename or output name.
- Parameters
output (str) – The name of the Jaguar output file to read. Can be the .out or .out.gz name or a file with the same basename as the desired .out/.out.gz file.
partial_ok (bool) – Do not raise an exception if parsing fails partway through the file. Instead, process what has been read and store the parsing error in the parsing_error attribute. The resulting JaguarOutput object may be in an incomplete state.
Exceptions:
- Raises
IOError – Raised if output file cannot be found.
JaguarParseError – Raised if the output file can’t be parsed. If this is raised, the state of the resulting object is not guaranteed to be useful.
StopIteration – Raised in some cases if the file ends unexpectedly If this is raised, the state of the resulting object is not guaranteed to be useful.
- diff(other, factor=1.0, short_circuit=False)¶
Return a list of all differing attributes.
Each item is a tuple of (property name, self value, other value).
Note that the property names are not necessarily usable in getattr; some may be properties of atoms, such as “atom[1].forces”.
Parameters
- other (JaguarOutput)
The JaguarOutput instance to compare against.
- factor (float)
A constant factor to multiply all float comparison tolerances by.
- short_circuit (boolean)
If true, will return immediately upon finding a difference. The values in the tuple will both be None in this case.
- property duration¶
Return the duration of the job as a datetime.timedelta object.
- getDuration()¶
- getIrcStep()¶
- getScanStep()¶
- getStructure()¶
Return a structure object for the last geometry in the file.
- getStructures()¶
Get Structure objects for the geometries in the output file.
If this job is a geometry optimization, it will contain geometries for all steps. If it’s a scan, it will contain the geometries for each scan point (but only the end geometries if it’s a relaxed scan).
Return a list of Structure objects.
- property irc_step¶
Return a list of final IRC geometries for each IRC step.
- mol_weight_precision = 0.01¶
- property path_structures¶
List of structures along path for IRC or RSM jobs, empty list otherwise
- property restart¶
Return the restart name for this output object.
- rmsd_precision = 0.0001¶
- property scan_step¶
Return a list of final scan geometries for each scan step.
- write(filename=None, mimic_backend=False, add_title=False, add_entry=False)¶
Write a maestro file for the structure in the output file.
Note that this method overwrites any file with the same pathname.
If this job is a geometry optimization, it will contain geometries for all steps. If it’s a scan, it will contain the geometries for each scan point (but only the end geometries if it’s a relaxed scan).
- filename (str)
The filename to write to; if not specified, defaults to the restart name with the ‘.mae’ suffix.
- mimic_backend (bool)
If false, all geometry optimization structures will be written. If true, the geometry optimization structures will be written as in regular jobs; by default, only the last geometry will be used, but if ip472 is greater than 1, all geometries will be included.
- add_title (bool)
If true, then an empty title will be replaced with the output file’s jobname.
- add_entry (bool)
If the entry name is empty or starts with ‘Scratch’ it will be replaced with the output file’s jobname.
- writeGrd(filename)¶
Write a .grd file for 1D or 2D visualization of scans in maestro to file ‘filename’.
If the job is not a scan job, this will raise a RuntimeError.