schrodinger.application.jaguar.output module¶
Classes for parsing Jaguar output files and accessing output properties programmatically.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.jaguar.output.join_structure_files(name: str, files: List[str])¶
Pull the CTs out of each .mae file in the ‘files’ list and put them into a new .mae file called ‘name’, which is expected to already contain the .mae extension. If a file called ‘name’ already exists, it will be overwritten.
- schrodinger.application.jaguar.output.get_section(fname: str, sect_start: str, sect_end: Optional[str] = None) Iterable[str] ¶
Generator of lines for a section of a (jaguar) file.
The section is defined by a start and optionally by an end.
Note that if sect_end is not specified the remainder of the file after a sect_start will be returned by the generator.
Note that, if multiple sections defined by sect_start and sect_end are present in the file, all will appear in the order they appear
- Parameters
fname – Name of file to parse for section
sect_start – Indicator of where section begins, i.e. the first line of desired section
sect_end – If specified, indicator of the end of a section, i.e. the last line in the desired section
- schrodinger.application.jaguar.output.get_overlap_dim(fname: str) int ¶
Get size of overlap matrix from output file.
Unfortunately, this does not necessarily match the nbasis of JaguarOutput: the overlap matrix may be in Cartesians, i.e. numd=6, but since we aren’t 100% sure, we will just check how many rows are in the printed overlap matrix.
- Parameters
fname – name of output file
- Returns
dimension of overlap matrix
- schrodinger.application.jaguar.output.parse_overlap_mat(fname: str) numpy.array ¶
Parse overlap matrix from output file
- Parameters
fname – name of output file
- Returns
nbas x nbas overlap matrix as numpy array
- class schrodinger.application.jaguar.output.JaguarOutput(output: Optional[str] = None, partial_ok: bool = False, timing_thresh: Optional[Dict[str, float]] = None)¶
Bases:
object
A class for accessing Jaguar output properties.
Stores a JaguarResults object for each geometry (multiple geometry optimization steps in the geopt_step list, multiple scan steps in the scan_step list). Each JaguarResults object holds all properties specific to a given geometry. (See the JaguarResults documentation for more detail.) Each JaguarResults object also holds a list of JaguarAtomicResults objects for atomic specific properties.
General Attributes
- job_id (string)
Job ID
- opts (JaguarOptions)
Job Calculation Options
- timings (RoutineTimes)
Job Routine Timings
- host (string)
Job Host
- mae_out (string)
Maestro output file
- mae_in (string)
Maestro input file
- status (int)
Job status - set to 0, 1, or 2 corresponding to UNKNOWN, OK, or SPLAT respectively
- fatal_error (string)
Error message in the event the job failed
- fatal_errorno (string)
Error number in the event the job failed
- glibc (string)
Reported glibc version
- lastexe (string)
Last Jaguar Executable Used
- start_time (datetime.datetime)
Starting time of the calculation - NOT CURRENTLY SUPPORTED
- end_time (datetime.datetime)
Ending time of the calculation - NOT CURRENTLY SUPPORTED
- cpu_duration (datetime.timedelta)
Total elapsed CPU Time used across all CPUs. CPU time is the time spent executing the process.
- cpu_sys_duration (datetime.timedelta)
Total elapsed CPU and System Time used across all CPUs. CPU time is the time spent executing the process. System is the amount of time spent in the kernel.
- symmetrized (bool)
Whether the geometry has been symmetrized or not
- geopt_stuck (bool)
Whether the geopt or tsopt got stuck
- sm_geopt_step (list of lists of JaguarResults)
results for individual SM geopt steps (see note below) - NOT CURRENTLY SUPPORTED
- sm_n_steps (list of lists of JaguarResults)
results for individual string method steps (see note below) - NOT CURRENTLY SUPPORTED
- geopt_step (list of JaguarResults)
results for each step in a geopt - NOT CURRENTLY SUPPORTED
- gas_phase_geopt_step (list of JaguarResults)
results for the gas phase geometry optimization in a solvated geopt - NOT CURRENTLY SUPPORTED
- solution_phase_geopt_step (list of JaguarResults)
results for the solution phase geometry optimization in a solvated geopt - NOT CURRENTLY SUPPORTED
- scan_geopt_step (list of lists of JaguarResults)
results for individual scan geopt steps (see note below) - NOT CURRENTLY SUPPORTED
- irc_geopt_step (list of lists of JaguarResults)
results for individual IRC geopt steps (see note below) - NOT CURRENTLY SUPPORTED
- input_geometry (schrodinger.structure.Structure)
the input geometry, unmodified by symmetrization - NOT CURRENTLY SUPPORTED
- input_geometry2 (schrodinger.structure.Structure)
the input geometry from zmat2, unmodified by symmetrization - NOT CURRENTLY SUPPORTED
- input_geometry3 (schrodinger.structure.Structure)
the input geometry from zmat3, unmodified by symmetrization - NOT CURRENTLY SUPPORTED
- convergence_category (list of JaguarResults)
Results for the convergence category - NOT CURRENTLY SUPPORTED
The scan_geopt_step and irc_geopt_step attributes are both lists of lists of JaguarResults. Each element of the list represents the geopt steps taken within an individual scan or IRC step. In the case where geometry optimization is not done with the scan or IRC calculation, each element is a list with a single JaguarResults element.
The properties scan_step and irc_step are probably more useful. They provide a list of the final geometries for each scan/IRC step.
Property Attributes
- _sm_n_points (int)
number of string method points
- atomicsec_dict (Dict[str, Dict[str, str]])
&atomic section parsed into dictionary mapping atom label to a dictionary of key:value
- atomicsec_string (string)
String that stores &atomic section, if printed to output
- basis (string)
Basis Set
- charge (int)
Molecular charge of Input Structure
- coords_frozen (int)
Number of frozen coordinates
- coords_harmonic (int)
number of harmonic constraints
- coords_ind (int)
Number of independent coordinates
- coords_nred (int)
Number of non-redundant coordinates
- coords_opt (int)
Number of optimization coordinates
- functional (string)
DFT Functional
- gensec_string (string)
String that stores &gen section, if printed to output
- method (string)
Calculation Type
- mol_weight (float, amu)
Molecular weight of input geometry
- multiplicity (int)
Spin Multiplicity of Input Structure
- nbasis (int)
Number of Basis Functions
- nelectron (int)
Number of Electrons
- nthreads (int)
Number of threads
- path_structures (list of Structure instances)
path structures for IRC/RSM jobs - NOT CURRENTLY SUPPORTED
- point_group (string)
Molecular point group of the input molecule
- point_group_used (string)
Point group used in the calculation
- qm_atoms (int)
Number of QM Atoms
- scan_coords (list of Scan objects)
scan coordinates - NOT CURRENTLY SUPPORTED
- stoichiometry (string)
Stoichiometry of input geometry
- ts_component_descriptions (string)
Descriptions of the transition state vector components
- UNKNOWN = 0¶
- OK = 1¶
- SPLAT = 2¶
- PARSING_EXCEPTIONS = (<class 'OSError'>, <class 'schrodinger.application.jaguar.textparser.JaguarParseError'>, <class 'StopIteration'>)¶
- mol_weight_precision = 0.01¶
- rmsd_precision = 0.0001¶
- __init__(output: Optional[str] = None, partial_ok: bool = False, timing_thresh: Optional[Dict[str, float]] = None)¶
Initialize from an output filename or output name.
- Parameters
output – 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 – 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.
timing_thresh – Precision thresholds for comparing timings of specified routines.
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.
- property restart: str¶
Return the restart name for this output object.
- property duration: Optional[datetime.timedelta]¶
Return the duration of the job as a datetime.timedelta object.
- property scan_step¶
Return a list of final scan geometries for each scan step.
- property irc_step¶
Return a list of final IRC geometries for each IRC step.
- diff(other, factor: float = 1.0, short_circuit: bool = 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 path_structures: List[schrodinger.structure._structure.Structure]¶
List of structures along path for IRC or RSM jobs, empty list otherwise
- getStructures() List[schrodinger.structure._structure.Structure] ¶
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.
- attach_atom_dict_to_structures(structures: List[schrodinger.structure._structure.Structure])¶
Takes a list of structures and labels them with atomic properties that have previously been parsed from the output into the atomicsec_dict
A handler function is defined to attach an entry into the atomic section onto the relevant atom property, casting from string to the required data type. This should be expanded as needed to carry further properties through.
This assumes the structure atom names correspond to the input &atom section, raises JaguarRuntimeError otherwise.
NOTE: The atomic properties will be attached to every atom in every structure that matches the name pattern in the &atomic section table(s)
- Parameters
structures – List of structure objects to which atomic section properties should be attached.
- getStructure() schrodinger.structure._structure.Structure ¶
Return a structure object for the last geometry in the file.
- write(filename: Optional[str] = None, mimic_backend: bool = False, add_title: bool = False, add_entry: bool = 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).
- Parameters
filename – The filename to write to; if not specified, defaults to the restart name with the ‘.mae’ suffix.
mimic_backend – 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 – If
mimic_backend
, then an empty title will be replaced with the output file’s jobname.add_entry – If
mimic_backend
, then an empty entry name will be replaced with the output file’s jobname.
- writeGrd(filename: str)¶
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.