SET
SET¶
This top-level directive allows the user to enter data directly into the run-time database. The format of the directive is as follows:
SET <string name> [<string type default automatic>] <type data>
The entry for variable
set atomid 1 3:7 21
will be interpreted as a list of integers. However,
set atomid 3:7 21
will not work since the first element will be interpreted as a string and not an integer. To work around this feature, use instead
set atomid integer 3:7 21
which says to write three through seven, as well as twenty-one.
The SET directive is useful for providing indirection by associating the name of a basis set or geometry with the standard object names (such as “ao basis” or geometry) used by NWChem. The following input file shows an example using the SET directive to direct different tasks to different geometries. The required input lines are as follows:
title "Ar dimer BSSE corrected MP2 interaction energy"
geometry "Ar+Ar"
Ar1 0 0 0
Ar2 0 0 2
end
geometry "Ar+ghost"
Ar1 0 0 0
Bq2 0 0 2
end
basis
Ar1 library aug-cc-pvdz
Ar2 library aug-cc-pvdz
Bq2 library Ar aug-cc-pvdz
end
set geometry "Ar+Ar" task mp2
scf; vectors atomic; end
set geometry "Ar+ghost" task mp2
This input tells the code to perform MP2 energy calculations on an argon dimer in the first task, and then on the argon atom in the presence of the “ghost” basis of the other atom.
The SET directive can also be used as an indirect means of supplying input to a part of the code that does not have a separate input module (e.g., the atomic SCF). Additional examples of applications of this directive can be found in the sample input files, and its usage with basis sets and geometries. Also see database section for an example of how to store an array in the database.