Preparing and running a turbomole job

From ScientificComputing
Jump to: navigation, search

As a simple example, we give a description, how to set up a DFT geometry optimization of the methane molecule (CH4).

Prepare the job

For this purpose, an .xyz file (standart format for structures) with a first guess for the coordinates is required.

xyz file format:

first line      : number of atoms
second line     : comment
following lines : atom_symbol x_coordinate y_coordinate z_coordinate

xyz files can either be set up by hand or be exported by several programs:

  • molden
  • adfinput
  • chembiooffice

methane.xyz (coordinates in Angstrom) could look like:

5

C   0.000000   0.000000   0.000000
H   0.000000   0.000000   1.088718
H   1.226454  -0.000000  -0.562906
H  -0.413227  -0.788935  -0.562906
H  -0.413227   0.788935  -0.562906

In order to use turbomole, the module needs to be loaded

module load turbomole/6.4.0

As a next step the xyz file has to be converted to the file format used by turbomole

x2t methane.xyz > coord

The resulting coord file contains now the coordinates in atomic units (Bohr instead of Angstrom)
For the preparation of the job, the define script needs to be executed:

define

Follow now the instructions on the screen:

IF YOU WANT TO READ DEFAULT-DATA FROM ANOTHER control-TYPE FILE,
THEN ENTER ITS LOCATION/NAME OR OTHERWISE HIT >return<.

-> hit return

INPUT TITLE OR 
ENTER & TO REPEAT DEFINITION OF DEFAULT INPUT FILE

-> hit return

