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.

failure_keys = ['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.

success_keys = ['Normal termination of Gaussian']

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

verify_output_file()

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.

calculate_chirality_correction()

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

calculate_thermo_data()

Calculate the thermodynamic properties.

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

check_paths()

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

check_ready()

Check that it’s ready to run calculations.

create_geometry()

Creates self.geometry with RDKit geometries

determine_point_group()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.point_group

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

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

generate_qm_data()

Calculate the QM data and return a QMData object.

generate_thermo_data()

Generate Thermo Data via a QM calc.

Returns None if it fails.

get_augmented_inchi_key(backend='rdkit-first')

Returns the augmented InChI from self.molecule

get_file_path(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.

get_mol_file_path_for_calculation(attempt)

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

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

get_parser(output_file)

Returns the appropriate cclib parser.

get_thermo_file_path()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

input_file_keywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

property input_file_path

Get the input file name.

load_thermo_data()

Try loading a thermo data from a previous run.

property max_attempts

The total number of attempts to try

property output_file_path

Get the output file name.

parse()

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

save_thermo_data()

Save the generated thermo data.

property script_attempts

The number of attempts with different script keywords

success_keys = ['Normal termination of Gaussian']

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

verify_output_file()

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.

write_input_file(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.

calculate_chirality_correction()

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

calculate_thermo_data()

Calculate the thermodynamic properties.

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

check_paths()

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

check_ready()

Check that it’s ready to run calculations.

create_geometry()

Creates self.geometry with RDKit geometries

determine_point_group()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.point_group

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

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

generate_qm_data()

Calculate the QM data and return a QMData object.

generate_thermo_data()

Generate Thermo Data via a QM calc.

Returns None if it fails.

get_augmented_inchi_key(backend='rdkit-first')

Returns the augmented InChI from self.molecule

get_file_path(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.

get_mol_file_path_for_calculation(attempt)

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

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

get_parser(output_file)

Returns the appropriate cclib parser.

get_thermo_file_path()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

input_file_keywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

property input_file_path

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

load_thermo_data()

Try loading a thermo data from a previous run.

property max_attempts

The total number of attempts to try

property output_file_path

Get the output file name.

parse()

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

save_thermo_data()

Save the generated thermo data.

property script_attempts

The number of attempts with different script keywords

success_keys = ['Normal termination of Gaussian']

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

verify_output_file()

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.

write_input_file(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.

calculate_chirality_correction()

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

calculate_thermo_data()

Calculate the thermodynamic properties.

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

check_paths()

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

check_ready()

Check that it’s ready to run calculations.

create_geometry()

Creates self.geometry with RDKit geometries

determine_point_group()

Determine point group using the SYMMETRY Program

Stores the resulting PointGroup in self.point_group

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

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

generate_qm_data()

Calculate the QM data and return a QMData object.

generate_thermo_data()

Generate Thermo Data via a QM calc.

Returns None if it fails.

get_augmented_inchi_key(backend='rdkit-first')

Returns the augmented InChI from self.molecule

get_file_path(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.

get_mol_file_path_for_calculation(attempt)

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

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

get_parser(output_file)

Returns the appropriate cclib parser.

get_thermo_file_path()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

input_file_keywords(attempt)

Return the top keywords for attempt number attempt.

NB. attempt begins at 1, not 0.

property input_file_path

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

load_thermo_data()

Try loading a thermo data from a previous run.

property max_attempts

The total number of attempts to try

property output_file_path

Get the output file name.

parse()

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

save_thermo_data()

Save the generated thermo data.

property script_attempts

The number of attempts with different script keywords

success_keys = ['Normal termination of Gaussian']

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

verify_output_file()

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.

write_input_file(attempt)

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