rmgpy.qm.molecule

class rmgpy.qm.molecule.Geometry(settings, uniqueID, molecule, uniqueIDlong=None)

A geometry, used for quantum calculations.

Created from a molecule. Geometry estimated by RDKit.

The attributes are:

Attribute Type Description
settings QMSettings Settings for QM calculations
uniqueID str A short ID such as an augmented InChI Key
molecule Molecule RMG Molecule object
uniqueIDlong str A long, truly unique ID such as an augmented InChI
generateRDKitGeometries()

Use RDKit to guess geometry.

Save mol files of both crude and refined. Saves coordinates on atoms.

getCrudeMolFilePath()

Returns the path of the crude mol file.

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.

getRefinedMolFilePath()

Returns the path the the refined mol file.

rd_build()

Import rmg molecule and create rdkit molecule with the same atom labeling.

rd_embed(rdmol, numConfAttempts)

Embed the RDKit molecule and create the crude molecule file.

saveCoordinatesFromQMData(qmdata)

Save geometry info from QMData (eg CCLibData)

uniqueID = None

A short unique ID such as an augmented InChI Key.

uniqueIDlong = None

Long, truly unique, ID, such as the augmented InChI.

class rmgpy.qm.molecule.QMMolecule(molecule, settings)

A base class for QM Molecule calculations.

Specific programs and methods should inherit from this and define some extra attributes and methods:

  • outputFileExtension
  • inputFileExtension
  • generateQMData() ...and whatever else is needed to make this method work.

The attributes are:

Attribute Type Description
molecule Molecule RMG Molecule object
settings QMSettings Settings for QM calculations
uniqueID str A short ID such as an augmented InChI Key
uniqueIDlong str A long, truly unique ID such as an augmented InChI
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 somehow and return a CCLibData object, or None if it fails.

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.

getThermoFilePath()

Returns the path the thermo data file.

initialize()

Do any startup tasks.

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