lattpy.atom

Objects for representing atoms and the unitcell of a lattice.

class lattpy.atom.Atom(name=None, radius=0.2, color=None, weight=1.0, **kwargs)[source]

Bases: MutableMapping

Object representing an atom of a Bravais lattice.

Parameters
namestr, optional

The name of the atom. The default is ‘A’.

radiusfloat, optional

The radius of the atom in real space.

colorstr or float or array_like, optional

The color used to visualize the atom.

weightfloat, optional

The weight of the atom.

**kwargs

Additional attributes of the atom.

property id

The id of the atom.

property index

Return the index of the Atom instance.

property name

Return the name of the Atom instance.

property weight

Return the weight or the Atom instance.

dict()[source]

Returns the data of the Atom instance as a dictionary.

copy()[source]

Creates a deep copy of the Atom instance.

get(k[, d]) D[k] if k in D, else d.  d defaults to None.[source]
is_identical(other)[source]

Checks if the other Atom is identical to this one.