atomList = atom(obj)


atomList = atom(obj) generates all atomic positions using the symmetry operators stored in obj.lattice.sym and the symmetry inequivalent atomic positions in obj.unit_cell.r. If no symmetry is defined (denoted symmetry) or the symmetry is the function returns simply the positions stored in obj.unit_cell.r.


Here we create a new space group, that contains all the translations of the FCC lattice. Then create a crystal with an atom at [0 0 0] position. The cryst.atom lists all 4 symmetry equivalent positions generated using the FCC symmetry operators:

cryst = spinw
opStr = 'x+1/2,y+1/2,z;x+1/2,y,z+1/2;x,y+1/2,z+1/2';
cryst.genlattice('lat_const',[8 8 8],'spgr',opStr,'label','FCC')
cryst.addatom('r',[0 0 0],'label','Atom1')
atomList = cryst.atom


         0    0.5000    0.5000         0
         0    0.5000         0    0.5000
         0         0    0.5000    0.5000

Input Arguments

spinw object.

Output Arguments

atomList is a structure with the following fields:

  • r Positions of the atoms in lattice units stored in matrix with dimensions of .
  • idx Indices of the atoms in the spinw.unit_cell field stored in a matrix with dimensions of .
  • mag Vector of logical variables, true if the spin of the atom is non-zero, dimensions are .

See Also

spinw | spinw.matom | swsym.add | spinw.genlattice | spinw.addatom