Back to main menu

## Mode: create

#### Syntax

`atomsk --create <lattice> <a> [<c>] <sp1> [<sp2> <sp3>...] [orient (hkl)X (hkl)Y (hkl)Z] [options] <outputfile> [<formats>]`

Special syntax for nanotubes:

`atomsk --create nanotube <a0> <m> <n> <sp1> [<sp2>] [options] <outputfile> [<formats>]`

#### Description

This mode allows to create an atomic structure from scratch. For now, only a small number of very basic lattices can be created (see table below). By default the base vectors of the cubic systems created are X=[100], Y=[010] and Z=[001], but that can be changed (see below). Hexagonal lattices can also be oriented, with restrictions detailed below. For other systems, other orientations are not implemented yet.

The parameters associated with the `create` mode are:

- lattice: type of lattice (see table below);
- a: lattice parameter (in Å);
- c: lattice parameter (in Å, only needed for some structures);
- sp1, sp2...: atomic species constituting the material (one- or two-characters symbol); the number of species that must be specified depends on the lattice, see table below.
- orient (hkl)X (hkl)Y (hkl)Z: crystallographic orientation of the created lattice (cubic and hexagonal lattices only).

The table below shows the acceptable entries for <lattice>, and the corresponding number of lattice constants and atom species that must be specified. For bcc lattice, entering two atom species will produce an interpenetrating simple cubic (aka "caesium chloride") lattice. For fcc lattice, entering two atom species will create an alloy of the two elements. For diamond lattice, entering two species will create a zincblende lattice; for zincblende, entering only one species will create a diamond lattice.

| <lattice> | N. of lattice constants | N. of atom species
--- | --- | --- | ---
Cubic lattices
Simple cubic | sc | 1 | 1
Body-centered cubic Cesium chloride | bcc CsCl | 1 | 1 or 2
Face-centered cubic | fcc | 1 | 1 or 2
L12 cubic | L12, L1_2 | 1 | 2
Fluorite | fluorite | 1 | 2
Diamond Zincblende | diamond, dia zincblende, zb | 1 | 1 or 2
Cubic rock-salt | rocksalt | 1 | 2
Cubic perovskite | perovskite, per | 1 | 3
A15 or Cr3Si | A15 | 1 | 2
C15 Laves phase | C15 | 1 | 2
Tetragonal lattices
Simple tetragonal | st | 2 (a and c) | 1
Body-centered tetragonal | bct | 2 (a and c) | 1 or 2
Face-centered tetragonal or L10 | fct, L1_0 | 2 (a and c) | 1 or 2
Hexagonal lattices
Hexagonal close-packed | hcp | 2 (a and c) | 1 or 2
Wurtzite | wurtzite, wz | 2 (a and c) | 2
Graphite | graphite | 2 (a and c) | 1 or 2
Boron nitride or B12 | BN, B12 | 2 (a and c) | 2
C14 Laves phase | C14 | 2 (a and c) | 2
C36 Laves phase | C36 | 2 (a and c) | 2
Other structures
Nanotube | nanotube, NT | 1 + m,n | 1 or 2

Unit cells of cubic systems can be created with a given crystallographic orientation, if the keyword "`orient`" is appened after the atom species and is followed by the Miller indices hkl of the lattice in each cartesian direction X, Y and Z (see how to specify Miller indices). Indices are automatically divided by their greatest common divisor: for example the [220] direction is replaced by [110], the [224] direction is replaced by [112], and so on. When possible, Atomsk takes lattice symmetry into account and uses the shortest lattice vector along the following directions: in bcc lattice, directions of type ⟨hkl⟩ where h, k and l are all odd are replaced by ½⟨hkl⟩ (for example [111] is remplaced by ½[111], [351] becomes ½[351], etc.); in fcc, diamond, zincblende and rocksalt lattices, directions of type ⟨hkl⟩ where h and k are odd and l is even are replaced by ½⟨hkl⟩ (e.g. [110] is remplaced by ½[110], [211] becomes ½[211], etc.). The goal is to provide the smallest unit cell with the specified crystal directions. Note that the keyword "`orient`" must always appear immediately after the atom species, and should not be mistaken with the option `-orient`.

Unit cells of hexagonal lattices can also be oriented, but this has a different meaning. First of all, for hexagonal systems, orientations can be given either using Miller-Bravais notation [hkil] with h+k+i=0, either using the Miller notation [uvw]. Three vectors must be provided after the keyword "orient". These three vectors will define the new unit cell. They do not have to be orthogonal (contrary to cubic systems), however they must be linearly independent. In the end, Atomsk will align the first vector with the Cartesian X direction, the second vector will belong to the XY plane, and the third vector will point out of the XY plane. So, contrary to cubic systems, the three provided crystallographic directions will not be aligned with Cartesian directions (except for the first vector), and the final cell will not be orthogonal. To obtain an orthogonal box, you may use the option `-orthogonal-cell` afterwards.

