ChemShell logo

ChemShell Tutorial

Search the manual:

Geometry optimisation with DL-FIND

A simple optimisation

The example opt1.chm in samples/dl-find_xyz uses the DL-FIND geometry optimiser to optimise a structure from a guess geometry stored in a .xyz file.

First, the geometry is read in from the XYZ file and stored in ChemShell format (sich6.pun).

read_xyz file=sich6.xyz coords=sich6.pun

An optimisation is then performed using the MNDO code with default settings. The initial geometry is taken from sich6.pun.

dl-find coords=sich6.pun theory=mndo

Using non-default settings

To provide non-default settings for MNDO, the colon (":") is used to pass the data to mndo (see opt2.chm). A Tcl list (denoted by curly brackets) can be used to pass multiple options to the mndo driver:

read_xyz file=sich6.xyz coords=sich6.pun
dl-find coords=sich6.pun theory=mndo : { hamiltonian=am1 accuracy=high }

Specifying options with variables

Keyword values can also be specified using Tcl variables. Remember, though, that lists specified in curly brackets do not substitute variable values in. To expand variable references we need to use the list command to generate the keyword list as in opt3.chm:

set ham am1
set active { 1 3 4 5 }
read_xyz file=sich6.xyz coords=sich6.pun
dl-find coords=sich6.pun active_atoms= $active theory=mndo : [list hamiltonian= $ham accuracy=high ]

In this case the Hamiltonian is specified using the variable ham to be AM1.

This case also illustrates the used of the active_atoms keyword to perform a partial optimisation. As there are no variables referenced in the active list, curly brackets can be used.

Storing the result of the optimisation

In the final example, opt4.chm, we store the optimised coordinates as a ChemShell fragment for use in subsequent calculations. The result= keyword is used to specify the name of the optimised fragment object.

read_xyz file=sich6.xyz coords=sich6.pun
dl-find coords=sich6.pun theory=mndo : { hamiltonian=am1 accuracy=high } result=sich6_opt.pun
write_xyz file=sich6_opt.xyz coords=sich6_opt.pun

Here we also write out the optimised geometry in XYZ format to sich6_opt.xyz.

If you wish you can also generate a full optimisation trajectory in XYZ format by adding the keyword list_option=full. This specifies that more output information than default should be printed. In addition to the extra ChemShell output, two further files will be created: path.xyz is the path for all the atoms, while path_active.xyz contains only active atoms.

Back to the ChemShell tutorial