Difference between revisions of "Oparse.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Update function See also links and function index membership)
(sync with Spinach main 3975f139: hfc.iso NaN when not printed)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:oparse.m}} __NOTOC__
 
{{DISPLAYTITLE:oparse.m}} __NOTOC__
−
Parser for ORCA calculation logs that extracts all potentially useful information from an ORCA log.
+
A parser for ORCA text output logs, versions 2.6 to 6.1. Reads the geometry and every magnetic parameter that ORCA prints in the main output file.
  
 
==Syntax==
 
==Syntax==
  
−
     props=oparse(filename)
+
     props=oparse(file_name)
  
 
==Parameters==
 
==Parameters==
  
−
    filename - the name of the file to be parsed, a character string
+
    file_name - a character string with the file path
  
−
==Returns==              
+
==Outputs==
−
The following output fields are returned, ''if the corresponding information is present in the log file'':
+
 
−
           
+
  props.filename          - log file name
−
    props.std_geom         - standard geometry, natoms x 3 array, Angstrom
+
  props.orca_version      - ORCA version string
−
+
  props.symbols          - atomic symbols, 1 x natoms cell
−
    props.natoms           - number of atoms, an integer
+
  props.atomic_numbers    - atomic numbers, 1 x natoms
−
+
  props.std_geom         - atomic coordinates, natoms x 3, Angstrom
−
     props.hfc.full.eigvals - HFC eigenvalues, natoms x 1 cell array of 3x1 vectors, Gauss
+
  props.natoms           - number of atoms
−
   
+
  props.charge            - total charge
−
    props.hfc.full.eigvecs - HFC eigenvectors, natoms x 1 cell array of 3x3 matrices
+
  props.multiplicity     - spin multiplicity
−
+
  props.energy            - final single point energy, Hartree
−
    props.hfc.full.matrix - HFC tensors, natoms x 1 cell array of 3x3 matrices, Gauss
+
  props.dip_moment        - electric dipole moment, a.u.
−
   
+
  props.mulliken_chg      - Mulliken atomic charges, natoms x 1
−
    props.g_tensor.matrix  - g-tensor, 3x3 matrix, Bohr magneton units
+
  props.mulliken_spin    - Mulliken spin populations, natoms x 1
−
+
  props.g_tensor.raw      - g-matrix as printed by ORCA
−
    props.efg             - electric field gradient tensors, a.u.^-3
+
  props.g_tensor.matrix  - symmetrised g-matrix
−
+
  props.g_tensor.eigvals - eigenvalues of the symmetrised g-matrix
−
    props.symbols         - atomic symbols, nspins x 1 cell array of character strings
+
  props.g_tensor.eigvecs - eigenvectors of the symmetrised g-matrix
−
+
  props.zfs.matrix        - zero-field splitting tensor, cm^-1
−
    props.filename         - log file name, a character string
+
  props.zfs.eigvals      - ZFS tensor eigenvalues, cm^-1
 +
  props.zfs.eigvecs      - ZFS tensor eigenvectors
 +
  props.hfc.full.matrix   - hyperfine tensors, Gauss, natoms cell
 +
  props.hfc.full.eigvals  - hyperfine eigenvalues, Gauss, natoms cell
 +
  props.hfc.full.eigvecs - hyperfine eigenvectors, natoms cell
 +
  props.hfc.iso          - isotropic hyperfine couplings, Gauss, NaN if not printed
 +
  props.efg               - EFG tensors, a.u.^-3, natoms cell
 +
  props.nqi              - quadrupolar tensors, Hz, natoms cell
 +
  props.isotopes         - isotopes used by ORCA, natoms cell
 +
  props.cst              - shielding tensors, ppm, natoms cell
 +
  props.j_couplings      - isotropic J-couplings, Hz, natoms x natoms
 +
  props.chi_temps         - susceptibility temperatures, K
 +
  props.chi_tensors      - molar magnetic susceptibility tensors,
 +
                            cm^3*K/mol, one cell per temperature
 +
 
 +
Only the fields that ORCA has actually printed are returned; the caller should test for their presence with isfield.
  
 
==Examples==
 
==Examples==
Line 37: Line 52:
 
# Chemical shielding is ''not'' the same as chemical shift.
 
# Chemical shielding is ''not'' the same as chemical shift.
 
