rmgpy.qm.gaussian

class rmgpy.qm.gaussian.Gaussian

A base class for all QM calculations that use Gaussian.

Classes such as GaussianMol will inherit from this class.

failureKeys = ['ERROR TERMINATION', 'IMAGINARY FREQUENCIES']

List of phrases that indicate failure NONE of these must be present in a succesful job.

parse()

Parses the results of the Gaussian calculation, and returns a QMData object.

successKeys = ['Normal termination of Gaussian']

List of phrases to indicate success. ALL of these must be present in a successful job.

verifyOutputFile()

Check’s that an output file exists and was successful.

Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the molecule with the given (augmented) InChI Key.

The definition of finding a successful simulation is based on these criteria: 1) finding an output file with the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry, when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)

If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.

class rmgpy.qm.gaussian.GaussianMol(molecule, settings)

A base Class for calculations of molecules using Gaussian.

Inherits from both QMMolecule and Gaussian.

calculateChiralityCorrection()

Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.

calculateThermoData()

Calculate the thermodynamic properties.

Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be generated before this method is called.

checkPaths()

Check the paths in the settings are OK. Make folders as necessary.

checkReady()

Check that it’s ready to run calculations.

createGeometry()

Creates self.geometry with RDKit geometries

determinePointGroup()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.pointGroup

generateQMData()

Calculate the QM data and return a QMData object.

generateThermoData()

Generate Thermo Data via a QM calc.

Returns None if it fails.

getFilePath(extension, scratch=True)

Returns the path to the file with the given extension.

The provided extension should include the leading dot. If called with scratch=False then it will be in the fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.

getInChiKeyAug()

Returns the augmented InChI from self.molecule

getMolFilePathForCalculation(attempt)

Get the path to the MOL file of the geometry to use for calculation attempt.

If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coordinates.

getParser(outputFile)

Returns the appropriate cclib parser.

getThermoFilePath()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

inputFileKeywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

inputFilePath

Get the input file name.

loadThermoData()

Try loading a thermo data from a previous run.

maxAttempts

The total number of attempts to try

outputFilePath

Get the output file name.

parse()

Parses the results of the Mopac calculation, and returns a QMData object.

saveThermoData()

Save the generated thermo data.

scriptAttempts

The number of attempts with different script keywords

verifyOutputFile()

Check’s that an output file exists and was successful.

Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the molecule with the given (augmented) InChI Key.

The definition of finding a successful simulation is based on these criteria: 1) finding an output file with the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry, when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)

If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.

writeInputFile(attempt)

Using the Geometry object, write the input file for the attempt.

class rmgpy.qm.gaussian.GaussianMolPM3(molecule, settings)

Gaussian PM3 calculations for molecules

This is a class of its own in case you wish to do anything differently, but for now it’s only the ‘pm3’ in the keywords that differs.

calculateChiralityCorrection()

Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.

calculateThermoData()

Calculate the thermodynamic properties.

Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be generated before this method is called.

checkPaths()

Check the paths in the settings are OK. Make folders as necessary.

checkReady()

Check that it’s ready to run calculations.

createGeometry()

Creates self.geometry with RDKit geometries

determinePointGroup()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.pointGroup

generateQMData()

Calculate the QM data and return a QMData object.

generateThermoData()

Generate Thermo Data via a QM calc.

Returns None if it fails.

getFilePath(extension, scratch=True)

Returns the path to the file with the given extension.

The provided extension should include the leading dot. If called with scratch=False then it will be in the fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.

getInChiKeyAug()

Returns the augmented InChI from self.molecule

getMolFilePathForCalculation(attempt)

Get the path to the MOL file of the geometry to use for calculation attempt.

If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coordinates.

getParser(outputFile)

Returns the appropriate cclib parser.

getThermoFilePath()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

inputFileKeywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

inputFilePath

Get the input file name.

keywords = ['# pm3 opt=(verytight,gdiis) freq IOP(2/16=3)', '# pm3 opt=(verytight,gdiis) freq IOP(2/16=3) IOP(4/21=2)', '# pm3 opt=(verytight,calcfc,maxcyc=200) freq IOP(2/16=3) nosymm', '# pm3 opt=(verytight,calcfc,maxcyc=200) freq=numerical IOP(2/16=3) nosymm', '# pm3 opt=(verytight,gdiis,small) freq IOP(2/16=3)', '# pm3 opt=(verytight,nolinear,calcfc,small) freq IOP(2/16=3)', '# pm3 opt=(verytight,gdiis,maxcyc=200) freq=numerical IOP(2/16=3)', '# pm3 opt=tight freq IOP(2/16=3)', '# pm3 opt=tight freq=numerical IOP(2/16=3)', '# pm3 opt=(tight,nolinear,calcfc,small,maxcyc=200) freq IOP(2/16=3)', '# pm3 opt freq IOP(2/16=3)', '# pm3 opt=(verytight,gdiis) freq=numerical IOP(2/16=3) IOP(4/21=200)', '# pm3 opt=(calcfc,verytight,newton,notrustupdate,small,maxcyc=100,maxstep=100) freq=(numerical,step=10) IOP(2/16=3) nosymm', '# pm3 opt=(tight,gdiis,small,maxcyc=200,maxstep=100) freq=numerical IOP(2/16=3) nosymm', '# pm3 opt=(verytight,gdiis,calcall) IOP(2/16=3)', '# pm3 opt=(verytight,gdiis,calcall,small,maxcyc=200) IOP(2/16=3) IOP(4/21=2) nosymm', '# pm3 opt=(verytight,gdiis,calcall,small) IOP(2/16=3) nosymm', '# pm3 opt=(calcall,small,maxcyc=100) IOP(2/16=3)']