For creating a nanotube one has to specify one lattice parameter (that corresponds to the first neighbours distance), followed by the chiral indices m and n which must be integers. The unit cell of a nanotube is defined unambiguously only along the nanotube, which is along the Z axis here. In the other directions, Atomsk defines the lattice so that periodic replica form an hexagonal pattern as it is observed experimentally. You can tune the distance between periodic replica by changing the cell parameters. Note that the center of the nanotube is at (0,0) so it is easy to create multiwall nanotubes (create several nanotubes and merge them).

The name of the <outputfile> can be specified either before or after the mode. If no output file is specified but only output format(s) then the output file(s) will be named after the atom species.

If you use this mode with one or several options, then they will apply to the created system.

Note that Atomsk does not contain a database of lattice parameters for various materials. It is up to you to provide the lattice constants that you want to work with. The system created with this mode is a perfect lattice, it is not relaxed nor optimized.

#### Examples

- `atomsk --create fcc 4.02 Al al_system.cfg`

  This will create a unit cell of fcc aluminium (lattice parameter=4.02 Å), and write atom positions in the file `al_system.cfg`.

- `atomsk --create fcc 4.02 Al orient [0-11] [100] [011] -duplicate 40 30 30 al_supercell.cfg lmp`

  This example shows how to create an oriented unit cell. This will create a unit cell of fcc aluminium with the crystallographic orientation X=[011], Y=[100], Z=[011], duplicate it to form a 40x30x30 supercell, and write the final result into the file `al_supercell.cfg` and `al_supercell.lmp`.

- `atomsk --create fcc 3.6 Cu Ni cuni_alloy.xsf`

  This will create a unit cell of fcc copper-nickel alloy and write it in the file `cuni_alloy.xsf`.

- `atomsk --create bcc 2.85 Fe orient [121] [-101] [1-11] xsf cfg`

  This command will generate a unit cell of bcc iron with the crystallographic orientation X=[121], Y=[101], Z=[111], and write the result to `Fe.xsf` and `Fe.cfg`.

- `atomsk --create rocksalt 4.213 Mg O cfg xsf`

  This will create a unit cell magnesium oxide (rocksalt lattice), and write it in the files `MgO.cfg` and `MgO.xsf`.

- `atomsk --create diamond 3.567 C diamond.cfg xsf`

  This will create a unit cell diamond, and write it in the files `diamond.cfg` and `diamond.xsf`.

- `atomsk --create zb 5.65 Ga As gaas.cfg`

  This will create a unit cell of gallium arsenide (zincblende lattice), and write it in the file `gaas.cfg`.

- `atomsk --create perovskite 3.86 Sr Ti O xsf gin`

  This will create a unit cell of cubic strontium titanate (lattice parameter=3.86 Å), and write it in the files `SrTiO.xsf` and `SrTiO.gin`.

- `atomsk --create per 3.86 Sr Ti O orient [001] [110] [1-10] -duplicate 30 20 1 sto.xsf`

  This example uses the duplicate option. It will create a unit cell of cubic strontium titanate oriented X=[001], Y=[110], Z=[110], and then duplicate it to form a 30x20x1 supercell. The final result will be output in the file `sto.xsf`.

- `atomsk --create hcp 3.21 5.213 Mg cfg`

  This example will create a unit cell of hexagonal close-packed magnesium, with a=3.21 Å and c=5.213 Å. The final result will be output in the file `Mg.cfg`.

- `atomsk --create hcp 3.21 5.213 Mg orient [0001] [2-310] [-1-230] cfg`

  This example will create a unit cell of hcp magnesium with the specified orientation. The first box vector will be [0001] and aligned with the Cartesian X axis; the second box vector will be [2-310] and will be placed in the XY plane; and the third box vector will be [-1-230] and will point out of the XY plane. Note that the three box vecteors will not be orthogonal.

- `atomsk --create hcp 3.21 5.213 Mg orient [0001] [2-310] [-1-230] -orthogonal-cell cfg`

  Same as previous example, but the option `-orthogonal-cell` will generate an equivalent orthogonal box, by using linear combinations of the initial box vectors. In this example, the final box vectors will be linear combinations of the vectors [0001], [2-310], and [-1-230].

- `atomsk --create graphite 2.5 3.6 B N bn.xsf`

  This example will create a unit cell of hexagonal boron nitride (which has the same lattice as graphite), with a=2.5 Å and c=3.6 Å. The final result will be output in the file `bn.xsf`.

- `atomsk --create nanotube 2.5 8 8 C nanotube.xsf cfg`

  This will create a carbon nanotube of armchair type with chiral indices (8,8). The final result will be output in the files `nanotube.xsf` and `nanotube.cfg`.

- `atomsk --create nanotube 2.8 10 0 B N xsf`

  This will create a boron nitride nanotube of zigzag type with chiral indices (10,0). The final result will be output in the file `BN.xsf`.

- You may also want to look at the scripts in the "examples" folder provided with the program. The folder "`Al_supercell`" contains a bash script showing how to create an aluminum system with two surface steps. The folder "`Si_supercell`" shows how to generate a crystal of aluminum with a particular orientation and a surface step.

Back to main menu