radtools.Crystal.get_atom#
method
- Crystal.get_atom(name, index=None, return_all=False)[source]#
Return atom object of the crystal.
- Parameters:
- namestr
Name of the atom. In general not unique. If
namecontains "__", then it is split intonameandindex.- indexint, optional
Index of the atom.
- return_allbool, default False
Whether to return the list of non-unique matches or raise an
ValueError.
- Returns:
- Raises:
- ValueError
If no match is found or the match is not unique and
return_allisFalse.
Notes
indexin combination withnameis supposed to be a unique value, however it uniqueness is not strictly checked, pay attention in custom cases.