# This function parses ORCA logs. Use [[g2spinach.m]] to convert that information into ''Spinach'' input structures.
 
# This function parses ORCA logs. Use [[g2spinach.m]] to convert that information into ''Spinach'' input structures.
−
# The parser is a bit old-school. If you are proficient with regular expressoins, we would really appreciate a hand.
+
# ORCA prints magnetic parameters only for the nuclei that were requested in the input, and labels each of them with the zero based index of the atom in the Cartesian coordinate table. All per-atom outputs above are therefore indexed by the position of the atom in props.std_geom, and are left empty for atoms whose parameters were not printed.
 +
# When a log contains multiple geometries or multiple property sections, for example a geometry optimisation or a relaxed surface scan, the last one printed is returned.
  
 
==See also==
 
==See also==

Latest revision as of 09:58, 18 September 2026

A parser for ORCA text output logs, versions 2.6 to 6.1. Reads the geometry and every magnetic parameter that ORCA prints in the main output file.

Syntax

    props=oparse(file_name)

Parameters

   file_name - a character string with the file path

Outputs

  props.filename          - log file name
  props.orca_version      - ORCA version string
  props.symbols           - atomic symbols, 1 x natoms cell
  props.atomic_numbers    - atomic numbers, 1 x natoms
  props.std_geom          - atomic coordinates, natoms x 3, Angstrom
  props.natoms            - number of atoms
  props.charge            - total charge
  props.multiplicity      - spin multiplicity
  props.energy            - final single point energy, Hartree
  props.dip_moment        - electric dipole moment, a.u.
  props.mulliken_chg      - Mulliken atomic charges, natoms x 1
  props.mulliken_spin     - Mulliken spin populations, natoms x 1
  props.g_tensor.raw      - g-matrix as printed by ORCA
  props.g_tensor.matrix   - symmetrised g-matrix
  props.g_tensor.eigvals  - eigenvalues of the symmetrised g-matrix
  props.g_tensor.eigvecs  - eigenvectors of the symmetrised g-matrix
  props.zfs.matrix        - zero-field splitting tensor, cm^-1
  props.zfs.eigvals       - ZFS tensor eigenvalues, cm^-1
  props.zfs.eigvecs       - ZFS tensor eigenvectors
  props.hfc.full.matrix   - hyperfine tensors, Gauss, natoms cell
  props.hfc.full.eigvals  - hyperfine eigenvalues, Gauss, natoms cell
  props.hfc.full.eigvecs  - hyperfine eigenvectors, natoms cell
  props.hfc.iso           - isotropic hyperfine couplings, Gauss, NaN if not printed
  props.efg               - EFG tensors, a.u.^-3, natoms cell
  props.nqi               - quadrupolar tensors, Hz, natoms cell
  props.isotopes          - isotopes used by ORCA, natoms cell
  props.cst               - shielding tensors, ppm, natoms cell
  props.j_couplings       - isotropic J-couplings, Hz, natoms x natoms
  props.chi_temps         - susceptibility temperatures, K
  props.chi_tensors       - molar magnetic susceptibility tensors,
                            cm^3*K/mol, one cell per temperature

Only the fields that ORCA has actually printed are returned; the caller should test for their presence with isfield.

Examples

None at the moment.

Notes

  1. Chemical shielding is not the same as chemical shift.
  2. This function parses ORCA logs. Use g2spinach.m to convert that information into Spinach input structures.
  3. ORCA prints magnetic parameters only for the nuclei that were requested in the input, and labels each of them with the zero based index of the atom in the Cartesian coordinate table. All per-atom outputs above are therefore indexed by the position of the atom in props.std_geom, and are left empty for atoms whose parameters were not printed.
  4. When a log contains multiple geometries or multiple property sections, for example a geometry optimisation or a relaxed surface scan, the last one printed is returned.

See also

gparse.m, g2spinach.m, c2spinach.m, cyprinol.m, fatty_acid.m, gissmo2spinach.m, karplus_fit.m, killcross.m, killdiag.m, merge_inp.m, methyl_group.m, nuclacid.m, ocparse.m, parsexml.m, protein.m, read_bmrb.m, read_pdb_nuc.m, read_pdb_pro.m, v2spinach.m, weblab2nqi.m, x2spinach.m, Import,_export,_and_visualisation

Version 1.9, authors: Ilya Kuprov, Elizaveta Suturina