(chapter:input)= # Input of Coordinates Coordinates can be either specified directly in the input file or read from an external file, and they can be in either Cartesian ("xyz") or internal coordinate format ("Z-matrix"). ## Reading coordinates from the input file The easiest way to specify coordinates in the input file is by including a block like the following, enclosed by star symbols: ```orca * CType Charge Multiplicity ... coordinate specifications ... * ``` Here `CType` can be one of `xyz`, `int` (or `internal`), or `gzmt`, which correspond to Cartesian coordinates, internal coordinates, and internal coordinates in Gaussian Z-matrix format. The input of Cartesian coordinates in the "`xyz`" option is straightforward. Each line consists of the label for a given atom type and three numbers that specify the coordinates of the atom. The units can be either Ångström or Bohr. The default is to specify the coordinates in Ångströms (this can be changed through the keyword line or via the variable `Units` in the `%coords` main block described below). ```orca * xyz Charge Multiplicity Atom1 x1 y1 z1 Atom2 x2 y2 z2 ... * ``` For example for CO$^+$ in a $S=1/2$ state (multiplicity = $2\times1/2+1=2$) ```orca * xyz 1 2 C 0.0 0.0 0.0 O 0.0 0.0 1.1105 * ``` Internal coordinates are specified in the form of the familiar "Z-matrix". A Z-matrix basically contains information about molecular connectivity, bond lengths, bond angles and dihedral angles. The program then constructs Cartesian coordinates from this information. Both sets of coordinates are printed in the output such that conversion between formats is facilitated. The input in that case looks like: ```orca * int Charge Multiplicity Atom1 0 0 0 0.0 0.0 0.0 Atom2 1 0 0 R1 0.0 0.0 Atom3 1 2 0 R2 A1 0.0 Atom4 1 2 3 R3 A2 D1 . . . AtomN NA NB NC RN AN DN * ``` The rules for connectivity in the "`internal`" mode are as follows: - `NA`: The atom that the actual atom has a distance (`RN`) with. - `NB`: The actual atom has an angle (`AN`) with atoms `NA` and `NB`. - `NC`: The actual atom has a dihedral angle (`DN`) with atoms `NA`, `NB` and `NC`. This is the angle between the actual atom and atom `NC` when looking down the `NA-NB` axis. - Note that - contrary to other parts in ORCA - atoms are counted starting from 1. Angles are always given in degrees! The rules are compatible with those used in the well known MOPAC and ADF programs. Finally, `gzmt` specifies internal coordinates in the format used by the Gaussian program. This resembles the following: ```orca * gzmt 0 1 C O 1 4.454280 Si 2 1.612138 1 56.446186 O 3 1.652560 2 114.631525 1 -73.696925 C 4 1.367361 3 123.895399 2 -110.635060 ... * ``` An alternative way to specify coordinates in the input file is through the use of the `%coords` block, which is organized as follows: ```orca %coords CTyp xyz # the type of coordinates = xyz or internal Charge 0 # the total charge of the molecule Mult 2 # the multiplicity = 2S+1 Units Angs # the unit of length = angs or bohrs # the subblock coords is for the actual coordinates # for CTyp=xyz coords Atom1 x1 y1 z1 Atom2 x2 y2 z2 end # for CTyp=internal coords Atom1 0 0 0 0.0 0.0 0.0 Atom2 1 0 0 R1 0.0 0.0 Atom3 1 2 0 R2 A1 0.0 Atom4 1 2 3 R3 A2 D1 . . . AtomN NA NB NC RN AN DN end end ``` ## Reading coordinates from external files It is also possible to read the coordinates from external files. The most common format is a `.xyz` file, which can in principle contain more than one structure (see section {ref}`sec:optimization.multiplexyz.typical` for this multiple XYZ feature): ```orca * xyzfile Charge Multiplicity Filename ``` For example: ```orca * xyzfile 1 2 mycoords.xyz ``` A lot of graphical tools like Gabedit, molden or Jmol can write Gaussian Z-Matrices (`.gzmt`). ORCA can also read them from an external file with the following ```orca * gzmtfile 1 2 mycoords.gzmt ``` Note that if multiple jobs are specified in the same input file then new jobs can read the coordinates from previous jobs. If no filename is given as fourth argument then the name of the actual job is automatically used. ```orca ... specification for the first job $new_job ! keywords * xyzfile 1 2 ``` In this way, optimization and single point jobs can be very conveniently combined in a single, simple input file. Examples are provided in the following sections. (sec:input.coords.special)= ## Special definitions - **Dummy atoms** are defined in exactly the same way as any other atom, by using "DA", "X", or "Xx" as the atomic symbol. - **Ghost atoms** are specified by adding ":" right after the symbol of the element (see {ref}`sec:energygradients.counterpoise.typical`). - **Point charges** are specified with the symbol "Q", followed by the charge (see {ref}`sec:coords.pointcharges.detailed`). - **Embedding potentials** are specified by adding a "\>" right after the symbol of the element (see {ref}`sec:basisset.embeddingpotentials.detailed`). - **Non-standard** isotopes or nuclear charges are specified with the statements "`M = `..." and "`Z = `...", respectively, after the atomic coordinate definition. :::{NOTE} 1. The nuclear charge can adopt non-integer values 2. When the nuclear charge is modified throughca "`Z = `..." statement, the total charge of the system should still be calculated based on the unmodified charge. For example, for a calculation of a single hydrogen atom whose `Z` is set to 1.5, a charge of 0 and a spin multiplicity of 2 should be entered into the charge and multiplicity sections of the input file, despite that the actual total charge is 0.5. ::: - **Fragments** can be conveniently defined by declaring the fragment number a given atom belongs to in parentheses "`(n)`" following the element symbol (see {ref}`sec:coords.fragment.detailed`). - **Frozen coordinates**, which are not changed during optimizations in Cartesian coordinates, are defined with a "\$" symbol after the X, Y, and/or Z coordinate value (cf. constraints on all 3 Cartesian components {ref}`sec:optimization.constrained.typical`).