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, files)

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.restart_name(name)

Generate a restart name from a job name. If there is no number suffix for the job this will be jobname.01; otherwise the suffix will be incremented.

class schrodinger.application.jaguar.output.JaguarOutput(output=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
host (string)
the job host
mae_out (string)
Maestro output file
mae_in (string)
Maestro input file
status (int)
job status, set to one of the class variables UNKNOWN, OK, or SPLAT
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 executable
start_time (datetime.datetime)
the starting time of the calculation
end_time (datetime.datetime)
the ending time of the calculation
sm_geopt_step (list of lists of JaguarResults)
results for individual IRC geopt steps (see note below)
sm_n_steps (list of lists of JaguarResults)
results for individual IRC geopt steps (see note below)
geopt_step (list of JaguarResults)
results for each step in a geopt
gas_phase_geopt_step (list of JaguarResults)
results for the gas phase geometry optimization in a solvated geopt
solution_phase_geopt_step (list of JaguarResults)
results for the solution phase geometry optimization in a solvated geopt
scan_geopt_step (list of lists of JaguarResults)
results for individual scan geopt steps (see note below)
irc_geopt_step (list of lists of JaguarResults)
results for individual IRC geopt steps (see note below)
input_geometry (schrodinger.structure.Structure)
the input geometry, unmodified by symmetrization
input_geometry2 (schrodinger.structure.Structure)
the input geometry from zmat2, unmodified by symmetrization
input_geometry3 (schrodinger.structure.Structure)
the input geometry from zmat3, unmodified by symmetrization
symmetrized (bool)
whether the geometry has been symmetrized or not
geopt_stuck (bool)
whether the geopt or tsopt got stuck
convergence_category (list of JaguarResults)
results for the convergence category

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
basis (string)
basis set
canonical_orbitals (int)
number of canonical orbitals
charge (int)
total molecular charge
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
method (string)
calculation type
mol_weight (float, amu)
molecular weight
multiplicity (int)
total spin multiplicity
nbasis (int)
number of basis functions
path_structures (list of Structure instances)
path structures for IRC/RSM jobs
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 (dictionary of Scan objects)
scan coordinates
stoichiometry (string)
stoichiometry
ts_component_descriptions (string)
descriptions of the transition state vector components
UNKNOWN = 0
OK = 1
SPLAT = 2
mol_weight_precision = 0.01
rmsd_precision = 0.0001
__init__(output=None)

Initialize from an output filename or output name.

Exceptions:

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.
__del__()
__getattr__(attr)

Fall back to the last_results object for attribute access.

If an attribute isn’t present, try getting it from the last_results attribute.

buildDerivedAttributes()
restart

Return the restart name for this output object.

getDuration()
duration

Return the duration of the job as a datetime.timedelta object.

getScanStep()
scan_step

Return a list of final scan geometries for each scan step.

getIrcStep()
irc_step

Return a list of final IRC geometries for each IRC step.

__eq__(other)

Return self==value.

__ne__(other)

Return self!=value.

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.
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.jaguar.output', '__doc__': 'A class for accessing Jaguar output properties.\n\nStores a JaguarResults object for each geometry (multiple geometry\noptimization steps in the geopt_step list, multiple scan steps in the\nscan_step list). Each JaguarResults object holds all properties\nspecific to a given geometry. (See the JaguarResults documentation\nfor more detail.) Each JaguarResults object also holds a list of\nJaguarAtomicResults objects for atomic specific properties.\n\nGeneral Attributes\n\njob_id (string)\n job ID\n\nopts (JaguarOptions)\n job calculation options\n\nhost (string)\n the job host\n\nmae_out (string)\n Maestro output file\n\nmae_in (string)\n Maestro input file\n\nstatus (int)\n job status, set to one of the class variables UNKNOWN, OK, or\n SPLAT\n\nfatal_error (string)\n error message in the event the job failed\n\nfatal_errorno (string)\n error number in the event the job failed\n\nglibc (string)\n reported glibc version\n\nlastexe (string)\n last executable\n\nstart_time (datetime.datetime)\n the starting time of the calculation\n\nend_time (datetime.datetime)\n the ending time of the calculation\n\nsm_geopt_step (list of lists of JaguarResults)\n results for individual IRC geopt steps (see note below)\n\nsm_n_steps (list of lists of JaguarResults)\n results for individual IRC geopt steps (see note below)\n\ngeopt_step (list of JaguarResults)\n results for each step in a geopt\n\ngas_phase_geopt_step (list of JaguarResults)\n results for the gas phase geometry optimization in a solvated\n geopt\n\nsolution_phase_geopt_step (list of JaguarResults)\n results for the solution phase geometry optimization in a solvated\n geopt\n\nscan_geopt_step (list of lists of JaguarResults)\n results for individual scan geopt steps (see note below)\n\nirc_geopt_step (list of lists of JaguarResults)\n results for individual IRC geopt steps (see note below)\n\ninput_geometry (schrodinger.structure.Structure)\n the input geometry, unmodified by symmetrization\n\ninput_geometry2 (schrodinger.structure.Structure)\n the input geometry from zmat2, unmodified by symmetrization\n\ninput_geometry3 (schrodinger.structure.Structure)\n the input geometry from zmat3, unmodified by symmetrization\n\nsymmetrized (bool)\n whether the geometry has been symmetrized or not\n\ngeopt_stuck (bool)\n whether the geopt or tsopt got stuck\n\nconvergence_category (list of JaguarResults)\n results for the convergence category\n\nThe scan_geopt_step and irc_geopt_step attributes are both lists of\nlists of JaguarResults. Each element of the list represents the geopt\nsteps taken within an individual scan or IRC step. In the case where\ngeometry optimization is not done with the scan or IRC calculation,\neach element is a list with a single JaguarResults element.\n\nThe properties scan_step and irc_step are probably more useful.\nThey provide a list of the final geometries for each scan/IRC\nstep.\n\nProperty Attributes\n\n_sm_n_points (int)\n number of string method points\n\nbasis (string)\n basis set\n\ncanonical_orbitals (int)\n number of canonical orbitals\n\ncharge (int)\n total molecular charge\n\ncoords_frozen (int)\n number of frozen coordinates\n\ncoords_harmonic (int)\n number of harmonic constraints\n\ncoords_ind (int)\n number of independent coordinates\n\ncoords_nred (int)\n number of non-redundant coordinates\n\ncoords_opt (int)\n number of optimization coordinates\n\nfunctional (string)\n DFT functional\n\nmethod (string)\n calculation type\n\nmol_weight (float, amu)\n molecular weight\n\nmultiplicity (int)\n total spin multiplicity\n\nnbasis (int)\n number of basis functions\n\npath_structures (list of Structure instances)\n path structures for IRC/RSM jobs\n\npoint_group (string)\n molecular point group of the input molecule\n\npoint_group_used (string)\n point group used in the calculation\n\nqm_atoms (int)\n number of QM atoms\n\nscan_coords (dictionary of Scan objects)\n scan coordinates\n\nstoichiometry (string)\n stoichiometry\n\nts_component_descriptions (string)\n descriptions of the transition state vector components\n', 'UNKNOWN': 0, 'OK': 1, 'SPLAT': 2, '_attributes': [<_Attribute: _sm_n_points>, <_Attribute: basis>, <_Attribute: canonical_orbitals>, <_Attribute: charge>, <_Attribute: coords_frozen>, <_Attribute: coords_harmonic>, <_Attribute: coords_ind>, <_Attribute: coords_nred>, <_Attribute: coords_opt>, <_Attribute: functional>, <_Attribute: method>, <_Attribute: mol_weight>, <_Attribute: multiplicity>, <_Attribute: nbasis>, <_Attribute: path_structures>, <_Attribute: point_group>, <_Attribute: point_group_used>, <_Attribute: qm_atoms>, <_Attribute: scan_coords>, <_Attribute: stoichiometry>, <_Attribute: ts_component_descriptions>, <_Attribute: job_id>, <_Attribute: opts>, <_Attribute: host>, <_Attribute: mae_out>, <_Attribute: mae_in>, <_Attribute: status>, <_Attribute: fatal_error>, <_Attribute: fatal_errorno>, <_Attribute: glibc>, <_Attribute: lastexe>, <_Attribute: start_time>, <_Attribute: end_time>, <_Attribute: sm_geopt_step>, <_Attribute: sm_n_steps>, <_Attribute: geopt_step>, <_Attribute: gas_phase_geopt_step>, <_Attribute: solution_phase_geopt_step>, <_Attribute: scan_geopt_step>, <_Attribute: irc_geopt_step>, <_Attribute: input_geometry>, <_Attribute: input_geometry2>, <_Attribute: input_geometry3>, <_Attribute: symmetrized>, <_Attribute: geopt_stuck>, <_Attribute: convergence_category>], 'mol_weight_precision': 0.01, 'rmsd_precision': 0.0001, '_text_parser_class': <class 'schrodinger.application.jaguar.textparser.TextParser'>, '__init__': <function JaguarOutput.__init__>, '__del__': <function JaguarOutput.__del__>, '__getattr__': <function JaguarOutput.__getattr__>, 'buildDerivedAttributes': <function JaguarOutput.buildDerivedAttributes>, '_getRestart': <function JaguarOutput._getRestart>, 'restart': <property object>, 'getDuration': <function JaguarOutput.getDuration>, 'duration': <property object>, 'getScanStep': <function JaguarOutput.getScanStep>, 'scan_step': <property object>, 'getIrcStep': <function JaguarOutput.getIrcStep>, 'irc_step': <property object>, '__eq__': <function JaguarOutput.__eq__>, '__ne__': <function JaguarOutput.__ne__>, 'diff': <function JaguarOutput.diff>, '_defaultStructureProperties': <function JaguarOutput._defaultStructureProperties>, 'path_structures': <property object>, 'getStructures': <function JaguarOutput.getStructures>, 'getStructure': <function JaguarOutput.getStructure>, 'write': <function JaguarOutput.write>, 'writeGrd': <function JaguarOutput.writeGrd>, '__dict__': <attribute '__dict__' of 'JaguarOutput' objects>, '__weakref__': <attribute '__weakref__' of 'JaguarOutput' objects>, '__hash__': None})
__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__ = None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.jaguar.output'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

path_structures

List of structures along path for IRC or RSM jobs, empty list otherwise

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.

getStructure()

Return a structure object for the last geometry in the file.

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.