File: cell.rst

package info (click to toggle)
python-ase 3.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (36 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.. module:: ase.cell

The Cell object
===============

The Cell object represents three lattice vectors forming a parallel epiped.

``atoms.cell`` is a Cell object.

Examples::

  >>> from ase.build import bulk
  >>> cell = bulk('Au').cell
  >>> cell
  Cell([[0.0, 2.04, 2.04], [2.04, 0.0, 2.04], [2.04, 2.04, 0.0]], pbc=True)

The cell behaves like a 3x3 array when used like one::

  >>> cell[:]
  array([[0.  , 2.04, 2.04],
         [2.04, 0.  , 2.04],
         [2.04, 2.04, 0.  ]])


Common functionality::

  >>> cell.lengths()
  array([2.88499567, 2.88499567, 2.88499567])
  >>> cell.angles()
  array([60., 60., 60.])
  >>> cell.volume
  16.979328000000002


.. autoclass:: Cell
    :members: