Example: Constraint Geometry Optimization: H2O

Download GO_constraints.run

#! /bin/sh

# The key CONSTRAINTS can only be used to enforce constraint in a geometry 
# optimization. The input for this key is very similar to that of
# the RESTRAINT keyword. The key CONSTRAINTS can, however, also be used to
# constrain Cartesian coordinates.

# The constraints do not have to be satisfied at the start of the geometry
# optimization.


# == Example for angle constraint ==


$ADFBIN/adf <<eor
title WATER geometry optimization with angle constraint

ATOMS
    1.O         0.001356    0.000999    0.000000
    2.H         0.994442   -0.037855    0.000000
    3.H        -0.298554    0.948531    0.000000
END

BASIS
 Type DZP
END

CONSTRAINTS
  ANGLE  3 1 2 125.0
END

GEOMETRY
END

eor

rm TAPE21 logfile


# == Example for fixed-atom constraint ==

# Note that the optimization should be done in Cartesian:

$ADFBIN/adf <<eor
title WATER geometry optimization with fixed-atom constraint

ATOMS
    1.O         0.001356    0.000999    0.000000
    2.H         0.994442   -0.037855    0.000000
    3.H        -0.298554    0.948531    0.000000
END

BASIS
 Type DZP
END

SYMMETRY NOSYM

CONSTRAINTS
  ATOM 1 0.0 0.0 0.0
  ATOM 2 1.0 0.0 0.0
END

GEOMETRY
  OPTIM CARTESIAN
END

eor

rm TAPE21 logfile


# == Example for bond length constraint ==


$ADFBIN/adf <<eor
title WATER Geometry Optimization with bond length constraint

ATOMS
    1.O         0.001356    0.000999    0.000000
    2.H         0.994442   -0.037855    0.000000
    3.H        -0.298554    0.948531    0.000000
END

BASIS
 Type DZP
END

CONSTRAINTS
  DIST  1 2 1.03
  DIST  1 3 1.03
END

GEOMETRY
  OPTIM CARTESIAN
END

eor

rm TAPE21 logfile


# == Example for dihedral angle constraint ==


$ADFBIN/adf <<eor
Title Constraining dihedral of ethane

SYMMETRY NOSYM

ATOMS
  1.C        -0.004115   -0.000021    0.000023
  2.C         1.535711    0.000022    0.000008
  3.H        -0.399693    1.027812   -0.000082
  4.H        -0.399745   -0.513934    0.890139
  5.H        -0.399612   -0.513952   -0.890156
  6.H         1.931188    0.514066    0.890140
  7.H         1.931432    0.513819   -0.890121
  8.H         1.931281   -1.027824    0.000244
END

CONSTRAINTS
  DIHED  6 2 1 3  20.00
END

BASIS
  type DZP
END

GEOMETRY
END

eor

rm TAPE21 logfile


# == Example for Block constraint (with a dihedral constraint) ==


$ADFBIN/adf <<eor
Title Block constraints (with a dihedral constraint)

SYMMETRY NOSYM

ATOMS
  1.C        -0.004115   -0.000021    0.000023 b=b1
  2.C         1.535711    0.000022    0.000008 b=b2
  3.H        -0.399693    1.027812   -0.000082 b=b1
  4.H        -0.399745   -0.513934    0.890139 b=b1
  5.H        -0.399612   -0.513952   -0.890156 b=b1
  6.H         1.931188    0.514066    0.890140 b=b2
  7.H         1.931432    0.513819   -0.890121 b=b2
  8.H         1.931281   -1.027824    0.000244 b=b2
END

CONSTRAINTS
  DIHED  6 2 1 3  20.00
  BLOCK b1
  BLOCK b2
END

BASIS
  type DZP
END

GEOMETRY
END

eor

rm TAPE21 logfile