CONFLEX Tutorials

Optimization and conformation search by using Gaussian program

Geometry optimization and conformation search performed by CONFLEX are normally executed using a classical molecular force field installed in CONFLEX itself. Although the calculation using the force field is useful for exploring the energy minima fast and efficiently, it is impossible to run the calculation when atom types and/or force field parameters required for your target are deficient. In addition, it is conceivable that the composition of conformational isomers which are firstly obtained by conformation search using classical force field and are re-optimized by quantum chemistry calculation is different from that obtained by conformation search using only quantum chemistry calculation.

In CONFLEX 8 and later, it can invoke Gaussian (16 or 09) as an external program and execute the geometry optimization and conformation search. Here, settings for using this function and results of conformation search by using CONFLEX and Gaussian programs are shown.

[Environment setting]

In order to use Gaussian program in CONFLEX, you have to also install Gaussian16 or Gaussian09 to your computer and set an environment variable for executing Gaussian program.

In cases of Mac and Linux

Environment variable of g16root or g09root should be set. If GAUSS_SCRDIR environment variable is not set, scratch files are outputted to the same directory as input files.

In case of Windows

Environment variable of GAUSS_EXEDIR should be set to the address to the folder where Gaussian is installed (e.g. C:¥G16W).
If you do not use CONFLEX keyword of [EXT_GAU_SCRDIR=], scratch files are outputted to %GAUSS_EXEDIR%¥Scratch.

By preparing a file including the environment setting, you can also enable the environment setting for Gaussian program only when performing calculations.

[Conformation search of propylene glycol on B3LYP/6-31G(d) calculation]

This section explains how to perform a conformation search of propylene glycol on B3LYP/6-31G(d) calculation as an example. Input structure of propylene glycol

Structure data of propylene glycol (PropyleneGlycol.mol)

PropyleneGlycol.mol


 13 12  0  0  0  0  0  0  0  0  0    0
   -4.0461   -0.3459    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.6894    0.1585    0.8737 H   0  0  0  0  0  0  0  0  0  0  0  0
   -3.6894    0.1585   -0.8737 H   0  0  0  0  0  0  0  0  0  0  0  0
   -5.1161   -0.3459    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   -3.5328   -1.7978    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.8895   -2.3022    0.8737 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.9928   -1.7979   -0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.6361   -1.2935   -0.8737 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.6361   -1.2934    0.8736 H   0  0  0  0  0  0  0  0  0  0  0  0
   -4.0095   -2.4719   -1.1676 O   0  0  0  0  0  0  0  0  0  0  0  0
   -4.5428   -3.2264   -0.9068 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.5162   -3.1461    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5757   -3.1535    0.1927 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  1  4  1  0  0  0  0
  1  5  1  0  0  0  0
  5  6  1  0  0  0  0
  5  7  1  0  0  0  0
  5 10  1  0  0  0  0
  7  8  1  0  0  0  0
  7  9  1  0  0  0  0
  7 12  1  0  0  0  0
 10 11  1  0  0  0  0
 12 13  1  0  0  0  0
M  END

[Execution by Interface]

Open the PropyleneGlycol.mol file by CONFLEX Interface. Interface Propylene Glycol

Select [CONFLEX] in Calculation menu, and click Detail Settings in the calculation setting dialog displayed. A detail setting dialog will be displayed.
Basic Settings

First, in [General Settings] dialog on the detail setting dialog, select [Conformation Search] in the pull-down menu of [Calculation Type:].
Furthermore, select [External Program] in the pull-down menu of [Estimating Method:]. By this setting, geometry optimizations and others are performed by the external program (Gaussian). General Settings

Next, settings for Gaussian program are made in [External Program] dialog.
[Job Title:] is a comment and set to “Propylene Glycol B3LYP/6-31G(d) optimization”. Set [%Mem=] to “128”, and select [MW] in the pull-down menu of unit. Set [%NProcShared=] to “2”. Set [Route Section:] to “B3LYP/6-31G(d) Opt”, in order to optimize the structures by B3LYP/6-31G(d). Gaussian Settings

We can also perform the calculation settings for Gaussian program by using a file. Please refer to [Calculation setting of Gaussian program by using a file].

Next, in [Conformation Search] dialog, set [Search Limit:] to “5.0”. Conformation Search When the calculation settings are complete, click Edit & Submit in the detail setting dialog.

Add “EDIF_HARD=1.0D-3” keyword to the dialog displayed. This sets a threshold of energy difference to 0.001 kcal/mol. It is used for determining whether to preserve conformations newly obtained. Edit and Submit When the addition is complete, click Submit. The calculation will start.

[Execution by command line]

The calculation settings are defined by describing keywords in the PropyleneGlycol.ini file.

PropyleneGlycol.ini file

