Getting Started‎ > ‎

QC Calculations

Quantum Chemical Calculations

pDynamo incorporates both ab initio density functional theory (DFT) and semi-empirical QC methods. The usage of both types of method is similar and they can be employed interchangeably. Example5.py is a program that calculates the potential energy, atomic charges and dipole moment for a molecule with different semi-empirical QC methods. It is:

 
# . Define the energy models. energyModels = [ QCModelMNDO ( "am1" ), QCModelMNDO ( "mndo" ), QCModelMNDO ( "pm3" ) ] # . Get the file name. fileName = os.path.join ( xyzPath, "water.xyz" ) # . Loop over the energy models. results = [] for model in energyModels: molecule = XYZFile_ToSystem ( fileName ) molecule.DefineQCModel ( model ) molecule.Summary ( ) energy = molecule.Energy ( ) charges = molecule.AtomicCharges ( ) dipole = molecule.DipoleMoment ( ) results.append ( ( model.label, energy, charges, dipole.Norm2 ( ) ) ) # . Output the results. table = logFile.GetTable ( columns = [ 10, 20, 20, 20, 20, 20 ] ) table.Start ( ) table.Title ( "Energy Model Results for Water" ) table.Heading ( "Model" ) table.Heading ( "Energy" ) table.Heading ( "Charges", columnSpan = 3 ) table.Heading ( "Dipole" ) for ( label, energy, charges, dipole ) in results: table.Entry ( label ) table.Entry ( "%.1f" % ( energy, ) ) for charge in charges: table.Entry ( "%.3f" % ( charge, ) ) table.Entry ( "%.3f" % ( dipole, ) ) table.Stop ( )

The program starts by defining the list of different QC models to use and then loops over them, repeating an identical set of calculations on a water molecule for each model. It is important to note that the QC model is assigned to the system, via the method DefineQCModel of the System class, before determination of the energy and other properties occurs. The program terminates by printing out a table containing the calculated results.

Exercises

  1. Modify the example program to use DFT methods in addition to the semi-empirical ones. See the DFT QC Models tutorial for full details of how to do this. How much longer do DFT calculations take to run compared to semi-empirical ones?
  2. Carry out calculations for different charge and multiplicity states of a molecular system. How reliable are the calculations?
  3. Compute the dissociation curve for a system (e.g. dihydrogen or ethane) as a function of a bond length. How do the results of spin-restricted and spin-unrestricted calculations compare?