linkjobparsers¶
One of the two core modules of pyssian. This module contains the classes and parsers for the outputs of the different types of links. Only the classes registered with the appropiate decorator are considered for parsing.
LinkJob¶
-
class
pyssian.linkjobparsers.
LinkJob
(text, number=None, asEmpty=False)[source]¶ LinkJob Base class. Represents the output of a lxxxx.exe.
- Parameters
text (list) -- text that corresponds to the output of the lxxxx.exe
number (int) -- Integrer that represents the type of the LinkJob (the default is None).
-
Register
¶ A dict where key corresponds to an int, and value corresponds to the registered subclass class through @RegisterLinkJob
- Type
dict
-
number
¶
-
text
¶
-
pyssian.linkjobparsers.
RegisterLinkJob
(cls)[source]¶ Decorator for the LinkJob subclasses, adds the class to the LinkJob.Register dictionary with the _token as key.
- Parameters
cls (LinkJob) -- LinkJob subclass identified with the cls._token attribute. Which is normally an integrer between 1 and 9999.
GeneralLinkJob¶
-
class
pyssian.linkjobparsers.
GeneralLinkJob
(text, number=None, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Subclass of Linkjob to store the information of any Link that does not have a specific parser.
- Parameters
text (str) -- text that corresponds to the output of the lxxxx.exe
number (int) -- Integrer that represents the type of the LinkJob. (defaults to None)
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
number
¶
-
text
¶
Link1¶
-
class
pyssian.linkjobparsers.
Link1
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l1.exe,it also holds information about the InternalJob setup.
- Parameters
text (str) -- text that corresponds to the output of the l1.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
info
¶ tuple that contains information needed to instantiate an InternalJob.
- Type
namedtuple
-
commandline
¶ contains the information of the gaussian commands (defaults to an empty string).
- Type
str
-
nprocs
¶ contains the number of the %nprocshared link0 option
- Type
int
-
mem
¶ contains the right hand side of the %mem link0 option
- Type
str
-
link0
¶ list of lines containing the link0 specifications.
- Type
list
-
IOps
¶ list of lines containing the IOps that appear below the command line
- Type
list
-
text
¶
-
number
¶
-
_guess_type
()[source]¶ Guesses the type of Job depending on the keywords in the self.commandline.
- Returns
{Constrained Optimization, Optimization, Frequency Calculation, Unidentified}
- Return type
str
-
_locate_IOps
()[source]¶ Uses regex expressions compiled as class attributes to search IOps (see Gaussian Manual). (Fails Silently).
Populates the attributes:
IOps
-
_locate_commandline
()[source]¶ Uses regex expressions compiled as class attributes to search the gaussian commands, which start with a "#". (Fails Silently).
Populates the attributes:
commandline
Link101¶
-
class
pyssian.linkjobparsers.
Link101
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l101.exe
- Parameters
text (str) -- text that corresponds to the output of the l101.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults is False)
-
charge
¶ - Type
int
-
spin
¶ - Type
int
Link103¶
-
class
pyssian.linkjobparsers.
Link103
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l103.exe. Corresponds to a single step of a Berny optimization.
- Parameters
text (str) -- text that corresponds to the output of the l103.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
mode
¶ 'Init', 'Iteration' or 'End'
- Type
str
-
state
¶ Either 'Optimized', 'Non-optimized' or 'Initial'
- Type
str
-
conversion
¶ List of namedtuples with fields Item,Value,Threshold,Converged.
- Type
list
-
parameters
¶ List of namedtuples with fields Name,Definition,Value,Derivative.
- Type
list
-
derivatives
¶ List of namedtuples with fields Var,old,dEdX,dXl,dXq,dXt,new.
- Type
list
-
stepnumber
¶
-
scanpoint
¶
-
text
¶
-
number
¶
-
_locate_convergence
()[source]¶ Uses regex expressions compiled as class attributes to find the convergence parameters. (Fails Silently).
Populates the attributes:
conversion
-
_locate_mode
()[source]¶ Uses regex expressions compiled as class attributes to find If the Link corresponds to an (Init)ialization pass, (Iteration) or (End) converged or not.
Populates the attributes:
mode (Iteration)
-
_locate_numbers
()[source]¶ Uses regex expressions compiled as class attributes to find the current step number (of an optimization) and scan number (of an scan calculation). (Fails Silently).
Populates the attributes:
stepnumber
scanpoint
Link123¶
-
class
pyssian.linkjobparsers.
Link123
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l123.exe. Corresponds to irc predictor-corrector steps and may hold the orientation (Geometry) at a given step.
- Parameters
text (str) -- text that corresponds to the output of the l202.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
orientation
¶ List of namedtuples containing the geometry of the calculated compound.
- Type
list
-
step
¶ step number of along the irc calculation.
- Type
int
-
direction
¶ FORWARD or REVERSE
- Type
str
-
reactioncoord
¶ Value of the reaction coordinate at the current step.
- Type
float
-
text
¶
-
number
¶
-
_locate_irc_step
()[source]¶ Uses regex expressions compiled as class attributes to find the current step info of the irc path. (Fails Silently).
Populates the attributes:
reactioncoord
step
direction
Link202¶
-
class
pyssian.linkjobparsers.
Link202
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l202.exe. Holds the orientation (Geometry) at a given step.
- Parameters
text (str) -- text that corresponds to the output of the l202.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
orientation
¶ List of namedtuples containing the geometry of the calculated compound.
- Type
list
-
DistanceMatrix
¶ For each item the postitions 0 and 1 correspond to the Atom ID in the structure and the Atomic Number/Symbol respectively. Position 1 holds a list with the distances with respect to all previous items.
- Type
list
-
text
¶
-
number
¶
-
_locate_DistanceMatrix
()[source]¶ Looks for the keyword 'Distance matrix' and reads the Input orientation table that follows (Fails Silently).
Populates the attributes:
DistanceMatrix
-
_locate_orientation
()[source]¶ Uses regex expressions compiled as class attributes to find the geometry of the molecule. (Fails Silently).
Populates the attributes:
orientation
Link502¶
-
class
pyssian.linkjobparsers.
Link502
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l502.exe. Corresponds to a iterative calculation of the SCF cycles.
- Parameters
text (str) -- text that corresponds to the output of the l502.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
energy
¶ Final Potential Energy of the SCF cycles.
- Type
float
Link508¶
-
class
pyssian.linkjobparsers.
Link508
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.Link502
Representation and parser for the output of l508.exe. Corresponds to a iterative calculation of the SCF using a quadratic convergence algorithm.
- Parameters
text (str) -- text that corresponds to the output of the l508.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
energy
¶ Final Potential Energy of the SCF cycles.
- Type
float
Link601¶
-
class
pyssian.linkjobparsers.
Link601
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l601.exe, each does a population analysis using SCF densities. Holds information about Mulliken Charges, {Dipole, Quadrupole, Traceless Quadrupole, Octapole and Hexadecapole} moments, spin densities... etc. (Currently only Mulliken Charges implemented)
- Parameters
text (str) -- text that corresponds to the output of the l508.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
mulliken_heavy
¶ list of mulliken charges condensed to H atoms. None if not properly parsed.
- Type
list
-
mulliken
¶ list of mulliken charges. None if not properly parsed.
- Type
list
Link716¶
-
class
pyssian.linkjobparsers.
Link716
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l716.exe. Displays information about Forces and Frequency Calculations.
- Parameters
text (str) -- text that corresponds to the output of the l716.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
dipole
¶ - Type
list
-
units
¶ - Type
list
-
zeropoint
¶ - Type
list
-
thermal_energy
¶ - Type
list
-
enthalpy
¶ - Type
list
-
gibbs
¶ - Type
list
-
EContribs
¶ List of namedtuples with fields Name,Thermal,CV,S .
- Type
list
-
IRSpectrum
¶ Text that corresponds to the IRSpectrum
- Type
str
-
mode
¶ Either 'Forces', 'Freq' or 'Other'.
- Type
str
-
_locate_IRSpectrum
()[source]¶ Uses regex expressions compiled as class attributes to find the IR spectrum. (Fails Silently).
Populates the attributes:
IRSpectrum
-
_locate_dipole
()[source]¶ Uses regex expressions compiled as class attributes to find the Dipole Vector. (Fails Silently).
Populates the attributes:
dipole
Link804¶
-
class
pyssian.linkjobparsers.
Link804
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l804.exe. Holds the information about the MP2 energy calculation
- Parameters
text (str) -- text that corresponds to the output of the l804.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
MP2
¶ Potential energy with MP2 method
- Type
float
-
SpinComponents
¶ List of namedtuples with the fields Name, T, E.
- Type
list
Link913¶
-
class
pyssian.linkjobparsers.
Link913
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l913.exe. Holds information about CCSD(T) calculations including MP4 Energy.
- Parameters
text (str) -- text that corresponds to the output of the l913.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
MP4
¶ MP4 potential energy
- Type
float
-
CCSDT
¶ CCSD(T) potential energy
- Type
float
Link914¶
-
class
pyssian.linkjobparsers.
Link914
(text, asEmpty=False)[source]¶ Bases:
pyssian.linkjobparsers.LinkJob
Representation and parser for the output of l914.exe. Holds information about TDDFT calculations excited states.
- Parameters
text (str) -- text that corresponds to the output of the l913.exe
asEmpty (bool) -- Flag to not parse and store the information of the text. (defaults to False)
-
excitedstates
¶ list of excited states
- Type
list
-
_extract_transitions
(text)[source]¶ Given the slice of output text that corresponds to the transition contributions of a ExcitedState, returns each contribution as a TransitionData object.
- Parameters
text (str) -- The slice of text that corresponds to the transition contributions of an ExcitedState.
- Returns
list of TransitionData instances.
- Return type
transitions
-
_locate_ExcitedStates
()[source]¶ Does the logic of finding and slicing the text of the link into the different excited states (Fails Silently).
Populates the attributes:
excitedstates
-
print_excitedstates
(*ESnumbers, show_transitions=False)[source]¶ Prints in the console the parameters in of the excited states selected in ascending ordinal order.
- Parameters
*ESnumbers (int) -- An undefined number of integrers. Only the excited states that are within the provided set will be displayed.
show_transitions (bool, optional) -- Allows control over the display of the transitions, by default False