text:
# TAPE21¶

TAPE21 is the general result file of an ADF calculation. It is a KF file: Direct-Access, binary, and keyword driven. It contains information about the calculation. You can use it as a fragment file in a subsequent calculation on a bigger molecule, where the current one may be a part, or in an analysis program.

The contents of TAPE21 is keyword-accessible and you may use the KF utilities (see Scripting Section) for conversion of TAPE21 from binary to ASCII format and vice versa. This facility is also useful when you intend to use a TAPE21 result file produced on one type of hardware, for a continuation run on a quite different computer: Transform the binary file to ASCII format with the KF utilities on the first machine. Then transport the ASCII file to the other machine, and make a binary out of it again.

Another utility (pkf) can be used to obtain a summary of the contents of TAPE21. The output should be more or less self-documenting: all variables are listed by name, type (integer, real, ..) and size (number of array elements) and grouped in named sections.

The data on TAPE21 is organized in Sections which group together related data. Each section contains a number of variables. Each variable may be an array or a scalar and may be integer, real, logical or character type.

A complete dump of the contents of TAPE21 is obtained with dmpkf. The resulting ASCII file contains for all variables on the file:

• The name of the section it belongs to;
• The name of the variable itself;
• Three integers coding for the data of the variable:
• The number of data elements reserved on the file for the variable;
• The number of data elements actually used for the variable. In virtually all cases the number of used elements is equal to the number of reserved elements. The number of used elements is relevant for interpreting the data, the number of reserved elements has only relevance for the management of data on the file by kf-specific modules and utilities;
• An integer code for the data type: 1=integer, 2=real, 3=character, 4=logical;
• The variable value(s).

A typical case of the contents of TAPE21 obtained by dmpkf operating on the binary TAPE21 file from an optimization run on H2O would be:

 contents of TAPE21 comment General name of (first) section file-ident name of (first) variable in the current section (General) 6 6 3 characteristics of the data: 6 elements reserved on file for the variable, 6 data elements actually used, 3=integer code for the data type: character TAPE21 Value of the variable fileident in the section General. General again: name of the section title name of the (second) variable 80 80 3 reserved and used number of data elements (both 80), and the data type code (3: character) Water Geometry Optimization with Internal Coordinates value (etc.) (etc.)

A description of the various utilities that can be used to process TAPE21 can be found in other parts of this ADF manual.

## Contents of TAPE21¶

Follows a survey of the sections and variables on TAPE21. Details may differ between different run types (SinglePoint, Frequencies...). Most items should be self-explanatory. Some are only significant for internal proceedings of the program and will not be explained in detail. The sections are described in an order that corresponds to the order in which they are generated and hence printed by the KF utility programs. However, the order of generation depends somewhat on the type of application, so some difference may be found when comparing to your own TAPE21 printout.

Note that variable and section names may contain spaces: these are significant.

A special section is the ‘SUPERINDEX’ section, which is in fact a table-of-contents that lists all the sections in the file, with technical information regarding their position on the file, the amount of data corresponding to that section and similar items. The SUPERINDEX section is not discussed further here. See the KF documentation for more details.

Section General

General information about the calculation and the file

fileident
Name of the file. Here: TAPE21
jobid
ADF release number with date and time of the calculation
title
Title of the calculation. This may have been set in the input file, or be internally generated. In a create run it is picked up from the Create basis set file (if no input value for the title key has been given).
runtype
The type of calculation, for instance SinglePoint or Frequencies
nspin
1 for a spin-restricted calculation, 2 for spin-unrestricted
nspinf
Similar for the fragment occupation numbers as they are used in the calculation, See the key FRAGOCCUPATIONS
ldapot
An integer code for the applied LDA part of the XC potential functional used in the SCF. 1 for VWN, 2 for VWN+Stoll ...
xcparv
X-alpha parameter value. Only relevant for the X-alpha LDA potential, meaningless if another LDA potential functional has been selected.
ldaen
As for ldapot: integer code for the LDA part of the Density Functional, now however pertaining to the (post-SCF) energy evaluation. Usually ldaen and ldapot are identical. See the key XC for details.
xcpare
As xcparv, but now for the energy evaluation.
ggapot
Specification (string) of the GGA part of the XC potential used in the SCF, for instance ‘Becke Perdew’. If no GGA potential is applied, the string ggapot is empty.
ggaen
Similar for the GGA part of the XC energy evaluation
iopcor
Code for usage of frozen core: 1=use frozen cores, 0=pseudopotentials. Pseudopotentials are not supported anymore in ADF, so this variable must always be 1.
electrons
The number of valence electrons Note that this is not necessarily the same as what may consider, chemically, as the valence space. Rather, it equals the total number of electrons in the calculation minus the electrons in the frozen core orbitals.
unit of length
Transformation factor between input-used geometrical units (for distances) and atomic units (bohr). If input of, say, the atomic coordinates is in Angstrom, the unit of length is approximately 1.89
unit of angle
Similar for angles. Internal units in the program are radians. Input (bond and dihedral angles) may be in degrees, in which case the unit of angle equals approximately 0.017

Section Geometry

Geometrical data such as number of atoms, coordinates, etc: Most variable names should be self-explanatory