Keywords that will be added at the top of the qm input file

loadThermoData()

Try loading a thermo data from a previous run.

maxAttempts

The total number of attempts to try

outputFilePath

Get the output file name.

parse()

Parses the results of the Mopac calculation, and returns a QMData object.

saveThermoData()

Save the generated thermo data.

scriptAttempts

The number of attempts with different script keywords

verifyOutputFile()

Check’s that an output file exists and was successful.

Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the molecule with the given (augmented) InChI Key.

The definition of finding a successful simulation is based on these criteria: 1) finding an output file with the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry, when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)

If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.

writeInputFile(attempt)

Using the Geometry object, write the input file for the attempt.

class rmgpy.qm.gaussian.GaussianMolPM6(molecule, settings)

Gaussian PM6 calculations for molecules

This is a class of its own in case you wish to do anything differently, but for now it’s only the ‘pm6’ in the keywords that differs.

calculateChiralityCorrection()

Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.

calculateThermoData()

Calculate the thermodynamic properties.

Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be generated before this method is called.

checkPaths()

Check the paths in the settings are OK. Make folders as necessary.

checkReady()

Check that it’s ready to run calculations.

createGeometry()

Creates self.geometry with RDKit geometries

determinePointGroup()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.pointGroup

generateQMData()

Calculate the QM data and return a QMData object.

generateThermoData()

Generate Thermo Data via a QM calc.

Returns None if it fails.

getFilePath(extension, scratch=True)

Returns the path to the file with the given extension.

The provided extension should include the leading dot. If called with scratch=False then it will be in the fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.

getInChiKeyAug()

Returns the augmented InChI from self.molecule

getMolFilePathForCalculation(attempt)

Get the path to the MOL file of the geometry to use for calculation attempt.

If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coordinates.

getParser(outputFile)

Returns the appropriate cclib parser.

getThermoFilePath()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

inputFileKeywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

inputFilePath

Get the input file name.

keywords = ['# pm6 opt=(verytight,gdiis) freq IOP(2/16=3)', '# pm6 opt=(verytight,gdiis) freq IOP(2/16=3) IOP(4/21=2)', '# pm6 opt=(verytight,calcfc,maxcyc=200) freq IOP(2/16=3) nosymm', '# pm6 opt=(verytight,calcfc,maxcyc=200) freq=numerical IOP(2/16=3) nosymm', '# pm6 opt=(verytight,gdiis,small) freq IOP(2/16=3)', '# pm6 opt=(verytight,nolinear,calcfc,small) freq IOP(2/16=3)', '# pm6 opt=(verytight,gdiis,maxcyc=200) freq=numerical IOP(2/16=3)', '# pm6 opt=tight freq IOP(2/16=3)', '# pm6 opt=tight freq=numerical IOP(2/16=3)', '# pm6 opt=(tight,nolinear,calcfc,small,maxcyc=200) freq IOP(2/16=3)', '# pm6 opt freq IOP(2/16=3)', '# pm6 opt=(verytight,gdiis) freq=numerical IOP(2/16=3) IOP(4/21=200)', '# pm6 opt=(calcfc,verytight,newton,notrustupdate,small,maxcyc=100,maxstep=100) freq=(numerical,step=10) IOP(2/16=3) nosymm', '# pm6 opt=(tight,gdiis,small,maxcyc=200,maxstep=100) freq=numerical IOP(2/16=3) nosymm', '# pm6 opt=(verytight,gdiis,calcall) IOP(2/16=3)', '# pm6 opt=(verytight,gdiis,calcall,small,maxcyc=200) IOP(2/16=3) IOP(4/21=2) nosymm', '# pm6 opt=(verytight,gdiis,calcall,small) IOP(2/16=3) nosymm', '# pm6 opt=(calcall,small,maxcyc=100) IOP(2/16=3)']

Keywords that will be added at the top of the qm input file

loadThermoData()

Try loading a thermo data from a previous run.

maxAttempts

The total number of attempts to try

outputFilePath

Get the output file name.

parse()

Parses the results of the Mopac calculation, and returns a QMData object.

saveThermoData()

Save the generated thermo data.

scriptAttempts

The number of attempts with different script keywords

verifyOutputFile()

Check’s that an output file exists and was successful.

Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the molecule with the given (augmented) InChI Key.

The definition of finding a successful simulation is based on these criteria: 1) finding an output file with the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry, when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)

If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.

writeInputFile(attempt)

Using the Geometry object, write the input file for the attempt.