stack
Full name: ase2sprkkr.ase.build.stack
- ase2sprkkr.ase.build.stack(atomses, axis, at=None, relative=False, scale='pbc', check_strain='auto', max_strain=1e-10, check_pbc=True, periodic=False)[source]
Stack (concatenate) the atoms objects along given axis
This function is very similiar to ase.build.stack, but it support more than two atoms object to be stacked on themselves, and the arguments are a bit different.
#TODO - could be this and ASE stack function merged together?
- Parameters
atomses (List[Atoms]) – List of atoms objects to be concatenated.
axis (int) – Along which axis should be the atoms concatenated. The atoms are then stacked so the [0,0,0] relative coordinates of the (n+1)th atoms are located at [1,0,0], [0,1,0] or [0,0,1] respepectively (according to the axis argument) relative cell coordinates of the nth atoms object. The at can shift these distances.
at (Optional[List[Optional[List[int]]]]) – Determines the positions of the origins of coordinates of the atoms objects in the resulting objects. If it is None or [0,0,0] for the (n+1)th atoms, then the coordinates are determined as the coordinates of the nth atoms plus the axis-th cell vector. There can be n+1 items in the stack, then the last one determine the axis-th cell vector of the resulting atoms object. If the given item is just one scalar r, it is considered as r*unitary vector along the axis.
relative (bool) – If True, the coordinates in at are considered as relative to the cell corner (see the axis argument).
scale –
If True, the stacked atoms are scaled in the two dimensions (not in the axis one) so the corresponding two cell vectors are the same as these of the first atoms.
The default value
'pbc'
means, that scaling is done only if the given axis is periodic.check_strain –
Check the compatibility of the cells along the other two axes (not the one along which the atoms are stacked).
If True, the maximal strain cannot exceeded the max_strain argument. The default value
'auto'
means the same value as scale. The value'pbc'
means check the strain only along the axes that are periodic.If the strain is exceeded, a ValueError is raised.
max_strain – The limit for a maximal (relative to the norm of the corresponding first atoms cell vector) displacement of the cell vectors.
check_pbc – If True, all the atoms objects have to have the same pbc along the other two axes.
periodic – The pbc of the resulting object along the axis.