grouplabel
Point group symmetry (string) used in the calculation, for instance O(H). This may be set in the input file.
Geometric Symmetry
Auto-determined (‘true’) symmetry (considering the nuclear frame and any external fields, but not taking into account any user-defined MO occupation numbers and hence the electronic charge distribution.
symmetry tolerance
Threshold for allowed deviation of input atomic coordinates from symmetry to be detected or verified.
orient
Affine transformation (3,4 matrix: rotation and translation) between the input coordinates and the frame in which the program processes the atoms. ADF has certain orientation requirements for all supported point group symmetries and may rotate and translate the input coordinates accordingly.
oinver
The inverse transformation of orient
lrotat
A logical flag to signal whether or not a rotation has been applied between the input frame and the internally used frame.
nr of fragmenttypes
The number of distinct types of fragments
nr of dummy fragmenttypes
Idem, but counting only dummy atom fragments. A dummy fragment, if it exists, must consist of one single (dummy) atom.
fragmenttype
Names (string) of the fragment types.
fragment mass
Sum of atomic masses in the fragment.
fragment charge
An array with 3 values per fragment type (nftypes,3): 1=sum of nuclear charges, 2=sum of effective nuclear charges (discounting for the frozen core shells), 3=nr of valence electrons
fframe
Signals whether or not special local coordinate frames are used for the atoms. Usually this is not so, in which case the variable has the value DEFAULT. fframe is an array that runs over the atoms. See the ‘z=’ option to the data in the ATOMS input key block.
cum nr of fragments
An array (0:nftyps) that gives the total number of fragments for the fragment types up to and including the indexed one. The ordering of fragments and fragment types is printed in the standard output file.
nr of fragments
The total number of fragments in the calculation This equals the last element of the previous variable ‘cum nr of fragments’
nr of dummy fragments
The total number of fragments that each consist of a single dummy atom.
fragment mapping
Affine transformation matrices (3,4: rotation and translation), one for each fragment in the molecule, that transform the fragment coordinates as they are on the fragment file(s), to the actual position of the fragments in the molecule.
cum nr of atomtypes
An array (0:fragmenttypes) that counts the number of atom types up to and including the indexed fragment type.
nr of atomtypes
Total number of atom types in the molecule. Must equal the last element of the ‘cum nr of atomtypes’ array
nr of dummy atomtypes
Similar, now counting only the atom types consisting of a dummy atom.
atomtype
Names (strings) of the atom types
mass
Atomic masses: array running over the atom types. Compare ‘fragment mass’.
charge
Similar as for ‘fragment charge’, but now the values per atom type.
cum nr of atoms
An array (0:atomtypes) that counts the number of atoms up to and including the indexed atom type.
nr of atoms
Total number of atoms. Must equal the last element of the array ‘cum nr of atoms’.
nr of dummy atoms
Total number of dummy atoms
atmcrd
Type of atomic coordinates in input: CART (Cartesian) or ZMAT (Internal).
kmatrix InputOrder
The connection matrix listing (and referencing) the atoms in the order as they were in the input file. This ordering aspect is significant because internally the program reorders the atoms and groups them together by atom type and fragment type. Hence it is relevant to know what ordering (input- or internal-) is assumed in data arrays.
zaxis
For each atom the direction of the local z-axis. Normally this is identical to the standard (0,0,1), but it may be different for analysis purposes. See the ‘z=’ option to the data records in the ATOMS block.
fragment and atomtype index
An integer array (natoms,2) that specifies for each atom the fragment and the atom type it belongs to.
atom order index
An integer array (natoms,2) that defines the re-ordering of atoms between the list in the input file and the internally used list (which is driven by fragment types, fragments, atom types; dummies come last). The internally used list can be derived from the printout of the fragments, early in the standard output.
kmatrix
The connection matrix using the internally applied ordering of atoms
xyz
Cartesian coordinates of the atoms, in the internally used ordering of atoms
xyz Inputorder
Similar, but now for the ordering of atoms as in the input file.
zmatrix
Internal (Z-matrix) atomic coordinates
zmatrix Inputorder
Internal coordinates in the input-order of atoms
Atomic Distances
Inter atomic distance matrix
ntyp
Number of atom types, not counting dummy atoms,
nqptr
A cumulative counting array, very similar to ‘cum nr of atoms’ Differences: it runs only over ‘ntyp’ atom types (not including dummy atoms) and its indexing as well as its values are shifted by one: nqptr(k) is the total number of atoms plus one, counting the atom types up to and including #(k-1)
nnuc
Total number of non-dummy atoms
qtch
Nuclear charges of the non-dummy atoms
qeff
Effective nuclear charges (subtracting charge for the frozen core shells) of the non-dummy atoms
nfragm
Total number of non-dummy fragments
nofrag_1
Integer array specifying for each non-dummy atom the fragment it belongs to.
nofrag_2
Integer array specifying for each non-dummy atom the fragment type it belongs to
nuclab
Names of the non-dummy atom types.

Section Fragments

(To be completed)

FragmentFile
Names of all used fragment files
FragRun Ident,Title
Job identification and title of each fragment run that is used in the current molecule

Section AtomTypes

(To be completed)

Section Properties

AtomCharge Mulliken
Atomic charges derived from Mulliken population analysis.
Dipole
Dipole moment in atomic units.
FragmentCharge Hirshfeld
Fragment charges derived from Hirshfeld analysis
AtomCharge_initial Voronoi
Atomic charges derived from Voronoi analysis for the initial (sum-of-fragments) charge density
AtomCharge_SCF Voronoi
Similar as the previous item, but now for the SCF density
Electrostatic Pot. at Nuclei
Coulomb potentials at the positions of the atoms, not including the contribution from the nucleus itself

Section Basis

Information about the (valence) basis set

nbset
The total number of basis ‘sets’, where a ‘set’ here means a Cartesian function set (3 for a p-type function, 6 for a d-type function, and so on), given by an entry in the ‘list-of-basis-functions’ in the data base file.
nbaspt
Cumulative number of basis sets (see previous variable, for ‘set’), on a per atom type basis. Only non-dummy atoms (type) are considered. nbaspt(k) is 1+nr-of-basis sets up to, but not including atom type #k
nqbas
Main quantum number of each basis set. A 1s function has nqbas()=1
lqbas
Angular momentum quantum number of each basis set. The current implementation of ADF supports only s, p, d,*and f* basis functions, so the allowed lqbas values are 0, 1, 2, and 3
alfbas
The exponential decay parameters of the STO functions in the basis set
basnrm
Normalization coefficients for the basis sets
naos
The total number of basis functions, counting all Cartesian polynomials and all copies of the functions on the atoms of the pertaining atom type
nbos
The total number of Cartesian basis functions, not counting the copies of the functions on the different atoms of the atom type: the functions are defined per atom type and are (for nbos) counted only once. The next few variables relate to lists of basis functions that run from 1 to nbos: all the Cartesian polynomials, but counting the function only once per atom type. Essentially, this means counting all functions with distinct characteristics (apart from their geometrical center).
nbptr
Index array of the nbos functions, where the entries are the cumulative numbers of functions (+1) up to, but not including the atom type. The size of the array is (ntyp+1): one plus the number of (non-dummy) atom types.
kx
Powers of x of the nbos Cartesian STO basis functions
ky
Powers of y of the nbos Cartesian STO basis functions
kz
Powers of z of the nbos Cartesian STO basis functions
kr
Powers of r of the nbos Cartesian STO basis functions
alf
Exponential decay factors of the nbos Cartesian STO basis functions
bnorm
Normalization factors for the nbos Cartesian STO basis functions
nprta
Consider a list of all (naos) Cartesian STO basis functions, including copies of the functions on all atoms of the same atom type. Build that list by first taking all true valence functions on all atoms (loop over atom types, inner loops over atoms, inner loop over basis sets of the atom type, inner loop over Cartesian polynomials for the function set), then all auxiliary core-orthogonalization functions (similar loop structure). nprta(i) gives the index in that list of function #*i*, where i corresponds to a similar list of all naos functions in which the core and valence subsets are not separated.
norde
An array that runs over the non-dummy atom types. Each element gives the maximum of the main quantum number for all STO basis and fit functions corresponding to that atom type.
lorde
As norde, but lorde applies to the angular momentum quantum numbers.

Section Core

Information about frozen core orbitals and the Slater-type exponential functions used to describe them.

nrcset
The number of STO function sets to describe the frozen core orbitals in the calculation. The array is sized (0:llqcor,1:ntyp). llqcor is the maximum l-value in core orbitals (3), ntyp is the number of non-dummy atom types.
nrcorb
An array (0:llqcor, 1:ntyp) specifying the number of frozen core orbitals per l-value and per non-dummy atom type.
ncset
The total number of core expansion STO function sets, not counting copies on all atoms, and not counting the Cartesian polynomials (1 value per p-set, et cetera)
ncorpt
Index array: 1 + cumulative number of core expansion sets up to, but not including, the indexed atom type. The array runs from 1 to ntyp+1
nqcor
Main quantum numbers for the core expansion sets
lqcor
Angular momentum quantum numbers for the core expansion sets.
alfcor
Exponential decay factors for the core expansion sets.
cornrm
Normalization factors for the core expansion sets.
ncos
Total number of core expansion functions, counting all copies on different atoms of each atom type, and counting all Cartesian polynomials.
nccpt
Index array: 1 + cumulative number of core orbitals, counting all copies on different atoms and all Cartesian (sub) functions.
ncptr
Similar, but applying to the STO core expansion functions.
ccor
All core expansion coefficients, which express the core orbitals in the core expansion functions. The array stores the expansion coefficient sequence for each core orbital shell (not for each Cartesian sub function) and only one sequence per orbital per atom type (no duplication for the different atoms of the atom type).
npos
An index array. For each atom type: the index where its data are stored on the TAPE12 core data file. npos(k) may be zero if no data for atom type #k are available on TAPE12.
kcos
The total number of core expansion functions, like ncos, but now counting only the truly independent functions. For instance: 5 functions per d-set, while in ncos there are 6 functions per d-set. The s-type combination in the 6-membered d-set is in the calculation projected out and does not represent a degree of freedom.
s
The (kcos,kcos) overlap matrix of the core expansion functions. Note that, since the dimension is (kcos,kcos), the s-type combination has been eliminated, and likewise for the 3 p-type functions in each f-set.
idfcor
Integer that indicates whether or not the core set contains d- and/or f-type functions. 1=yes, 0=no
nd
Total number of d-type core orbital sets (not counting the Cartesian sub functions)
nf
Total number of f-type core orbital sets (not counting the Cartesian sub functions)
ndorb
An array running over the d-type core orbital sets (loop over atom types, loop over atoms, loop over core orbitals with l*=2). It gives for each the index of the orbital (the first of the Cartesian subset) in the overall list of all core orbitals in the molecule (including the spurious *s-type functions in the d-sets, and so on)
nforb
Similar as ndorb, but now for the f-type core orbitals.
cmat
Overlap matrix between core-orbitals (ncos, counting all Cartesian functions including the s-type function in each d-set, et cetera), and the basis functions. In the list of basis functions, all core functions (the auxiliary orthogonalization functions) come before all true valence basis functions, see array NPRTA.

Section Fit

This section stores information about the fit functions, which are used for the Coulomb potential evaluation.

Unrestr.SumFrag
A logical that flags whether or not the fit coefficients have been set and stored for the sum-of-fragments, but adjusted for the unrestricted fragments option (see the keys UnrestrictedFragments, ModifyStartPotential).
coef_SumFrag
Fit coefficients pertaining to the sum-of-fragments charge density.
coef_SCF
SCF fit coefficients.
nfset
Total number of fit function sets (not counting the Cartesian sub functions, not counting the copies of the functions on the atoms of an atom type)
nfitpt
Index array: 1+the total number of fit function sets up to, but not including, the indicated atom type.
nqfit
Main quantum numbers of the fit sets
lqfit
Angular momentum quantum numbers of the fit sets
alffit
Exponential decay factors of the STO fit sets.
fitnmr
Normalization factors for the STO fit sets.
nfos
Total number of Cartesian fit functions, not counting copies on all atoms of an atom type, but including all (for instance, 6 for a d-set) Cartesian sub functions.
nfptr
Index array: 1+ total number of Cartesian (see variable nfos) fit functions, up to but not including the indicated atom type.
nprimf
Total number of Cartesian (‘primitive’) fit functions, counting also the copies on all atoms of each atom type.
nsfos
The total number of fully symmetric (A1 symmetry) fit function combinations that represent the true dimension (variational freedom) of the space of fit functions in the calculation.
na1ptr
Index array, like nfptr, but applying to the nsfos symmetric function combinations.
niskf
This refers to an atom-limited symmetry combination of primitive fit functions, in the code and some documentation indicated as a ‘g’. A ‘g’ is the specific part of a molecule-wide A1 fit function combination (see nsfos) that consists of all the terms that are centered on one particular atom. The number niskf gives the total number of such ‘g’ function combinations. To clarify this, consider an A1 fit function combination in the molecule. Assume, that it consists of a specific linear combination the following functions: a p-x function on atom A, its partner p-y function, and the corresponding p-x and p-y functions on atom B. (Atoms A and B must be symmetry equivalent). In this example we have one A1 function (in the list of nsfos such functions) and two ‘g’’s. Each ‘g’ consists of a p-x and a p-y function combination on a specific atom.
iskf
Compound index array. It runs over the niskf ‘g’ fit function combinations and has 4 entries for each function (1:4,1:niskf). The meaning of the entries is as follows. #1=number of the fit set (not counting the copies of fit functions on different atoms of an atom type, and not counting the Cartesian sub functions) this ‘g’ belongs to. #2=index where the combination coefficients for this ‘g’ start in the arrays cofcom and numcom (see next). #3=number of terms in the expansion of this ‘g’. #4=number of the molecular fit A1 function combination this ‘g’ belongs to.
na1cof
Length of the arrays numcom and cofcom, see next
numcom
Numcom (and cofcom) consists of a sequence of smaller sub arrays. Each sub array gives the expansion of a ‘g’ function in terms of the Cartesian functions in the pertaining fit function set. The elements of numcom specify the particular Cartesian sub functions that participate in the expansion. Its values are therefore limited to lie between 1 and (L+1)(L+2)/2, where L is the maximum l-value occurring in the fit function sets.
cofcom
Compare numcom: cofcom gives the actual expansion coefficients for the expression of a ‘g’ function in primitive Cartesian fit functions.

Section Num Int Params

Numerical integration parameters: the general precision parameter, but also more technical parameters used by the grid-generating modules.

method
Label of the method used to generate the grid. Usually: ‘polyhedra’
accint min
Minimum integration precision parameter. It is the lower bound of the range in which the value of the actual numerical integration precision parameter may vary.
accint max
Maximum value of the precision general parameter
accint
Actual value of the precision parameter. This variable governs by default almost all other integration parameters.
ldim
In fact, this a geometric parameter: the number of dimensions in which the system is periodic. For molecules this is zero.
PointChargeTypes
The number of point charges types used in the calculation. Point charges belong to a different point charge type if, and only if, their strengths are not equal.
accsph
The precision parameter that determines the (radial) integration grid in the atomic spheres
accpyr
The precision parameter that determines the general precision level of the grid in the atomic polyhedra
accout
The precision parameter that determines the general precision level of the grid in the outer region
accpyu
The precision parameter that determines the 1D grid along the first direction in the quadrangles and triangles of the bases of the atomic pyramids
accpyv
The precision parameter that determines the 1D grid along the second direction in the quadrangles and triangles of the bases of the atomic pyramids
accpyw
The precision parameter that determines the 1D radial integration in the atomic pyramids, between the atomic sphere surfaces and the pyramid basis
frange
Estimated maximum range of functions, to determine how far the integration grid has to extend outwards, away from the molecule
rspher
An array with the radii of the atomic sphere (a value per atom type)
rsph0
The smallest sphere radius
rsphx
The largest sphere radius
dishul
The distance between the innermost boundary planes, which separate the atomic pyramids from the outer region, and the surfaces of the outermost atoms
nouter
The number of intervals in which the outward (radial) integration in the outer region is broken up
outrad
The precision parameter that determines the outward radial integration in the outer region
outpar
The precision parameter that determines the 2D integrals in the outer region parallel to the boundary planes
linteg
An array with maximum angular momentum quantum numbers (one value per atom type), to determine the angular integration grid in the atomic spheres
lintgx
Maximum of linteg()
linrot
Angular momentum quantum number to determine the rotational integration parameter around the molecular axis (in linear molecules only)
ntyps
The number of atom types as seen by the numerical integration grid generator. This means in practice: the number of non-dummy atom types plus the number of point charge types.
nnucs
The number of atoms as seen by the numerical integration grid generator. This means in practice: the number of non-dummy atoms plus the number of point charges.
qatm
Nuclear charges for all ntyps atom types
nratst1
The numerical integration grid generator automatically determines the symmetry of the nuclear (nnucs atoms!) frame and then puts the atoms in sets of symmetry equivalent ones. nratst1() is an array (0:ntyps) that contains the cumulative number of atoms in the symmetry sets. nratst1(k) is the total number of atoms in the sets up to and including set #k
xyzatm
Cartesian coordinates of the atoms.
linteg all
Similar to array linteg(), extended to include also the point charge types
npowx
Maximum power of the radial variable r, in the set of test functions that the grid generator uses to tune the grid
alfas
An array that stores the exponential decay factors of all test functions, ordered by atom type and by the power of the radial variable r.

Section Symmetry

Symmetry related data.

nogr
The number of symmetry operators in the point group used in the calculation. NB, for the special cases of infinite symmetries, only the operators corresponding to finite elements are counted. Therefore, ATOM has nogr=1 (only the unit operator); C(LIN) has nogr=1, D(LIN) has nogr=2.
faith
An array that stores all the (3,3) symmetry operator matrices in the real space representation
nsetat
The number of sets of symmetry equivalent atoms under the used symmetry
napp
An array that stores for each atom the number of the symmetry set it belongs to
notyps
An array that stores for each set of symmetry equivalent atoms, the atom type to which the set belongs
noat
Map between the normal list of atoms and the symmetry sets. When you loop over the symmetry sets and, inside, loop over the atoms in each set, you thereby run over the index of noat(). The value points to the position of that atom in the original (not set-ordered) list.
ntr
An array (nogr,nnuc) that stores for the each atom A and each symmetry operator R, the atom onto with A is mapped by R. The row index runs over all symmetry operators, the column index over the atoms.
npeq
The number of symmetry unique pairs of atoms
jjsym
An array that runs over the npeq sets of symmetry equivalent atom pairs. Its value gives for the indicated set the index of a (c.f. the first) atom pair in that set.
jasym
An array that runs over the npeq sets of equivalent atom pairs. Its value gives for the indicated the set the number of pairs in that set.
ja1ok
An array (1:npeq), with values 0 or 1. 1=the pair density can be fitted using A1 fit functions only. 0=all fit functions (on the involved atoms) are to be used. The value 1 may arise because of symmetry properties, or because the distance between the atoms is so large that the inaccuracy from using only A1 fit functions can be neglected.
ntr_setat
A condensed variety of array ntr: the columns are not the atoms, but the nsetat sets of symmetry equivalent atoms. The value is the index of the atom, onto which a representative (c.f. the first) atom of the indicated symmetry set is mapped by the given symmetry operator.
igr
A code that fixes, together with nogr and ngr, the point group symmetry. See the header of routine adf/maisya for a list
ngr
One of the code components that fix the symmetry group. See routine adf/maisya
grouplabel
Schönfliess symbol as used in ADF
nsym
The number of symmetry representation (including subspecies) used in the calculation.
norb
For each of the nsym representations the number of basis function combinations (SFOs) that belong to it.
nfcn
For each of the nsym representations the number of primitive atom centered basis functions that participate in the representation.
ncbs
For each of the nsym representations the number of core orthogonalization functions that participate in the representation.
jsyml
For each of the nsym representations: if it belongs to a one-dimensional irrep, the value is 1, otherwise: for the first subspecies in the irrep the value is the dimension of the irrep, for the other subspecies in the same irrep the value is 0
symlab
For each of the nsym representations the label (string) of the representation
norboc
An array (-2:2,nsym). The column runs over the symmetry representations. The positive row indices (1,2) specify for spin-A and spin-B (the latter only if the calculation is spin-unrestricted), the highest non-empty orbital. The negative indices (-1,-2) specify for spin-A and spin-B (if the unrestricted fragment option is used) the total number of non-empty SFOs. The zero row index specifies the number of non-empty SFOs, before applying any fragment occupation changes.

Section Spin_orbit

(To be completed)

Section Energy

XC energies
16 elements of an array enxc(2,2,4): exchange-correlation energies of various charge densities: first index: 1=exchange term, 2=correlation term second index: 1=lda tern, 2=gga term third index: 1=energy of fragments (summed over fragments), 2=energy of sum-of-fragments density, 3=energy of orthogonalized fragments, 4=SCF.
Pauli TS Correction (LDA)
Correction to the ‘Transition State’ method to compute terms in the bonding energy, in this case the Pauli exchange energy term. The Pauli TS Correction is not separately printed in the standard output file, but included in the Pauli interaction term.
Pauli FitCorrection
The first-order correction to the Pauli exchange interaction term, for the error in the Coulomb energy due to the fit incompleteness. This correction term is not printed in the output file but included in the Pauli interaction term
Elstat Core terms
An obsolete variable, not used in the energy computation
Elstat Fitcorrection
The first-order correction to the electrostatic interaction term (putting the fragments together, without any relaxation of Pauli orthogonalization), for the error in the Coulomb energy due to the fit incompleteness
Orb.Int. FitCorrection
The first-order correction to the electrostatic interaction term in the SCF relaxation energy (Orbital Interactions), for the error in the Coulomb energy due to the fit incompleteness. This term is not printed (anymore) separately, but incorporated in the symmetry-specific interaction terms.
Orb.Int. TSCorrection (LDA)
The difference between the representation-specific orbital interaction terms added, and a straightforward computation of the SCF relaxation energy is the result of the neglect of higher order terms in the Taylor expansion that underlies the ‘Transition State’ method. This difference, therefore, corrects exactly this neglect. It is not printed separately anymore in the output, but incorporated in (distributed over) the representation-specific orbital interaction terms.
Ebond due to Efield
Bond energy term due to any homogeneous electric field
Corr. due to Orthogonalization
For analysis purposes, the concept of ‘orthogonalized fragments’ has been introduced and the bonding energy is split in a part that describes the difference between the sum-of-fragments situation and the orthogonalized-fragments density at the one hand, and the SCF relaxation (from the orthogonalized fragments density) at the other. Both terms contain a first order fit correction term. The result of adding the two parts is not identical to computing the total bonding energy directly and applying the first order correction to that approach. The difference is given by this term, which therefore corrects for the additional second order fit errors caused by using the orthogonalized fragments split-up
SumFragmentsSCF FitCorrection
The ‘true’ first order fit correction for the complete bonding energy, resulting from a direct calculation that takes the sum-of-fragments as starting point and the SCF as final situation, without the intermediate step of orthogonalized fragments.
Pauli Efield
The contribution to the Pauli interaction energy due to any electric field
Orb.Int. Efield
The contribution to the SCF relaxation energy (orbital interactions) due to any electric field
Electrostatic Interaction
The electrostatic interaction energy including any first order fit correction (if computed from the fit density)
Pauli Total
The Pauli exchange (orbital orthogonalization) interaction energy
Steric Electrostatic
INCORRECT. Do not use. The electrostatic interaction energy including any first order fit correction (if computed from the fit density)
Steric Total
The total steric interaction energy, consisting of the electrostatic and the Pauli interactions
Orb.Int. *Irrep*
Irrep stands for one of the irreps of the point group symmetry. The value gives the orbital interaction (SCF relaxation) term for that symmetry representation
Orb.Int. Total
The total orbital interaction energy
SCF Bond Energy
Total bonding energy
elstat
INCORRECT. Do not use. Electrostatic interaction energy. Same as the ‘Electrostatic Interaction’ variable in this section
Bond Energy
Total bonding energy, same as the ‘SCF Bond Energy’ variable
Pauli Kinetic
Kinetic energy term in the Pauli exchange interaction energy
Pauli Coulomb
Coulomb energy term in the Pauli exchange interaction energy
Pauli Kinetic+Coulomb
Sum of the kinetic and Coulomb terms in the Pauli exchange interaction energy

Section Point_Charges

NumberofPointCharges
The total number of point charges used
PointCharges
The array with point charge values: (4,np), where np is the number of point charges and the 4 components are, respectively, the x y z components and the strength.

Section GeoOpt

Optimization data.

Where references are made to the list of atoms, the atoms are assumed to be in internal order. This may be different from the input-list of atoms.

nfree
number of independent optimization variables
idfree
indices (3,nr-of-atoms) for all atomic coordinates referring to the optimization variables (values 1..nfree) and/or LinearTransit parameters (values nfree+k, k being the k-th LT parameter). A zero value means that the coordinate is frozen.
all freedoms
A logical the flags whether or not all fundamental degrees of freedom in the system are allowed to vary. This is not the case when constraints are applied.
Gradients
The most recent values for the derivatives of the energy with respect to the atomic coordinates (cartesian or z-matrix, depending on the type of optimization variables).
Displacements
The most recent step executed for the atomic coordinates (optimization variables)
kmatrix
The connection matrix.
Hessian_CART
The Hessian matrix (second derivatives) as a n*n matrix, in the Cartesian coordinates representation. Note that the reduced storage mode (typically, Fortran upper-triangular) is not applied.
Hessian_ZMAT
Same, but now in the internal coordinates representation
Hessian inverted_CART
The inverted Hessian, in Cartesian coordinates
Hessian inverted_ZMAT
Likewise, in internal coordinates

Note: in most cases only one, or maybe two of the Hessian cases are present on TAPE13. They can be transformed into each other quite easily. The order of atoms is the same as in the input.

xyz old
cartesian coordinates at previous geometry cycle
zmatrix old
idem for internal coordinates

Section TS

Information about the Transition State search

modtrc
Defines the initial search direction. Positive value n: the n-th Hessian eigenvector (default:1). Negative value n: the Hessian eigenvector with the largest (absolute value) component in the n-th optimization variable
itrace
Index of the Hessian eigenvector that is being followed
neghes
The assumed number of negative eigenvalues of the Hessian at the Transition State. Should be 1: searches for higher-order transition states are not supported.
mode to follow
Direction vector in atomic coordinates (Cartesian or Z-matrix, depending on the variable geocrd) that corresponds to the current estimate of the unique Hessian eigenvector with negative eigenvalue

Section LT

Information about the Linear Transit calculation

nr of points
The total number of LT points to be computed.
current point
Index of point that is currently computed
Energies
Energy values in the LT points
Dipole
Dipole moments in the LT points
Parameters
LT parameters, initial and final values (along the path, the values are obtained by even-spaced linear interpolation)
atmcrd
ZMAT if a Z-matrix structure (connection matrix) is available. CART otherwise. Used for printing
geocrd
Type of coordinates to optimize and scan along the path (CART or ZMAT)
xyz
Cartesian coordinates in the LT points (3,natoms,nlt)
zmatrix
Internal coordinates in the LT points
AtomCharge Mulliken
Mulliken atomic charges in the LT points
FragmentCharge Hirshfeld
Hirshfeld fragment charges in the LT points
AtomCharge_initial Voronoi
Voronoi atomic charges corresponding to the sum-of-fragment densities in the LT points
AtomCharge_SCF Voronoi
Voronoi atomic charges corresponding to the SCF densities in the LT points

Section IRC

This section contains general information about the IRC (Intrinsic Reaction Coordinate) calculation. Details of the computed reaction path are in sections IRC_Forward and IRC_Backward.

atmcrd
ZMAT is a Z-matrix structure (connection matrix) is available. CART otherwise
geocrd
CART or ZMAT: the type of coordinates to change, optimize and trace
PointStatus
A string status variable of the current IRC point. Value can be ‘DONE’ (if the point has been computed), ‘EXEC’ if its computation has not yet finished.
nfree
Number of optimization coordinates that can be varied. See section GeoOpt
idfree
(3,natoms) pointers to the optimization variables for each of the atomic coordinates. A zero means: frozen by constraint
xyz
Cartesian coordinates
kmatrix
Connection matrix, if a Z-matrix structure is available
zmatrix
Internal coordinates
Energies
Energy at the Transition State
Dipole
Dipole moment at the Transition State
Gradients
Computed energy gradients at the (assumed) Transition State (should be very small)
AtomCharge Mulliken
Mulliken atomic charges, for the TS geometry
AtomSpinDen Mulliken
Atomic spin densities (Mulliken) at the TS
AtomCharge_initial Voronoi
Voronoi atomic charges at the TS, from the sum-of-fragments density
AtomCharge_SCF Voronoi
Similar, for the SCF density
modtrc
Defines the start direction for the IRC path. A positive value n selects the n-th eigenvector of the Hessian. A value -1 selects the gradient vector (which must then, of course, not be exactly zero). A value -2 specifies that the start direction is specified in the input file.
step
Step length (in mass-weighted metric) between successive points of the IRC path.
stepMin
The minimum value for the step
stepMax
The maximum value for the step
Hessian inverted_ZMAT
Inverse Hessian in internal coordinates.
lfree
The number of independent optimization step directions (for the restricted optimization orthogonal to the IRC path.
vfree
Direction vectors (3,natoms,lfree) for the independent optimization directions
GradientVector
The current gradient vector (during optimization)

Section IRC_Forward

Information about the ‘forward’ IRC path. The choice, which direction down from the Transition State is forward or backward is arbitrary. By definition, in ADF the forward direction is in the positive direction along the first Hessian eigenvector, for which the sign convention is that the largest coefficient is positive.

PathStatus
Status (string) variable for the ‘forward’ half of the IRC path. May be ‘EXEC’, or ‘DONE’, ‘UNKNOWN’, ‘WAIT’, ‘OFF’
PointStatus
Status variable for the current point at the ‘forward’ path. May be ‘DONE’, ‘EXEC’
nset
Size of arrays to store data in the IRC points along the path. Will be increased when too small
pivot
Coordinates of the current pivot point
xyz
Cartesian coordinates of the IRC points (3,natoms,nset)
zmatrix
Internal coordinates of the IRC points (3,natoms,nset)
Path
Lengths measures in mass-weighted metric along the path to the IRC points
Curvature
Local curvature values of the path at the IRC points
Energies
Energy values at the IRC points
Gradients
Energy gradients at the IRC points (one value: the gradient along the path. The orthogonal components are presumably zero)
Dipole
Dipole moments at the IRC points
AtomCharge Mulliken
Mulliken atom charges at the IRC points
FragmentCharge Hishfeld
Hirshfeld fragment charges at the IRC points
AtomCharge_initial Voronoi
Voronoi atomic charges at the IRC points, corresponding to sum-of-fragments densities
AtomCharge_SCF Voronoi
Voronoi atomic charges at the IRC points, corresponding to the SCF densities
CurrentPoint
Integer index of the current IRC point (in the set of nset points)
step
Current step length

Section IRC_Backward

All entries in this section match those in the section IRC_Forward. Of course, here they refer to the other half of the IRC path.

Section Freq

This section contains information about (progress) of the Frequencies calculation and results.

kountf
An integer counter that keeps track of how many geometric displacements have been carried out to scan the potential energy surface around the equilibrium
nraman
Integer to flag whether or not Raman intensities are computed
numdif
Integer to determine the type of numerical differentiation (of gradients, to get the second derivative): 1=one-sided, 2=two-sided displacements.
disrad
Size of displacements of Cartesian coordinates or bond lengths (in case of displacements in internal coordinates)
disang
Size of displacements of angular coordinates
geocrd
Type (string) of coordinates to displace: CART or ZMAT
atmcrd
ZMAT if a z-matrix structure is available. This determines printed output but does not affect the computation. Compare the variable geocrd
nfree
The number of degrees of freedom
idfree
An array (3,natoms) that stores for each atomic coordinates (Cartesian or internal, depending on geocrd) the number of the (1..nfree) variational freedom it corresponds to. If zero, the coordinate is frozen by constraint.
xyz
Cartesian coordinates of the equilibrium geometry
kmatrix
Connection matrix that defines a Z-matrix
zmatrix
The Z-matrix variable values of the equilibrium geometry
all freedoms
Logical: true if all atomic coordinates are allowed to be displaced, not restricted by constraints.
nr of atoms
The total number of atoms, including dummy’s
rigids
Vectors of rigid motion directions, expressed in the atomic coordinates (3,natoms,6)
Dipole previous
The dipole moment of the previous geometry. This is used to compute dipole derivatives by numerical differentiation. The ‘previous’ geometry is the equilibrium geometry in case of one-sided displacements.
Dipole
The dipole moment corresponding to the current geometry
Dipole derivatives
The matrix of dipole derivatives with respect to atomic displacements
Polbty previous
The polarizability tensor (6 elements, triangular representation) of the ‘previous’ geometry. See the remarks about the dipole moment
Polbty
The polarizability tensor corresponding to the current geometry
Polbty derivatives
The matrix of derivatives (w.r.t. the atomic coordinates) of the polarizability tensor
Gradients
The energy gradients corresponding to the current geometry
Gradients previous
The energy gradients of the ‘previous’ geometry. See the remarks about ‘previous’ dipole moment
Force constants
The matrix of force constants (second derivatives), built up during the frequencies calculation.
xyz displaced
The Cartesian coordinates of the current (displaced) geometry
zmatrix displaced
Internal coordinates of the current (displaced) geometry
Dipole derivatives_CART
Dipole derivatives with respect to Cartesian coordinate changes
Hessian_CART
The Hessian matrix in Cartesian coordinates, computed at the end, when the construction of the ‘Force constants’ has been completed.
Frequencies
An array with harmonic frequencies.

Sections Ftyp n

n is an integer. All such sections give general information about fragment type #n, and more specifically about the ADF calculation that produced the corresponding fragment file.

jobid
Job identification of the fragment run
title
Title of that calculation
nsym
Number of symmetry representations (subspecies) used
norb
For each representation the size of the Fock matrix (variational degrees of freedom)
bb
Labels of the subspecies
igr
(Partial) code for the point group symmetry
ngr
(Partial) code for the point group symmetry
grouplabel
Schönfliess symbol of the point group symmetry (of the fragment calculation)
nfcn
An array over the representation: for each subspecies the number of primitive STO basis functions that participate in that subspecies
jsyml
An array (1:nsym). Value 1 means that the corresponding subspecies belongs to a 1D irrep. A value larger than 1 means a correspondingly higher dimensionality of the irrep and indicates that that subspecies is the first in that irrep. A value 0, finally, means that it is not the first subspecies in its irrep.
nfrag
Number of fragments used in that fragment calculation
natom
Number of atoms in the fragment
naos
Number of primitive atomic basis functions
nrat 1
Maps the atoms of this fragment (the ‘1’ signals the first fragment of this type) onto the list of all atoms
rotfrg
Rotation matrix to map the fragment coordinates as they are on the fragment file onto their actual orientation in the molecule
nsot
Total number of MO degrees of freedom, summation over all subspecies
nmis
The number of symmetry representations that could not be spanned by the basis set
mis
Indices of the missing symmetry representations

Sections Ftyp n?

n stands for the n-th fragment type. The ? stands for one of the symmetry representations (of the point group symmetry used in the fragment calculation)

froc
MO occupation numbers for the MOs in this subspecies
eps
Orbital energies When they result from a ZORA calculation, the non-scaled values are stored on file (the scaled values are printed in the standard output file).
eigvf
Fragment MO eigenvectors, expressed in all the primitive atomic orbitals of the fragment.
nsos 1
Total number of MOs in this subspecies: size of variational problem
nbas 1
Number of primitive atomic basis functions that participate in this subspecies
npart 1
Indices that give for each of the nbas functions, the number of the basis function in the list of all basis functions
FO 1
The fragment MOs (nbas*nsos coefficients)
nocc 1
Number of non-empty orbitals

Section Freq Symmetry

Information about the true (possibly input-specified) symmetry of the equilibrium geometry (in a frequencies calculation). The displaced geometries may loose symmetry. Therefore, the program uses NOSYM symmetry, internally, for a frequencies calculation. The ‘true’ symmetry of the system is used for analysis purposes.

nr of operators
Number of symmetry operators used
operators
(3,3) matrices of the operators
nr of symmetries
Number of subspecies
symmetry labels
Names of the subspecies
atom indices
List of indices to map the symmetry-ordered atoms (loop over symmetry sets, loop over atoms in each set) to the ‘normal’ list of all atoms
nr of atomsets
Number of sets of symmetry equivalent atoms
atom mappings
Integer array that provides mapping (back and forth) between the atom list in the input file and the internally used list, which is atom type driven
atomset indices
The number of atoms in each of the sets of symmetry equivalent atoms
nr of displacements_X
(X must be one of the symmetry representations.) The number of symmetry-combined atomic displacements that transform as X
degeneracy_X
Degeneracy of X
displace_X
The actual displacement direction vectors (3,natoms,N). N is the number of symmetry displacements for X.
nr of rigids_X
The number of rigid motion direction vectors that transform as symmetry representation X
displ_InputOrder_X
The displacement vectors, but now expressed in the atomic coordinates using the ordering of atoms in the input file
NormalModes_X
Harmonic frequency normal modes in representation X
Frequencies_X
The harmonic frequency values
IR intensities_X
The infrared intensities

Sections X

X stands here for the label of a subspecies of the point group symmetry, for instance A1. Depending on the point group symmetry, there may be many such sections, each corresponding to one of the subspecies. All such sections have an identical structure.

nmo_A
The number of MOs with spin-A, for which the coefficient vectors are calculated. During the SCF this may be severely reduced, at the end it is usually the complete basis in the pertaining symmetry representation.
nmo_B
Similar for spin b. This variable is not present in a restricted calculation.
SFO
The definition of the SFOs in the representation, consisting of expansion coefficients in terms of the primitive atomic STO basis functions
frocf
The occupation numbers of the SFOs in this representation
npart
A list of indices of the bas functions that are used in this symmetry representation
froc_A
The occupation numbers of the MOs in the representation, for spin-A
froc_B
Similar for spin-B, if a spin-unrestricted calculation is performed
smx
Overlap matrix between core functions and SFOs
frocor
SFO occupation numbers
Orth-Bas
The orthogonalized fragment orbitals in the BAS representation.
Low-Bas
The Lowdin orbitals in the BAS representation: the matrix to transform the MOs from Lowdin representation (orthonormalized SFOs) to the BAS representation
Eigen_Bas_A
mo expansion coefficients in the bas representation for all nmo_A orbitals. The coefficients run over all bas functions indicated by npart
Eigen_Bas_B
Similar for spin-B, if present
eps_A
The orbital energies for the nmo_A orbitals of spin-A When they result from a ZORA relativistic calculations, the non-scaled values are stored on file. (The scaled energies are printed in standard output.
eps_B
Similar for spin-B, if present
Eig-CoreSFO_A
MOs expressed in SFOs, for spin-A MOs
Eig-CoreSFO_B
Similar for spin-B

Sections Atyp n X

Each such section contains the (core- and possibly also valence-) radial density and potential of one particular atom type. X is the atom type label and n is an index running over all atom types in the calculation. The list of all atom types is printed on standard output in the early geometry section.

The radial densities and potentials may be represented as simple tables - a sequence of values for r, the distance to the nucleus, and the corresponding density or potential - or as a piecewise expansion in Chebyshev polynomials over a sequence of intervals (r1,r2).

The core density and potential have been constructed from the Frozen Core orbitals, which are defined in the section Core. If a TAPE12 (corepotentials) file has been attached to the calculation the core data is read off from that TAPE12 and stored also.

rx val
Maximum r-value for which the valence density is non-negligible
nrint val
Number of intervals for piecewise expansion of the valence density in Chebyshev polynomials
rup val
Arrays (1..nrint) of upper bounds of the intervals. The lower bound of the first interval is zero
ncheb val
Array (1..nrint) with the number of expansion coefficients for each interval
ccheb val
Coefficients of the expansion. All coefficients, for all intervals, are stored contiguously in one linear array. The parts pertaining to a particular interval are determined by using the arrays ncheb()
nrad
Number of points used in the direct tabular representation of the atomic densities and potentials
rmin
The first r-value of the table: the radial grid is defined by a first value (rmin), a constant multiplication factor defining rk+1 w.r.t. rk (rfac, see next), and the total nr of points (nrad).
rfac
The multiplication factor of the radial grid
valence den
The valence density, in a table of nrad values.
valence pot
Similar for the Coulomb potential of the density, including a nuclear term Q/r, such that the long-range monopole term in the potential is zero
qval
The number of electrons contained in the valence density
rx core
Maximum r-value for which the core density is non-negligible
nrint core
Number of intervals for piecewise expansion of the core density in Chebyshev polynomials
rup core
Arrays (1..nrint) of upper bounds of the intervals. The lower bound of the first interval is zero
ncheb core
Array (1..nrint) with the number of expansion coefficients for each interval
ccheb core
Coefficients of the expansion. All coefficients, for all intervals, are stored contiguously in one linear array. The parts pertaining to a particular interval are determined by using the arrays ncheb()
qcore
The number of electrons contained in the core density
core den
The core density, in a table of nrad values.
core pot
Similar for the Coulomb potential of the density, including a nuclear term Q/r, such that the long-range monopole term in the potential is zero

Section LqbasxLqfitx_xyznuc

This section will be removed again in the future. Temporarily it serves to transfer data from the calling program to the grid generator.

lqbasx
An array with for each atom type the maximum angular moment quantum number in the basis functions for that type
lqfitx
An array with for each atom type the maximum angular moment quantum number in the fit functions for that type
xyznuc
Cartesian coordinates of the non-dummy atoms

Section GenptData

This section will be removed in the future. It serves, temporarily, to transfer data from the calling program to the numerical integration grid generator. Most of the entries here occur also in other sections but are packed together as replacement for previous common block structure.

numint
Integer code for the type of integration grid. Usual value: 2 (polyhedra method)
iexcit
Integer flag for excitations (response) calculation
lpolar
Integer flag for polarizability (response) calculation
ldim
Number of dimensions of periodicity
mdim
Dimensionality of the molecule, for instance a linear molecule has mdim=1
r0mult
A technical parameter that sets the radius outside which the multipole part of the fit coulomb potential functions is separated (from the exponentially decaying part), for separate treatment in the evaluation of the molecular coulomb potential.
avec
(3,3) matrix with lattice vectors. Only the (ldim,ldim) sub matrix is significant.
bvec
Inverse of avec (apart from a factor of 2 pi): lattice vectors in reciprocal space.
ngimax
Maximum number of geometry optimization iterations
llbloc
Block length determination parameter (maximum)
ipnbl
Number of integration blocks processed by the current process
nbleqv
The number of symmetry equivalent blocks to each symmetry unique block of points. This value is 1 if any equivalent blocks are not constructed and used.
ngmax
The number of integration points, accumulated over all parallel processes
nblock
The number of integration blocks
lblock
The block length
lblx
An upper bound of the block length applied during the computation of the block length
nmax
The number of integration points generated by this process
twopi
Value of the constant 2 $$\pi$$
fourpi
Value of the constant 4 $$\pi$$

Section Multipole matrix elements

Information in a response calculation

dipole elements
The matrix elements of the 3 dipole operator components between occupied and virtual orbitals: outer loop over the operators (in order: y, z, x), loop over virtual MOs, inner loop over occupied MOs
quadrupole elements
Similar as for dipole. Order of operators: $$\sqrt{3}$$ *xy $$\sqrt{3}$$ *yz z2-(x2+y2)/2 $$\sqrt{3}$$ *xz $$\sqrt{3}$$ *(x2-y2)/2
octupole elements
Similar as for dipole and quadrupole. Order of operators: $$\sqrt{10}$$ *y*(3*x2-y2)/4 $$\sqrt{15}$$ *xyz $$\sqrt{6}$$ *y*(4*z2-x2-y2)/4 z*(z2-3(x2-y2)/2) $$\sqrt{6}$$ *x*(4*z2-x2-y2)/4 $$\sqrt{15}$$ *z*(x2-y2)/2 $$\sqrt{10}$$ *x*(x2-3y2)/4
hexadecapole elements
Similar as for dipole and quadrupole. Order of operators: $$\sqrt{35}$$ *xy*(x2-y2)/2 $$\sqrt{70}$$ *z*(3x2y-y3)/4 $$\sqrt{5}$$ *xy*(6z2-x2-y2)/2 $$\sqrt{10}$$ *(4yz3-3yz*(x2+y2))/4 (8z4-24*z2*(x2+y2)+3(x4+2x2y2+y4))/8 $$\sqrt{10}$$ *(4xz3-3xz*(x2+y2))/4 $$\sqrt{5}$$ *(x2-y2)*(6z2-x2-y2)/4 $$\sqrt{70}$$ *z*(x3-3xy2)/4 $$\sqrt{35}$$ (x4-6x2y2+y4)/8

Section Irreducible matrix elements

Information in a response calculation

irreducible dipole elements
The dipole matrix elements between occupied and virtual MOs, as in the section Multipole matrix elements. Here, however, the matrix elements are ordered by symmetry representations and ‘symmetry zeros’ are omitted. The stored arrays, however, have the same size as in the previous section. See the implementation for details about the storage of this data. (Directory \$ADFHOME/adf/response/)
irreducible quadrupole elements
Similar as for the dipole elements
irreducible octupole elements
Similar as for the dipole elements
irreducible hexadecapole elements
Similar as for the dipole elements

Section ETS

Technical data used in the ets procedure.

nff
Size of array ncspt (next)
ncspt
Pointer array to find, for each atom type, the first element corresponding to that atom type’s section in the arrays ncsett, alfcst, and cfcset, see below
ncs
Size of the matrices ncsett, alfcst, and cfcset, see below
ncsett
Build a list of products of core orbital expansion functions, taking only the one-center products and looping over the atom types (not the atoms). ncsett stores the powers of the radial variable r for the products (from the main quantum numbers, one subtracted). A product of a 1s and a 2p yields ncsett()=1
alfcst
Similar as ncsett: the sum of the exponential decay factors of the factor functions
cfcset
The density matrix corresponding build from the frozen core orbitals (all atom types, but no copies for the distinct atoms of a type), in the representation of the core orbital expansion functions. Stored are, per atom and per l-value (0..3) the upper-triangles of the corresponding density matrices, one after the other, all in cfcset
nnuc
The number of (non-dummy) nuclei
qcore
For each atom the number of electrons summed over its core orbitals, resulting from analytical integration of the core orbital expansions in STO core expansion functions.

## Using Data from TAPE21¶

An ASCII dump of TAPE21 (complete or partial) can be obtained with the kf utility dmpkf, see the utilities document. Alternatively you may build your own small program to extract any required information, using the KF library routines in the ADF package. Consult the KFS documentation for a description of this software.

### Representation of functions and frozen cores¶

adf uses the cartesian representation for the spherical harmonics part in functions:

f(x,y,z)=xaybzcrde-ar

The angular momentum quantum number l is then given by l=a+b+c, and the main quantum number n = l +d+1.

There are (l + 1)(l + 2)/2 different combinations of (a, b, c) for a given l - value, rather than (2 l +1). The excess is caused by the presence of spurious non-l Functions in the set; a Cartesian d-set for instance consists of six functions, five of which are true d-functions while one linear combination is in fact an s-type function (x2+y2+z2). Only the five true d-combinations are actually used as degrees of freedom in the basis set, but lists of primitive basis functions (bas) for instance run over all Cartesian functions including the improper ones.

A function set in ADF is characterized by the quantum numbers l and n, and by the exponential decay factor a. A set thus represents (l +1)(l +2)/2 Cartesian functions and (2 l+1) degrees of freedom.

The atomic frozen core orbitals are described as expansions in Slater-type functions; these are not the functions of the normal basis set but another set of functions, defined on the data files you use in Create mode.

Orthogonality of the valence space to the frozen core states is enforced as follows: for each frozen core shell (characterized by the quantum numbers l and n: all orbitals with m = - l ... + l are identical apart from rotation in space) the set of valence basis functions is augmented with a so-called core orthogonalization function set. You may conceptually interpret the core orthogonalization functions as single zeta expansions of the true frozen core states. Each of the normal valence basis functions is now transformed into a linear combination of that valence function with all core orthogonalization functions, where the coefficients are uniquely defined by the requirement that the resulting function is orthogonal to all true core functions.

So the list of all Cartesian basis functions is much larger than the degree of freedom of the basis: it contains the spurious non-l combinations and it contains also the core orthogonalization functions.

### Evaluation of the charge density and molecular orbitals¶

TAPE21 contains all the information you need to evaluate the charge density or a Molecular Orbital (MO) in any point in space. Most of the information is located in section Basis:

A list of function characteristics (kx,ky,kz,kr,alf), including the core orthogonalization functions. This list does not run over all bas functions used in the molecule: if a particular function is used on the atoms of a given atomtype, the function occurs only once in the list, but in the molecule it occurs as many times as there are atoms of that type.

With array nbptr you locate the subsections in the function list that correspond to the different types of atoms: for atom type i the functions nbptr(i)...nbptr(i+1)-1. The distinct atom types are listed in an early section of the standard output file.

Array nqptr gives the number of atoms for type i: nqptr(i+1)-nqptr(i). With this information you construct the complete list of all functions. Repeat the subsection of type i as many times as there are atoms of that type: the complete list can be considered to be constructed as a double loop, the outer being over the atom types, the inner over the atoms that belong to that type. The total ‘overall’ list of functions you obtain in this way contains naos functions. Note that in this way we have implicitly also defined a list of all atoms, where all atoms that belong to a particular atom type are contiguous. This list is the so-called ‘internal’ atom ordering, which may not be identical to the order in which atoms were specified in input, under atoms.

For a given symmetry representation (Sections S) the array npart gives the indices of the basis functions in the overall list that are used to describe orbitals in this representation. In case of an unrestricted run the array npart applies for either spin: the same basis functions are used; the expansion coefficients for the molecular orbitals are different of course.

In the symmetry-representation sections Eigen_bas gives the expansion coefficients that describe the MOs. The expansion refer to the functions indicated by npart, and the function characteristics are given by the arrays kx,ky,kz,kr,alf, and bnorm, i.e. the expansion is in* normalized*functions.

The value of an MO is now obtained as a summation of values of primitive basis functions. For the evaluation of any such basis function you have to take into account that its characteristics are defined in the local coordinate system of its atom.

To obtain the charge density you sum all MOs, squared and multiplied by the respective occupation numbers (array froc in the appropriate irrep section).

Note that the auxiliary program densf, which is provided with the ADF package, generates orbital and density values on a user-specified grid. See the utilities document.


text:
# gelnet.ker: Kernel models for linear regression, binary classification... In gelnet: Generalized Elastic Nets

## Description

Infers the problem type and learns the appropriate kernel model.

## Usage

 1 2 3 gelnet.ker(K, y, lambda, a, max.iter = 100, eps = 1e-05, v.init = rep(0, nrow(K)), b.init = 0, fix.bias = FALSE, silent = FALSE, balanced = FALSE)

## Arguments

 K n-by-n matrix of pairwise kernel values over a set of n samples y n-by-1 vector of response values. Must be numeric vector for regression, factor with 2 levels for binary classification, or NULL for a one-class task. lambda scalar, regularization parameter a n-by-1 vector of sample weights (regression only) max.iter maximum number of iterations (binary classification and one-class problems only) eps convergence precision (binary classification and one-class problems only) v.init initial parameter estimate for the kernel weights (binary classification and one-class problems only) b.init initial parameter estimate for the bias term (binary classification only) fix.bias set to TRUE to prevent the bias term from being updated (regression only) (default: FALSE) silent set to TRUE to suppress run-time output to stdout (default: FALSE) balanced boolean specifying whether the balanced model is being trained (binary classification only) (default: FALSE)

## Details

The entries in the kernel matrix K can be interpreted as dot products in some feature space φ. The corresponding weight vector can be retrieved via w = ∑_i v_i φ(x_i). However, new samples can be classified without explicit access to the underlying feature space:

w^T φ(x) + b = ∑_i v_i φ^T (x_i) φ(x) + b = ∑_i v_i K( x_i, x ) + b

The method determines the problem type from the labels argument y. If y is a numeric vector, then a ridge regression model is trained by optimizing the following objective function:

\frac{1}{2n} ∑_i a_i (z_i - (w^T x_i + b))^2 + w^Tw

If y is a factor with two levels, then the function returns a binary classification model, obtained by optimizing the following objective function:

-\frac{1}{n} ∑_i y_i s_i - \log( 1 + \exp(s_i) ) + w^Tw

where

s_i = w^T x_i + b

Finally, if no labels are provided (y == NULL), then a one-class model is constructed using the following objective function:

-\frac{1}{n} ∑_i s_i - \log( 1 + \exp(s_i) ) + w^Tw

where

s_i = w^T x_i

In all cases, w = ∑_i v_i φ(x_i) and the method solves for v_i.

## Value

A list with two elements:

v

n-by-1 vector of kernel weights

b

scalar, bias term for the linear model (omitted for one-class models)

gelnet

format: plain


text:
anonymous 5 years ago You roll 2 dice. What is the probability that the sum of the dice is greater than 7 and 1 die shows a 2? A 6 X 6 table of dice outcomes will help you to answer this question.

1. anonymous

(2,5)(2,6)(5,2)(6,2) so $\frac{4}{36}=\frac{1}{9}$

2. anonymous

1/18!

3. anonymous

??

4. anonymous

idk thats what my online quiz told me was the answer..

5. anonymous

idk thats what my online quiz told me was the answer..

6. anonymous

idk thats what my online quiz told me was the answer..

7. anonymous

idk thats what my online quiz told me was the answer..

8. anonymous

idk thats what my online quiz told me was the answer..

9. anonymous

idk thats what my online quiz told me was the answer..

10. anonymous

idk thats what my online quiz told me was the answer..

11. anonymous

idk thats what my online quiz told me was the answer..

12. anonymous

ooops my fault. it says GREATER THAN 7 not greater than or equal to seven. sorry. it is only (2,6) and (6,2) apologies.

13. anonymous

its all good lol sorry for the reply spam..i kept hitting post but nothing was happening. thank you though

14. anonymous

no problem. sorry for not reading carefully and messing you up.


text:
# EP Articles

2017-07-07
07:35
 Observation of the doubly charmed baryon $\Xi_{cc}^{++}$ / LHCb Collaboration A highly significant structure is observed in the $\Lambda_c^+K^-\pi^+\pi^+$ mass spectrum, where the $\Lambda_c^+$ baryon is reconstructed in the decay mode $pK^-\pi^+$. The structure is consistent with originating from a weakly decaying particle, identified as the doubly charmed baryon $\Xi_{cc}^{++}$. [...] LHCB-PAPER-2017-018; CERN-EP-2017-156; arXiv:1707.01621.- 2017-09-11 - 10 p. - Published in : Phys. Rev. Lett. 119 (2017) 112001 Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; Supplementary information: ZIP; External links: conference slides; INTERACTIONS

2017-06-24
09:59
 Study of charmonium production in ${b}$-hadron decays and first evidence for the decay ${{{B}} ^0_{{s}}} \!\rightarrow \phi \phi \phi$ / LHCb Collaboration Using decays to $\phi$-meson pairs, the inclusive production of charmonium states in $b$-hadron decays is studied with $pp$ collision data corresponding to an integrated luminosity of $3.0fb^{-1}$, collected by the LHCb experiment at centre-of-mass energies of 7 and 8 TeV. Denoting by $B_C\equiv B(b\to CX)\times B(C\to\phi\phi)$ the inclusive branching fraction of a $b$ hadron to a charmonium state $C$ that decays into a pair of $\phi$ mesons, ratios $R^{C1}_{C2}\equiv B_{C1}/B_{C2}$ are determined as $R^{\chi_{c0}}_{\eta_c(1S)}=0.147\pm0.023\pm0.011$, $R^{\chi_{c1}}_{\eta_c (1S)}=0.073\pm0.016\pm0.006$, $R^{\chi_{c2}}_{\eta_c (1S)}=0.081\pm0.013\pm0.005$, $R^{\chi_{c1}}_{\chi_{c0}}=0.50\pm0.11\pm0.01$, $R^{\chi_{c2}}_{\chi_{c0}}=0.56\pm0.10\pm0.01$ and $R^{\eta_c (2S)}_{\eta_c(1S)}=0.040\pm0.011\pm0.004$. [...] LHCB-PAPER-2017-007; CERN-EP-2017-099; arXiv:1706.07013; LHCB-PAPER-2017-007.- Springer, 2017-09-14 - 31 p. - Published in : Eur. Phys. J. C 77 (2017) 609 Article from SCOAP3: PDF; Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; Supplementary information: ZIP;

2017-05-18
09:34
 Test of lepton universality with $B^{0} \rightarrow K^{*0}\ell^{+}\ell^{-}$ decays / LHCb Collaboration A test of lepton universality, performed by measuring the ratio of the branching fractions of the $B^{0} \rightarrow K^{*0}\mu^{+}\mu^{-}$ and $B^{0} \rightarrow K^{*0}e^{+}e^{-}$ decays, $R_{K^{*0}}$, is presented. The $K^{*0}$ meson is reconstructed in the final state $K^{+}\pi^{-}$, which is required to have an invariant mass within 100$\mathrm{\,MeV}c^2$ of the known $K^{*}(892)^{0}$ mass. [...] LHCB-PAPER-2017-013; CERN-EP-2017-100; arXiv:1705.05802; LHCB-PAPER-2017-013.- Geneva : CERN, 2017-08-16 - Published in : JHEP 08 (2017) 055 Article from SCOAP3: PDF; Preprint: PDF; Related data file(s): ZIP;

2017-05-12
10:56
 Measurement of $B^{0}_{s}$ and $D^{-}_{s}$ meson lifetimes / LHCb Collaboration We report on a measurement of the flavor-specific $B^{0}_{s}$ lifetime and of the $D^{-}_{s}$ lifetime using proton-proton collisions at center-of-mass energies of 7 and 8 TeV, collected by the LHCb experiment and corresponding to 3.0 fb$^{-1}$ of integrated luminosity. Approximately 407 000 $B^{0}_{s} \rightarrow D^{(*)-}_{s} \mu^{+}\nu_\mu$ decays are partially reconstructed in the $K^{+}K^{-}\pi^{-}\mu^{+}$ final state. [...] CERN-EP-2017-070; LHCB-PAPER-2017-004; arXiv:1705.03475.- Geneva : CERN, 2017-09-08 - 10 p. - Published in : Phys. Rev. Lett. 119 (2017) 101801 Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; Supplementary material: PDF; Supplementary material (zip): ZIP;

2017-05-08
14:53
 Observation of five new narrow $\Omega_c^0$ states decaying to $\Xi^+_c K^-$ / LHCb Collaboration The $\Xi^+_c K^-$ mass spectrum is studied with a sample of $pp$ collision data corresponding to an integrated luminosity of 3.3 fb$^{-1}$, collected by the LHCb experiment. The $\Xi^+_c$ is reconstructed in the decay mode $pK^- \pi^+$. [...] LHCB-PAPER-2017-002; CERN-EP-2017-037; arXiv:1703.04639; LHCB-PAPER-2017-002.- Geneva : CERN, 2017-05-02 - 10 p. - Published in : Phys. Rev. Lett. 118 (2017) 182001 Fulltext: 10.1103_PhysRevLett.118.182001 - PDF; arXiv:1703.04639 - PDF; Preprint: PDF; Supplementary information: ZIP;

2017-05-02
11:15
 Resonances and $CP$ violation in $B_s^0$ and $\overline{B}_s^0 \to J/\psi K^+K^-$ decays in the mass region above the $\phi(1020)$ / LHCb Collaboration The decays of $B_s^0$ and $\overline{B}_s^0$ mesons into the $J/\psi K^+K^-$ final state are studied in the $K^+K^-$ mass region above the $\phi(1020)$ meson in order to determine the resonant substructure and measure the $CP$-violating phase, $\phi_s$, the decay width, $\Gamma_s$, and the width difference between light and heavy mass eigenstates, $\Delta\Gamma_s$. A decay-time dependent amplitude analysis is employed. [...] CERN-EP-2017-062; LHCB-PAPER-2017-008; arXiv:1704.08217; LHCB-PAPER-2017-008.- Geneva : CERN, 2017-08-09 - 28 p. - Published in : JHEP 08 (2017) 037 Article from SCOAP3: PDF; Figures: ZIP; Preprint: PDF; External link: Previous draft version

2017-04-27
14:36
 Observation of charmless baryonic decays $B^0_{(s)} \to p \overline{p} h^+ h^{\prime-}$ / LHCb Collaboration Decays of $B^0$ and $B_{s}^0$ mesons to the charmless baryonic final states $p \overline{p} h^+ h^{\prime-}$, where $h$ and $h^\prime$ each denote a kaon or a pion, are searched for using the LHCb detector. The analysis is based on a sample of proton-proton collision data collected at center-of-mass energies of $7$ and $8\,$TeV, corresponding to an integrated luminosity of $3\,$fb$^{-1}$. [...] LHCB-PAPER-2017-005; CERN-EP-2017-052; arXiv:1704.08497; LHCB-PAPER-2017-005.- Geneva : CERN, 2017-09-27 - 10 p. - Published in : Phys. Rev. D 96 (2017) 051103 Figures: ZIP; Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; External link: Previous draft version

2017-04-26
10:11
 Observation of the decays $\Lambda_b^0 \to \chi_{c1} p K^-$ and $\Lambda_b^0 \to \chi_{c2} p K^-$ / LHCb Collaboration The first observation of the decays $\Lambda_b^0 \to \chi_{c1} p K^-$ and $\Lambda_b^0 \to \chi_{c2} p K^-$ is reported using a data sample corresponding to an integrated luminosity of $3.0$ fb$^{-1}$, collected by the LHCb experiment in $pp$ collisions at centre-of-mass energies of 7 and 8 TeV. The following ratios of branching fractions are measured \begin{eqnarray*} \frac{{\cal B}(\Lambda_b^0 \to \chi_{c1} p K^-)}{{\cal B}(\Lambda_b^0 \to J/\psi p K^-)} = 0.242 \pm 0.014 \pm 0.013 \pm 0.009, \frac{{\cal B}(\Lambda_b^0 \to \chi_{c2} p K^-)}{{\cal B}(\Lambda_b^0 \to J/\psi p K^-)} = 0.248 \pm 0.020 \pm 0.014 \pm 0.009, \frac{{\cal B}(\Lambda_b^0 \to \chi_{c2} p K^-)}{{\cal B}(\Lambda_b^0 \to \chi_{c1} p K^-)} = 1.02 \pm 0.10 \pm 0.02 \pm 0.05, \end{eqnarray*} where the first uncertainty is statistical, the second systematic and the third due to the uncertainty on the branching fractions of the $\chi_{c1}\to J/\psi\gamma$ and $\chi_{c2} \to J/\psi\gamma$ decays. [...] LHCB-PAPER-2017-011; CERN-EP-2017-073; arXiv:1704.07900.- Geneva : CERN, 2017-08-08 - 11 p. - Published in : Phys. Rev. Lett. 119 (2017) 062001 Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; External link: Previous draft version

2017-04-26
07:45
 Observation of the $B^+ \to D^{*-}K^+\pi^+$ decay / LHCb Collaboration The $B^+ \to D^{*-}K^+\pi^+$ decay potentially provides an excellent way to investigate charm meson spectroscopy. The decay is searched for in a sample of proton-proton collision data collected with the LHCb detector at centre-of-mass energies of 7 and 8 TeV, corresponding to an integrated luminosity of $3~{\rm fb}^{-1}$. [...] CERN-EP-2017-064; LHCB-PAPER-2017-006; arXiv:1704.07581.- Geneva : CERN, 2017-07-19 - 10 p. - Published in : Phys. Rev. D 96 (2017) 011101 Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP;

2017-03-20
12:28
 Measurement of the $B^0_s\to\mu^+\mu^-$ branching fraction and effective lifetime and search for $B^0\to\mu^+\mu^-$ decays / LHCb Collaboration A search for the rare decays $B^0_s\to\mu^+\mu^-$ and $B^0\to\mu^+\mu^-$ is performed at the LHCb experiment using data collected in $pp$ collisions corresponding to a total integrated luminosity of 4.4 fb$^{-1}$. An excess of $B^0_s\to\mu^+\mu^-$ decays is observed with a significance of 7.8 standard deviations, representing the first observation of this decay in a single experiment. [...] CERN-EP-2017-041; LHCB-PAPER-2017-001; arXiv:1703.05747.- Geneva : CERN, 2017-05-11 - 11 p. - Published in : Phys. Rev. Lett. 118 (2017) 191801 APS Open Access Article: PDF; Fulltext: PDF; Preprint: PDF; Related data file(s): ZIP; Related supplementary data file(s): ZIP;


text:
# Recursion¶

Recursion happens when a function calls itself. You can think of it as the programming equivalent of the Droste Effect, where a picture contains a smaller version of itself.

To quote Wikipedia, “The woman in the 1904 Droste cocoa package holds two objects bearing smaller images of herself holding the same objects, and so on recursively.” This series of ever-smaller images appears to go on forever. The key word here is appears, because the smaller images eventually stop when they become to small to draw. This is a good thing, otherwise the artist would still be drawing it!

As a first example of recursion, I’m going to show you how to compute factorials. This pains me greatly, as it is the example that everyone uses, and I hate to join the crowd, but the fact is that it’s a good example for helping you wrap your head around the idea of recursion.

The factorial of an integer is represented by the exclamation mark and is the product of all the positive integers up to and including the integer in question:

1! = 1
2! = 2 × 1
3! = 3 × 2 × 1
4! = 4 × 3 × 2 × 1

and so on. You may be wondering why anyone would ever use this; it turns out to be very handy for figuring out problems involving probabilities. Now let’s add a few parentheses and reverse the order of the example, to see something interesting:

4! = 4 × (3 × 2 × 1) = 4 × 3!
3! = 3 × (2 × 1) = 3 × 2!
2! = 2 × (1) = 2 × 1!
1! = 1

Each factorial can be defined in terms of yet another factorial—until you get down to 1, which stops the process from going on forever. In general, then, n! can be defined as n × (n - 1)! where n is greater than 1. The important part is that 1! is not defined in terms of itself. That’s the “stopping point”; the equivalent of where the images get too small to keep drawing, and thus ending the recursion.

If you were to try (factorial 50000), you would get an error: “Too much recursion.” To see why this happens, let’s look at the expression (* n (factorial (- n 1))) when n is 5. In order to do the multiplication, ClojureScript has to first figure out what (factorial (- 5 1)) works out to, so it has to “wait” until 4! is evaluated. That calculation, in turn, will have to figure out 3! before it can do its multiplication, so it has to wait as well, and so on. Every time this happens, the function has to store its status in an area of memory called the stack. That stack has limited room, and once you are out of room, you get the “too much recursion” error. This error also goes by the name stack overflow.

There is a way around this problem. If the recursive call is the very last thing in the function, then you can use the recur function to say “do the recursion now,” and ClojureScript will optimize the code so that no stack space is needed for the recursion. Having the recursion as the very last thing is called tail recursion. (In the preceding example, the recursion isn’t the last thing that happens in the function—it’s the multiplication). To do factorials with the recursion as the very last operation, we’ll build a special helper function with two arguments. The first argument is the number whose factorial we want, and the second argument is the “result so far”:

The factorial-helper function will return the result so far if n is one, otherwise it will use recur to recursively call itself with (- n 1) and (* n result) as the arguments.

Even though the result is a number too large for ClojureScript to represent, we at least get a result rather than an error. Whenever possible, you should try to make your recursive functions tail recursive and use recur so that you never have to worry about too much recursion.

## Recursion and Vectors¶

You can use recursion to process lists. For example, if you wanted to get the sum of a vector of numbers:

[17 4 26 3]

You already know how to do this with reduce(reduce + 0 [17 4 26 3]), but you can think of it it as a recursive process. The sum of the entire vector is 17 plus the sum of the remainder of the vector [4 26 3]. The sum of that vector is 4 plus the sum of the rest of that vector [26 3] and so on until you get to an empty vector which means you have added everything up. In other words, recursviely defined, the sum of the entire vector is the result of adding the first element to the sum of the remaining elements.

You can use the first and rest functions to get the first element and remaining elements in a vector, which lets you write the recursive summation as:

The preceding example isn’t tail recursive because the addition is the last operation. We can use the helper function trick to allow the use of recur:

## Strings as Collections¶

The exercise for this chapter depends on being able to manipulate strings. It turns out that you can treat a string of characters, to a large extent, as if it were a sequence of characters. Try this:

Note that rest returns a sequence of characters. If you want to gather all of the items in the sequence back into a single string, you can apply the str function to all the characters (try it in the preceding activecode):

(apply str (rest s))

## Recursion: Palindrome tester¶

You can now use recursion to write a function named is-palindrome? that takes a string as its parameter. If the string is a palindrome (it reads the same backwards and forwards), the function returns true, otherwise false. Thus, (is-palindrome? "peep") and (is-palindrome? "rotor") are true while (is-palindrome? "robber") is false.

How can you use recursion to tell if something is a palindrome? Let’s examine rotor. The first and last letters match, so we discard them and are left with oto. Is that a palindrome? (There’s the recursion) Its first and last letters match, so we discard them and are left with t, which, being only one letter, is a palindrome. The same goes for peep. The first and last letters match, so we discard them and are left with ee. Again, we ask if the first and last letters match. They do, so we discard them, and we are left with nothing, which is the same backwards as forwards.

The word robber isn’t a palindrome: The first and last letters match, so we discard them, and are left with obbe. The first and last letters do not match, so the word isn’t a palindrome.

Here’s the logic:

• If the length of the string (using count) is zero or one, we have a palindrome. This is the end case, which prevents infinite recursion.

• Otherwise
• if the first and last letters match,
• See if everything else is a palindrome. This is where the recursion is. (Hint: use butlast and rest)
• otherwise it’s not a palindrome

## A Better Palindrome Tester¶

The preceding function works fine, but it would be nice to be able to test for sentences like “A man, a plan, a canal - Panama!” or “Madam, I’m Adam.” In order to do this, you would want to convert the string to all lower case and get rid of anything that isn’t a letter. You can use .toLowerCase to do the first part. Keeping only letters is a perfect job for filter once you know how to test if a character is between "a" and "z" inclusive. You can’t do this:

(def ch "p")
(and (>= ch "a") (<= ch "z"))

because >= and <= expect numbers. However, you can use the compare function. compare returns a negative number if its first argument is less than its second argument, zero if they are equal, and positive if the first argument is greater than the second argument. Thus:

(compare 3 5) ; returns -1
(compare 5 5) ; returns 0
(compare 7 5) ; returns 1
(compare "a" "c") ; returns -1
(compare "x" "t") ; returns 1

So, you can see if a character is a letter (at least for English) with a test like this:

(and (>= (compare ch "a") 0) (<= (compare ch "z") 0))

Given this information, see if you can improve the palindrome function by converting to lower case, filtering to keep letters only, and then using the existing is-palindrome? function. Hint: you can use threading ->> to make your code more readable.

Next Section - Project


text:
Student Teacher

Optional Group Code given to you by the group creator

Optional first name

Optional last name

UNIT
2
2.4: Combine Like Terms
Students simplify expressions prior to solving linear equations and inequalities in one variable, such as $$3(2x - 5) + 4(x - 2) = 12$$.
DECONSTRUCTION
OBJECTIVES
KEY VOCABULARY
STAR ITEMS
TAKE A QUIZ

## Today's Objective

Students will be able to combine like terms to simplify expressions.

# Key Vocabulary

SIMPLIFY
SOLVE
EQUATION
LINEAR
TERM
LIKE TERMS
EXPRESSION
DISTRIBUTIVE PROPERTY
POSITIVE
NEGATIVE
VARIABLE