ChemShell Tools
Introduction
This is a collection of various tools that do not fit into any other of the
sections of this manual. The individual tools are:
Restraints allow to apply geometry dependent energy terms additional to the
energy provided by the theory= keyword. They can be used for umbrella
sampling simulations as well as for "constrained" optimisation. The latter is
required for calculating reaction profiles.
Restraints can be used in the driver modules energy, gradient, eandg,
dynamics, hdlcopt, and dl-find. In these cases, only the keyword
restraints= has to be included into the specification of the
driver. The other keywords given below are added by the drivers.
Restraints can also be used as a standalone energy/gradient evaluator (invoked
by the keyword theory=restraint), representing a simple force
field.
Command Line Arguments
Argument |
Argument type |
Mandatory |
Default |
To specify |
restraints= |
Tcl List
|
yes |
- |
Tcl List
of lists. Each entry represents
one restraint. It has the following format: {Type Atom1 Atom2
... AtomN x0 K}. See below for details. |
coords= |
Fragment tag
|
yes |
- |
Fragment object containing the coordinates |
energy= |
Matrix tag
|
no |
- |
Matrix to hold the resulting energy |
gradient= |
Matrix tag
|
no |
- |
Matrix to hold the resulting gradient |
list_option= |
Output keyword
|
no |
medium |
How much information to report |
Harmonic restraints of the form V=K/2
(x-x0)2 are applied to different types of
coordinates x. In each energy evaluation, a list of the types of
restraints, their actual value x (in the same units as
x0) and the associate restraint energy V are written
to stdout.
Type |
Number of input atoms |
Unit of K |
Unit of x0 |
Comments |
bond |
2 |
Hartree/Bohr2 |
Bohr |
Bond distance |
angle |
3 |
Hartree/rad2 |
Degree |
Angle |
torsion |
4 |
Hartree/rad2 |
Degree |
Torsion angle (dihedral) |
bonddiff2 |
4 |
Hartree/Bohr2 |
Bohr |
Difference of two bond lengths:
d(Atom1-Atom2) – d(Atom3-Atom4) |
bonddiff3 |
6 |
Hartree/Bohr2 |
Bohr |
Difference of three bond lengths:
d(Atom1-Atom2) – d(Atom3-Atom4) – d(Atom5-Atom6) |
bonddiff4 |
8 |
Hartree/Bohr2 |
Bohr |
Difference of four bond lengths:
d(Atom1-Atom2) + d(Atom3-Atom4) – d(Atom5-Atom6) – d(Atom7-Atom8) |
elec |
2 |
e |
- |
Electrostatic term. Only two atom indices and
the product of charges (in elementary charges) are required. |
sbc |
0 |
Hartree/Bohr2 |
Bohr |
Spherical boundary conditions. Input format
sbc x y z x0 K. Force acting towards the centre x, y, z if
atoms are further than x0 from the centre. |
sbc_atom |
1 |
Hartree/Bohr2 |
Bohr |
Spherical boundary conditions around a central
atom. Force acting towards one atom on atoms
further than x0 from the central atom. |
cart |
1 |
Hartree/Bohr2 |
Bohr |
Restraint to a position in space. Input format
cart atom_number x y z K. |
cart_atom |
1 |
Hartree/Bohr2 |
- |
Restrains the atom towards its initial position.
Input format cart_atom atom_number K
|
The following simple script may be used to adjust the system to a specific
value of a reaction coordinate (from which, for example, optimisations can start):
# Atomic units:
set ReactionCoordinate 0.3
# atoms to move: 51 37 36
hdlcopt coords=c active_atoms= {51 37 36} \
theory=restraint : [ list restraints= [ list [ list \
bonddiff2 51 37 37 36 $ReactionCoordinate 3.0 ] ] ] \
result=moved.c
ESP charges of a QM calculation require the potential at a set of points
around the molecule. As some programs (mndo, turbomole 5.71) are able to
calculate the potential, but do not (correctly) calculate ESP charges, this
feature in included in ChemShell.
The set of points can be calculated by get_esp_points. The
positions of the points are written into the fragment specified by
grid. The QM method should write the potential into the charge-tags
of this fragment. Thus, a possible code to generate (R)ESP charges could be as
follows.
provide a coordinates in a fragment c
get_esp_points coords=c grid=gridmat.c type=shell npoint=400
turbomole.potential $turbo_args (grid=gridmat.c is part of $turbo_args)
set_molecule_charge coords=c charge=-1
fit_esp_charges coords=c grid=gridmat.c
These lines should be called after turbomole.init followed by (at least)
turbomole.energy to calculate the wave function.
Command Line Arguments to get_esp_points
Argument |
Argument type |
Mandatory |
Default |
To specify |
coords= |
Fragment tag
|
yes |
- |
The molecule for which the ESP charges are to be
calculated |
grid= |
Fragment tag
|
yes |
- |
Fragment for storing the points at which the
potential will be fitted |
npoint= |
integer |
no |
2*Number of atoms |
Number of points to be generated in
grid. When using type=shell, this number can not strictly be
fulfilled. |
type= |
keyword |
no |
mmatoms |
Can be "mmatoms" or "shell". When "mmatoms"
the positions of the npoint bq charges nearest to the atoms will be used. If
"shell", the points are uniformly distributed on a shell around the atoms. |
vdw_factor= |
real |
no |
1.5 |
Only used for type=shell. Specifies the distance
of the shell from the atoms in units of the vdW-radius of the nearest atom. |
Command Line Arguments to fit_esp_charges
When the grid is defined and the potential at the grid points is known, ESP
and RESP charges [J. Phys. Chem. 97, 10269 (1993)] at the atomic
positions can be calculated by fit_esp_charges .
Argument |
Argument type |
Mandatory |
Default |
To specify |
coords= |
Fragment tag
|
yes |
- |
The molecule for which the (R)ESP charges are to be
calculated. These charges will be stored in the charge tag of the
fragment. The total charge of the fragment (atoms only, no bq charges) has to
be set! |
grid= |
Fragment tag
|
yes |
- |
Fragment for fitting the potential. The
potential should be stored in the charge tag. |
method= |
keyword |
no |
esp |
If "resp", the restrained electrostatic
potential fitted charges will be calculated. Default: ESP charges
without restraint. |
resp_a= |
real |
no |
0.0005 |
Parameter for the restraint for RESP charges
in (Hartree/elementary charge)^2. The higher resp_a, the smaller the charges
will be, but the worse the fit will be. |
resp_b= |
real |
no |
0.2 |
Parameter for the restraint for RESP charges
in elementary charges. The lower resp_b, the smaller the charges
will be, but the worse the fit will be. |
store= |
Fragment tag
|
no |
none |
Fragment to store the (R)ESP charges (in the atom
charge field) and the atom positions to which the esp charges have been
fitted |
There is also the command charge_fit to perform similar tasks, but
this is neither documented nor recommended.
Pointcharge can be used in the program as a qm_theory in hybrid
calculations, thus it is in fact an energy+gradient
module. It calculates the electrostatic interaction of atomic charges
with point charges of the MM atoms (bq charges). The self-energy of the
atomic point charges is not included. Forces on the QM atoms are not
calculated.
Usage of this module only makes sense if the point charges are obtained from
esp charges of a real QM-calculation. Additionally the QM atoms should be
frozen.
It is needed to perform FEP calculations,
see the manual of the hybrid module.
Command Line Arguments
Argument |
Argument type |
Mandatory |
Default |
To specify |
charges_file= |
string |
no |
undefined |
File name to read the point charges from. It is a binary
file, see below for the format. If neither charges_file nor charges_frag are
specified, charges assigned to the atoms of the fragment are used. |
charges_frag= |
Fragment tag
|
no |
none |
Fragment to read the point charges from (in the atom
charge field). If neither charges_file nor charges_frag are
specified, charges assigned to the atoms of the fragment are used. |
coordinate_accuracy= |
real |
no |
10–4 |
Accuracy (in Bohr) to which the geometry in the
charges file or fragment must match
the current atomic geometry of the QM atoms. The program will stop with an error message if the
criterion is not fulfilled. Negative values avoid any geometry check. |
list_option= |
Output keyword
|
no |
medium |
Amount of listing output (none, medium, full). |
The binary charges file may be created by Fortran code of the following kind,
r and charge in atomic units
open(unit=125,file='charges.bin',form='unformatted')
write(125) qmat
do iat=1,qmat
write(125) r(:,iat),charge(iat)
end do
close(125)
lsqfit
Command Line Arguments
Argument |
Argument type |
Mandatory |
Default |
To specify |
coords |
Fragment tag
|
yes |
- |
Fragment object to be transformed |
reference_coords |
Fragment tag
|
yes |
- |
Reference fragment object |
result |
Fragment tag
|
yes |
- |
Result object |
prerotation |
file |
no |
- |
Pre-rotation matrix file |
correspondence |
Tcl List
|
no |
- |
Correspondence list for atoms |
Description:
lsqfit performs least-squares fitting of two structures.
A pre-rotation matrix
may be optionally supplied, and this is applied to the input structure
before the fit is performed. It can be used to fit a structure to
its enantiomer.
The corresponce= argument can be used to specify which atoms to be
matched, the default is all. It is a list of two-element lists, each pair
indicating the corresponding atoms in the first and second fragments,
respectively.
e.g.
read_input prerot { 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 -1.0 }
lsqfit reference_coords=structure1 coords=structure2 result=res \
prerotation = prerot correspondence = { { 1 1} { 3 2} { 2 3 } }
ChemShell is written in a modular, object-oriented manner. This allows timing
information to be collected for each module, a simple profiling. The commands
start_module, end_module, parsearg, and
times are used to provide a trace and a simple profiling.
start_module
It takes one string argument, the name of the module to start. It is rarely
directly used, generally it is called by parsearg. start_module starts the
clock for the respective module and writes a line to standard output of the
form:
write_pdb/=============================== Tstep: 0.1 Ttot: 8.2 ==
Where the first field(s) is the name of the module (possibly a stack of module
names). Thus it provides a trace in which part of the code, ChemShell is
currently running. Tstep is the time in seconds that the previous module
needed. Ttot is the total execution time (wallclock time) passed since the
start of ChemShell when start_module is called.
end_module
Takes no arguments. It reduces the current stack of modules by one and stores
the timing information of the end of the execution of the current module. Has
to be called once for each call of start_module or parsearg, otherwise a "stack
error" occurs (no runtime error, just a warning).
parsearg
it takes three arguments:
Argument |
Argument type |
Mandatory |
Default |
To specify |
argument 1 |
string |
yes |
- |
Module name |
argument 2 |
Tcl List
|
yes |
- |
tcl list of the argument names to parse |
argument 3 |
string |
yes |
- |
a list of keywords and their values, formatted as
described in ChemShell basics |
It returns a boolean value, 1 on error. It sets the tcl variables with the
names used in argument 2 to the values specified in argument 3. Moreover, it
calls start_module argument1.
times
The command times, which takes no arguments, does a simple
profiling. It writes a summary of the
runtimes used by external programs and by ChemShell modules at the time
called. Most useful at the end of ChemShell scripts.
|