CONFLEX 
SEL=5 
EXTERNAL_PROGRAM=GAUSSIAN 
EXT_GAU_LINK0=(mem=128MW) 
EXT_GAU_LINK0=(nprocshared=2) 
EXT_GAU_ROUTE=("B3LYP/6-31G(d) opt”) 
EXT_GAU_COMMENT=("Propylene Glycol B3LYP/6-31G(d) optimization”) 
EXT_GAU_CHARGE=0 
EXT_GAU_SPIN=1 
EXT_PREOPT=OFF 
EDIF_HARD=1.0D-3

[CONFLEX] means to perform a conformation search.
[SEL=5] sets a search limit to 5 kcal/mol.
[EXTERNAL_PROGRAM=] is a name of external program used, [EXT_GAU_LINK0=] specifies Link0 command (you can use this keyword more than once in the ini file.), [EXT_GAU_ROUTE=] specifies a root section, [EXT_GAU_COMMENT=] specifies a comment, [EXT_GAU_CHARGE=] specifies a total charge in the system, and [EXT_GAU_SPIN=] specifies a spin multiplicity in the system.

Note that [EXT_GAU_ROUTE=] and [EXT_GAU_COMMENT=] are specified by [(“] and [”)].

[EXT_PREOPT=OFF] means that a geometry optimization by a force field does not run before Gaussian calculation.
[EDIF_HARD=1.0D-3] sets a threshold of energy difference to 0.001 kcal/mol. It is used for determining whether to preserve conformations newly obtained.

We can also perform the calculation settings for Gaussian program by using a file. Please refer to [Calculation setting of Gaussian program by using a file].

Store the two files of PropyleneGlycol.mol and PropyleneGlycol.ini in an one folder, and execute below command. The calculation will start.

C:\CONFLEX\bin\flex9a_win_x64.exe   -par   C:\CONFLEX\par   PropyleneGlycolenter

The above command is for Windows OS. For the other OS, please refer to [How to execute CONFLEX].

Calculation results

A part of output contents in the PropyleneGlycol.ls1 is shown below. The name of input/output file of Gaussian corresponds to [CONF. ID] in the ls1 file. The PropyleneGlycol_00006.log and PropyleneGlycol_00006.fchk have the most stable structure data.
[ORIGINAL STERIC E] in the ls1 file shows the energy obtained by Gaussian calculation converted to kcal/mol. Gaussian program uses atomic unit. The total energy of the most stable structure is -269.56133526 a.u., that is, -169152.2987 kcal/mol. In this tutorial, we used Gaussian 16 Rev. A.03.

PropyleneGlycol.ls1:

 ====================================================================================
            CONF.           ORIGINAL               DISTRI-                    NO.
    NO.     ID             STERIC E   DELTA E     BUTION      INIT.  REOPT.  NEG.
------------------------------------------------------------------------------------
      1   00000006      -169152.2987    0.0000     21.2884       T*     F+     0
      2   00000017      -169152.2709    0.0278     20.3129       T*     F+     0
      3   00000019      -169152.1497    0.1490     16.5548       T*     F+     0
      4   00000011      -169151.9408    0.3579     11.6356       T*     F+     0
      5   00000001      -169151.9312    0.3675     11.4487       T*     F+     0
      6   00000008      -169151.6798    0.6189      7.4899       T*     F+     0
      7   00000012      -169151.4409    0.8578      5.0044       T*     F+     0
      8   00000018      -169151.1376    1.1611      2.9993       T*     F+     0
      9   00000007      -169150.9622    1.3365      2.2310       T*     F+     0
     10   00000016      -169149.5319    2.7668      0.1995       T*     F+     0
     11   00000020      -169149.3686    2.9301      0.1515       T*     F+     0
     12   00000009      -169149.2519    3.0468      0.1244       T*     F+     0
     13   00000022      -169149.2130    3.0857      0.1165       T*     F+     0
     14   00000021      -169149.0687    3.2300      0.0913       T*     F+     0
     15   00000023      -169149.0383    3.2604      0.0868       T*     F+     0
     16   00000024      -169149.0232    3.2755      0.0846       T*     F+     0
     17   00000013      -169148.9887    3.3101      0.0798       T*     F+     0
     18   00000003      -169148.8937    3.4050      0.0680       T*     F+     0
     19   00000010      -169147.6211    4.6776      0.0079       T*     F+     0
     20   00000014      -169147.4593    4.8394      0.0060       T*     F+     0
     21   00000004      -169147.3564    4.9423      0.0051       T*     F+     0
     22   00000015      -169147.3371    4.9616      0.0049       T*     F+     0
     23   00000005      -169147.3181    4.9806      0.0048       T*     F+     0
     24   00000002      -169147.2083    5.0904      0.0040       T*     F+     0
------------------------------------------------------------------------------------
MINIMUM ENERGY: -169152.2987  KCAL/MOL
AVERAGE ENERGY: -169151.9983  KCAL/MOL (BASED ON THE BOLTZMANN LAW)
====================================================================================

List of Gaussian input/output files:

PropyleneGlycol_00001.fchk  PropyleneGlycol_00008.fchk  PropyleneGlycol_00015.fchk
PropyleneGlycol_00001.gjf   PropyleneGlycol_00008.gjf   PropyleneGlycol_00015.gjf
PropyleneGlycol_00001.log   PropyleneGlycol_00008.log   PropyleneGlycol_00015.log
PropyleneGlycol_00002.fchk  PropyleneGlycol_00009.fchk  PropyleneGlycol_00016.fchk
PropyleneGlycol_00002.gjf   PropyleneGlycol_00009.gjf   PropyleneGlycol_00016.gjf
PropyleneGlycol_00002.log   PropyleneGlycol_00009.log   PropyleneGlycol_00016.log
PropyleneGlycol_00003.fchk  PropyleneGlycol_00010.fchk  PropyleneGlycol_00017.fchk
 ・・・・・

When we perform the conformation search of propylene glycol by using MMFF94s force filed and search limit of 7 kcal/mol, 21 conformers are obtained.
When these conformers are reoptimized at B3LYP/6-31G(d) level, the 5th conformer in MMFF94s becomes the most stable conformation (below figure). External Fig2 The most stable structure of propylene glycol at B3LYP/6-31G(d) level

Furthermore, the 10th conformer in MMFF94s re-optimized by Gaussian converges to the other conformation (below figure). Therefore, the number of conformers on B3LYP/6-31G(d) is 20. External Fig3

When comparing the conformations obtained by using only B3LYP/6-31G(d) calculation and those obtained by reoptimizing the conformers generated by MMFF94s calculation, you can see that the former provides 4 new stable conformers (No. 19, 20, 23, and 24). External Fig4 Conformers obtained only by the conformation search at B3LYP/6-31G(d) level

[Calculation setting of Gaussian program by using a file]

We can make the settings of Link0 command and root section by using a file.

* Example 1

An input file for Gaussian program is shown below.

%mem=32MW
%nprocshared=2
#HF/3-21G opt

test of HF/3-21G calculation
0   1
molecular specification
...

Save the settings above the molecular specification as a gaussian.hdr file.

gaussian.hdr file:

%mem=32MW
%nprocshared=2
#HF/3-21G opt

test of HF/3-21G calculation

0   1

[Execution by Interface]

In [External Program] dialog on the detail setting dialog, check the check-box of [Header File:]. External Header File

Next, click [Select...], and select the gaussian.hdr file. Gaussian settings automatically are made according to the gaussian.hdr file. External Header File set

[Execution by command line]

Modify the PropyleneGlycol.ini file as follows.

PropyleneGlycol.ini file

CONFLEX
SEL=5
EXTERNAL_PROGRAM=GAUSSIAN
EXT_GAU_HEADER_FILE=(gaussian.hdr)
EXT_PREOPT=OFF
EDIF_HARD=1.0D-3

Store the three files of PropyleneGlycol.mol, PropyleneGlycol.ini and gaussian.hdr in an one folder, and execute CONFLEX.

* Example 2

An input file for Gaussian program is shown below. The settings below the molecular specification, for example, the settings of basis set by Gen keyword can also be defined by a file.

%mem=20MW
%nprocshared=2
# B3LYP/gen Opt

TEST OF B3LYP/6-31G(d) CALCULATION

0   1
molecular specification
...

H C O 0
6-31G(d)
****

Save the settings above the molecular specification as a gaussian.hdr file.

gaussian.hdr file:

%mem=32MW
%nprocshared=2
#HF/3-21G opt

test of HF/3-21G calculation

0   1

Save the settings below the molecular specification as a gaussian.ftr file.

gaussian.ftr file:

H C O 0
6-31G(d)
****

[Execution by Interface]

In [External Program] dialog on the detail setting dialog, check the check-box of [Header File:]. External Program Dialog Next, click [Select...] and select the gaussian.hdr file. Select Gaussian Header

Also check the check-box of [Footer File:]. External Footer Next, click [Select...] and select the gaussian.ftr file.
Gaussian settings automatically are made according to the gaussian.hdr and gaussian.ftr files. Select Gaussian Footer

[Execution by command line]

Modify the PropyleneGlycol.ini file as follows.

PropyleneGlycol.ini file

CONFLEX
SEL=5
EXTERNAL_PROGRAM=GAUSSIAN
EXT_GAU_HEADER_FILE=(gaussian.hdr)
EXT_GAU_FOOTER_FILE=(gaussian.ftr)
EXT_PREOPT=OFF
EDIF_HARD=1.0D-3

Store the four files of PropyleneGlycol.mol, PropyleneGlycol.ini, gaussian.hdr, and gaussian.ftr in an one folder, and execute CONFLEX.

[Execution of Gaussian via a job scheduler (Linux)]

This section explains how to execute Gaussian jobs created by CONFLEX via a job scheduler. Here, we use the job scheduler of Univa Grid Engine.

[Execution by command line]

Modify the PropyleneGlycol.ini file as follows.

PropyleneGlycol.ini file

CONFLEX
SEL=5
EXTERNAL_PROGRAM=GAUSSIAN
EXT_JOB_COM=("qsub -sync yes”)
EXT_JOB_FILE=qsub.sh
EXT_GAU_LINK0=(mem=128MW)
EXT_GAU_LINK0=(nprocshared=2)
EXT_GAU_ROUTE=("B3LYP/6-31G(d) opt”)
EXT_GAU_COMMENT=("Propylene Glycol B3LYP/6-31G(d) optimization”) 
EXT_GAU_CHARGE=0
EXT_GAU_SPIN=1
EXT_PREOPT=OFF
EDIF_HARD=1.0D-3

[EXT_JOB_COM=] specifies an execution command of the job scheduler. When you use the job scheduler, you should use the option of "-sync yes" to submit the job as an interactive one.
[EXT_JOB_FILE=] sets a file that contains the settings for the job scheduler.

qsub.sh file:

#!/bin/bash
#$ -S /bin/bash
#$ -N g16_from_conflex
#$ -cwd
#$ -V
#$ -j y
#$ -q all.q
#$ -pe sme 2

export g16root=/usr/local

Gaussian jobs will be executed with [qsub -sync yes qsub.sh]. There is no Gaussian execution command in the qsub.sh file, but CONFLEX add it automatically. You should store the qsub.sh file in the folder containing the PropyleneGlycol.mol and PropyleneGlycol.ini files.

[Temporary enable Gaussian preference]

You can enable the environment setting for Gaussian program only when performing Gaussian calculations.

In case of Windows

[Execution by Interface]

Click Edit & Submit on the detail setting dialog, and add [EXT_JOB_FILE=setup.txt] to the dialog displayed. Edit Submit

[Execution by command line]

Modify the PropyleneGlycol.ini file as follows.

PropyleneGlycol.ini file

CONFLEX
SEL=5
EXTERNAL_PROGRAM=GAUSSIAN
EXT_JOB_FILE=setup.txt
EXT_GAU_LINK0=(mem=128MW) 
EXT_GAU_LINK0=(nprocshared=2) 
EXT_GAU_ROUTE=("B3LYP/6-31G(d) opt”) 
EXT_GAU_COMMENT=("Propylene Glycol B3LYP/6-31G(d) optimization”) 
EXT_GAU_CHARGE=0 
EXT_GAU_SPIN=1 
EXT_PREOPT=OFF
EDIF_HARD=1.0D-3

[EXT_JOB_FILE=] specifies the name of file for setting the environment valuable. If you use this keyword, CONFLEX makes a bat file containing the contents of the setup.txt file and Gaussian execution command and executes a job by using the bat file.

setup.txt file:

set GAUSS_EXEDIR=C:\G16W

In addition, also add [EXT_GAU_SCRDIR=D:\Scratch] to the dialog displayed by clicking Edit & Submit, you can save scratch files to the specified folder. If you don't add that, the scratch files will be saved in [%GAUSS_EXEDIR%¥Scratch].

In cases of Mac and Linux

[Execution by Interface]

Click Edit & Submit on the detail setting dialog, and add [EXT_JOB_COM=(“sh")] and [EXT_JOB_FILE=setup.sh] to the dialog displayed. Edit and Submit

[Execution by command line]

Modify the PropyleneGlycol.ini file as follows.

PropyleneGlycol.ini file

CONFLEX
SEL=5
EXTERNAL_PROGRAM=GAUSSIAN
EXT_JOB_COM=("sh”)
EXT_JOB_FILE=setup.sh
EXT_GAU_LINK0=(mem=128MW) 
EXT_GAU_LINK0=(nprocshared=2) 
EXT_GAU_ROUTE=("B3LYP/6-31G(d) opt”) 
EXT_GAU_COMMENT=("Propylene Glycol B3LYP/6-31G(d) optimization”) 
EXT_GAU_CHARGE=0 
EXT_GAU_SPIN=1
EXT_PREOPT=OFF
EDIF_HARD=1.0D-3

[EXT_JOB_COM=] specifies a execution command, and [EXT_JOB_FILE=] specifies the name of file for setting the environment valuable. If you use these keywords, CONFLEX makes a script file containing the contents of the setup.sh file and Gaussian execution command and executes the job by using the sh command and the script file.

setup.sh file:

export g16root=/usr/local
export GAUSS_SCRDIR=/tmp