# Introduction to atomman: Primitive cell dumping

Lucas M. Hale, lucas.hale@nist.gov, Materials Science and Engineering Division, NIST.

Disclaimers

## 1. Introduction

This is a utility dump method that uses spglib to analyze the symmetry of a given atomman System and return the corresponding primitive cell. It is slightly different from the other dump methods in that it returns a new System rather than another type of object.

NOTE: Requires that spglib be installed.

Library Imports

[1]:

# Standard Python libraries
import datetime

# http://www.numpy.org/
import numpy as np

import atomman as am
import atomman.unitconvert as uc

# Show atomman version
print('atomman version =', am.__version__)

# Show date of Notebook execution
print('Notebook executed on', datetime.date.today())

atomman version = 1.4.8
Notebook executed on 2023-01-27


## 2. Dump

### 2.1. System.dump(‘primitive_cell’)

Create a new System based on the identified symmetric primitive unit cell of the current System.

Parameters

• symprec (float, optional) Absolute length tolerance to use in identifying symmetry of atomic sites and system boundaries. Default value is 1e-5.

• normalize (str or None, optional) Indicates which normalization scheme, if any, to use on the identified primitive cell. None will return exactly as obtained from spglib. Default value is ‘lammps’, meaning that the cell will be compatible with LAMMPS.

Returns

• ucell (atomman.System) The identified primitive unit cell as a System object.

[2]:

# Create a 3x3x3 fcc supercell
fcc = am.load('prototype', 'A1--Cu--fcc', a=4.05, symbols='Al')
system = fcc.supersize(3,3,3)

# Dump the primitive cell
p_ucell = system.dump('primitive_cell')
print(p_ucell)

avect =  [ 2.864,  0.000,  0.000]
bvect =  [ 1.432,  2.480,  0.000]
cvect =  [ 1.432,  0.827,  2.338]
origin = [ 0.000,  0.000,  0.000]
natoms = 1
natypes = 1
symbols = ('Al',)
pbc = [ True  True  True]
per-atom properties = ['atype', 'pos']
id   atype  pos[0]  pos[1]  pos[2]
0       1   5.728   3.307   2.338