Molecules — ASE documentation

### Navigation

- index
- modules |
- Documentation for modules in ASE »
- Creating atomic structures »

See also

- The `ase.lattice` module
- The `spacegroup` module
- The `surface` module

# Molecules

The G2-database of common molecules is available:

`ase.structure.` `molecule`(name, data=None, **kwargs)

  Create formula base on data. If data is None assume G2 set. kwargs currently not used.

Example:

    >>> from ase.structure import molecule
    >>> atoms = molecule('H2O')

To see a list of available molecules in the default set, use:

    >>> from ase.data.g2 import data
    >>> data.viewkeys()

# Common bulk crystals

`ase.lattice.` `bulk`(name, crystalstructure=None, a=None, c=None, covera=None, u=None, orthorhombic=False, cubic=False)

  Creating bulk systems.

  Crystal structure and lattice constant(s) will be guessed if not provided.

  name: str
    Chemical symbol or symbols as in ‘MgO’ or ‘NaCl’.
  crystalstructure: str
    Must be one of sc, fcc, bcc, hcp, diamond, zincblende, rocksalt, cesiumchloride, fluorite or wurtzite.
  a: float
    Lattice constant.
  c: float
    Lattice constant.
  covera: float
    c/a raitio used for hcp. Default is ideal ratio: sqrt(8/3).
  u: float
    Internal coordinate for Wurtzite structure.
  orthorhombic: bool
    Construct orthorhombic unit cell instead of primitive cell which is the default.
  cubic: bool
    Construct cubic unit cell if possible.

examples:

    >>> from ase.lattice import bulk
    >>> a1 = bulk('Cu', 'fcc', a=3.6)
    >>> a2 = bulk('Cu', 'fcc', a=3.6, orthorhombic=True)
    >>> a3 = bulk('Cu', 'fcc', a=3.6, cubic=True)
    >>> a1.cell
    array([[ 0. ,  1.8,  1.8],
           [ 1.8,  0. ,  1.8],
           [ 1.8,  1.8,  0. ]])
    >>> a2.cell
    array([[ 2.54558441,  0.        ,  0.        ],
           [ 0.        ,  2.54558441,  0.        ],
           [ 0.        ,  0.        ,  3.6       ]])
    >>> a3.cell
    array([[ 3.6,  0. ,  0. ],
           [ 0. ,  3.6,  0. ],
           [ 0. ,  0. ,  3.6]])

# Nanotubes

`ase.structure.` `nanotube`(n, m, length=1, bond=1.42, symbol='C', verbose=False)

examples:

    >>> from ase.structure import nanotube
    >>> cnt1 = nanotube(6, 0, length=4)
    >>> cnt2 = nanotube(3, 3, length=6, bond=1.4, symbol='Si')

# Graphene nanoribbons

`ase.structure.` `graphene_nanoribbon`(n, m, type='zigzag', saturated=False, C_H=1.09, C_C=1.42, vacuum=2.5, magnetic=None, initial_mag=1.12, sheet=False, main_element='C', saturate_element='H', vacc=None)

  Create a graphene nanoribbon.

  Creates a graphene nanoribbon in the x-z plane, with the nanoribbon running along the z axis.

  Parameters:

  n: int
    The width of the nanoribbon.
  m: int
    The length of the nanoribbon.
  type: str
    The orientation of the ribbon. Must be either ‘zigzag’ or ‘armchair’.
  saturated: bool
    If true, hydrogen atoms are placed along the edge.
  C_H: float
    Carbon-hydrogen bond length. Default: 1.09 Angstrom.
  C_C: float
    Carbon-carbon bond length. Default: 1.42 Angstrom.
  vacuum: float
    Amount of vacuum added to both sides. Default 2.5 Angstrom.
  magnetic: bool
    Make the edges magnetic.
  initial_mag: float
    Magnitude of magnetic moment if magnetic=True.
  sheet: bool
    If true, make an infinite sheet instead of a ribbon.

examples:

    >>> from ase.structure import graphene_nanoribbon
    >>> gnr1 = graphene_nanoribbon(3, 4, type='armchair', saturated=True)
    >>> gnr2 = graphene_nanoribbon(2, 6, type='zigzag', saturated=True,
    >>>                            C_H=1.1, C_C=1.4, vacuum=6.0,
    >>>                            magnetic=True, initial_mag=1.12)

### Navigation

- index
- modules |
- Documentation for modules in ASE »
- Creating atomic structures »