wulfric.crystal.cure_negative#
- wulfric.crystal.cure_negative(atoms) None[source]#
Shifts all atoms with the same vector in a way that all relative coordinates becomes non-negative.
Modifies given
atomsdictionary.- Parameters:
- atomsdict
Dictionary with atoms. Must have a
"positions"with value of (N,3) array-like.
Examples
>>> import wulfric as wulf >>> cell=[[2, 0, 0], [0, 2, 0], [0, 0, 2]] >>> atoms = {"names" : ['Cr1', 'Cr2'], "positions" : [[-0.5, 0.5, 0.0], [0.1, 0.5, 0.0]] } >>> wulf.crystal.cure_negative(atoms) >>> for i in range(len(atoms["names"])): ... print(atoms["names"][i], atoms["positions"][i]) ... Cr1 [0. 0.5 0. ] Cr2 [0.6 0.5 0. ]