SPECIFICATION OF MOLECULAR GEOMETRY ( #ATOMS=0     SYMMETRY=c1  )
YOU MAY USE ONE OF THE FOLLOWING COMMANDS : 
sy <group> <eps> : DEFINE MOLECULAR SYMMETRY (default for eps=3d-1)
desy <eps>       : DETERMINE MOLECULAR SYMMETRY AND ADJUST 
                    COORDINATES (default for eps=1d-6)
susy             : ADJUST COORDINATES FOR SUBGROUPS
ai               : ADD ATOMIC COORDINATES INTERACTIVELY
a <file>         : ADD ATOMIC COORDINATES FROM FILE <file>
aa <file>        : ADD ATOMIC COORDINATES IN ANGSTROEM UNITS FROM FILE <file>
sub              : SUBSTITUTE AN ATOM BY A GROUP OF ATOMS
i                : INTERNAL COORDINATE MENU 
ired             : REDUNDANT INTERNAL COORDINATES
red_info         : DISPLAY REDUNDANT INTERNAL COORDINATES
ff               : UFF-FORCEFIELD CALCULATION
m                : MANIPULATE GEOMETRY
frag             : Define Fragments for BSSE calculation
w <file>         : WRITE MOLECULAR COORDINATES TO FILE <file> 
r <file>         : RELOAD ATOMIC AND INTERNAL COORDINATES FROM FILE <file>
name             : CHANGE ATOMIC IDENTIFIERS 
del              : DELETE ATOMS 
dis              : DISPLAY MOLECULAR GEOMETRY 
banal            : CARRY OUT BOND ANALYSIS 
*                : TERMINATE MOLECULAR GEOMETRY SPECIFICATION 
                    AND WRITE GEOMETRY DATA TO CONTROL FILE 

IF YOU APPEND A QUESTION MARK TO ANY COMMAND AN EXPLANATION
OF THAT COMMAND MAY BE GIVEN

Read in the coordinate file by typing

a coord

Exit from the menu by typing

*

Then you are asked about the use of internal coordinates

IF YOU DO NOT WANT TO USE INTERNAL COORDINATES ENTER  no

type

no

Now the basis set menu is displayed:

ATOMIC ATTRIBUTE DEFINITION MENU  ( #atoms=5     #bas=5     #ecp=0     )

b    : ASSIGN ATOMIC BASIS SETS 
bb   : b RESTRICTED TO BASIS SET LIBRARY 
bl   : LIST ATOMIC BASIS SETS ASSIGNED
bm   : MODIFY DEFINITION OF ATOMIC BASIS SET
bp   : SWITCH BETWEEN 5d/7f AND 6d/10f
lib  : SELECT BASIS SET LIBRARY
ecp  : ASSIGN EFFECTIVE CORE POTENTIALS 
ecpb : ecp RESTRICTED TO BASIS SET LIBRARY 
ecpi : GENERAL INFORMATION ABOUT EFFECTIVE CORE POTENTIALS
ecpl : LIST EFFECTIVE CORE POTENTIALS ASSIGNED
ecprm: REMOVE EFFECTIVE CORE POTENTIAL(S)
c    : ASSIGN NUCLEAR CHARGES (IF DIFFERENT FROM DEFAULTS) 
cem  : ASSIGN NUCLEAR CHARGES FOR EMBEDDING 
m    : ASSIGN ATOMIC MASSES (IF DIFFERENT FROM DEFAULTS) 
dis  : DISPLAY MOLECULAR GEOMETRY 
dat  : DISPLAY ATOMIC ATTRIBUTES YET ESTABLISHED 
h    : EXPLANATION OF ATTRIBUTE DEFINITION SYNTAX 
*    : TERMINATE THIS SECTION AND WRITE DATA OR DATA REFERENCES TO control
GOBACK=& (TO GEOMETRY MENU !)

Assign a DZP (double-zeta with polarization functions) basis set to the atoms

b all DZP

Exit the menu

*

Another menu is displayed which allows you to choose the method for the first guess of the molecular orbitals

CHOOSE COMMAND 
infsao     : OUTPUT SAO INFORMATION 
atb        : Switch for writing MOs in ASCII or binary format
eht        : PROVIDE MOS && OCCUPATION NUMBERS FROM EXTENDED HUECKEL GUESS 
use <file> : SUPPLY MO INFORMATION USING DATA FROM <file> 
man        : MANUAL SPECIFICATION OF OCCUPATION NUMBERS 
hcore      : HAMILTON CORE GUESS FOR MOS
flip       : FLIP SPIN OF A SELECTED ATOM
&          : MOVE BACK TO THE ATOMIC ATTRIBUTES MENU
THE COMMANDS  use  OR  eht  OR  *  OR q(uit) TERMINATE THIS MENU !!! 
FOR EXPLANATIONS APPEND A QUESTION MARK (?) TO ANY COMMAND

Perform an extended Hückel calculation by typing

eht

Follow the instructions on the screen

DO YOU WANT THE DEFAULT PARAMETERS FOR THE EXTENDED HUECKEL CALCULATION ? 
DEFAULT=y   HELP=?

Accept the default parameters by hiting return

ENTER THE MOLECULAR CHARGE  (DEFAULT=0)

Since the methane molecule is neutral, accept the default charge by hiting return

DO YOU ACCEPT THIS OCCUPATION ?  DEFAULT=y

When no warning is poping up, accept the default occupation numbers by hiting return
Now you are almost done with the preparation of the turbomole job. In the next menu, you are asked to choose a method for the calculation

GENERAL MENU : SELECT YOUR TOPIC 
scf    : SELECT NON-DEFAULT SCF PARAMETER 
mp2    : OPTIONS AND DATA GROUPS FOR rimp2 and mpgrad
cc     : OPTIONS AND DATA GROUPS FOR ricc2
ex     : EXCITED STATE AND RESPONSE OPTIONS
prop   : SELECT TOOLS FOR SCF-ORBITAL ANALYSIS 
drv    : SELECT NON-DEFAULT INPUT PARAMETER FOR EVALUATION
         OF ANALYTICAL ENERGY DERIVATIVES 
         (GRADIENTS, FORCE CONSTANTS) 
rex    : SELECT OPTIONS FOR GEOMETRY UPDATES USING RELAX
stp    : SELECT NON-DEFAULT STRUCTURE OPTIMIZATION PARAMETER
e      : DEFINE EXTERNAL ELECTROSTATIC FIELD 
dft    : DFT Parameters 
ri     : RI Parameters 
rijk   : RI-JK-HF Parameters 
trunc  : USE TRUNCATED AUXBASIS DURING ITERATIONS 
marij  : MULTIPOLE ACCELERATED RI-J 
dis    : DISPLAY MOLECULAR GEOMETRY 
list   : LIST OF CONTROL FILE 
&      : GO BACK TO OCCUPATION/ORBITAL ASSIGNMENT MENU
* or q : END OF DEFINE SESSION

enter the DFT menu by typing

dft

DFT needs to be activated

func    : TO CHANGE TYPE OF FUNCTIONAL 
grid    : TO CHANGE GRIDSIZE 
 on:   TO SWITCH ON  DFT 
Just <ENTER>, q or '*' terminate this menu.

type

on

exit the menu by typing

*

terminate the define script by typing

*

The script produced three files named basis, control and mos. The basis file contains the exponents and the contraction coefficients of the DZP basis for carbon and hydrogen. The mos file contains the molecular orbitals from the extended Hückel calculation, whereas the control file contains all options for the calculation.

Open the control file by typing

vic

Change the value of $scfiterlimit from 30 to 300

$scfiterlimit        300

Change the value of $scfconv from 6 to 8

$scfconv    8

Save and exit the file by typing

:wq

And hit return.

Run the job

Because this is a quite small job, a time limit of one hour should be sufficient at all. The job is now executed by

sbatch --time=1:00:00 --wrap="jobex -gcart 4 -c 200"

Here -gcart 4 denotes the threshold of the cartesian gradient, which we set to 10-4, and -c 200 sets the maximum number of iterations in the SCF to 200.

Parallel jobs (SMP)

For running parallel jobs in Turobmole, one has to load a different module:

module load turbomole/6.4.0_smp

It is convenient to create a small runscript (run.tm) for parallel Turbomole jobs to set the necessary environment variables:

run.tm:

export PARNODES=X
export PARA_ARCH=SMP
export TURBOTMPDIR=$TMPDIR
jobex [Turbomole Parameter] > output.log)

Here X denotes a number between 1 and 192. It is important that when submitting a job, the -n option of bsub needs to be set to X too.

sbatch -n 1 --cpus-per-task=X --mem-per-cpu=2500 --tmp=2048*X --time=72:00:00 < run.tm