molecule
pDynamo

Geometry Optimization

The energy and properties of a single molecular geometry of a system are of limited interest, especially as the size of the system increases. In consequence, a wide range of techniques has been developed to explore the conformations that are accessible to a system. Some of the most basic of these are local geometry optimization algorithms that aim to locate structures of low potential energy. pDynamo has a number of geometry optimization methods, one of which — a conjugate gradient algorithm — is illustrated in the program Example10.py:

        # . Define the molecule and its QC model.
        molecule = XYZFile_ToSystem ( os.path.join ( xyzpath, "bala_c7eq.xyz" ) )
        molecule.DefineQCModel ( QCModelMNDO ( "am1" ) )
        molecule.Summary ( )

        # . Save a copy of the starting coordinates.
        coordinates3 = Clone ( molecule.coordinates3 )

        # . Determine the starting energy.
        estart = molecule.Energy ( )

        # . Optimization.
        ConjugateGradientMinimize_SystemGeometry ( molecule,                    \
                                                   logFrequency         =  100, \
                                                   maximumIterations    = 2000, \
                                                   rmsGradientTolerance =  0.1 )

        # . Determine the final energy.
        estop = molecule.Energy ( )

        # . Determine the RMS coordinate deviation between the optimized and unoptimized structures.
        masses = molecule.atoms.GetItemAttributes ( "mass" )
        coordinates3.Superimpose ( molecule.coordinates3, weights = masses )
        rms = coordinates3.RMSDeviation ( molecule.coordinates3, weights = masses )

        # . Print the results.
        table = logfile.GetTable ( columns = [ 30, 30 ] )
        table.Start ( )
        table.Title ( "Minimization Results" )
        table.Entry ( "Energy Change",            alignment = "l" )
        table.Entry ( "%20.4f" % ( estop - estart, ) )
        table.Entry ( "RMS Coordinate Deviation", alignment = "l" )
        table.Entry ( "%20.4f" % ( rms, ) )
        table.Stop ( )
        

The program employs a semi-empirical QC method to geometry optimize a conformation of the bALA molecule. After the optimization, the difference in energy between the starting, unoptimized and final, optimized structures is printed along with their RMS coordinate deviation.

Exercises

Valid XHTML 1.0 Strict
Last modification time (GMT): Tue Jul 13 14:29:11 2010
Copyright © 2007–2010 Martin J. Field