swsym.position#
Syntax#
[r, aIdx, opInfo] = swsym.position(sym,r0)
[r, aIdx, opInfo] = swsym.position(sym,r0,fid)
[r, aIdx, opInfo] = swsym.position(sym,r0,fid,tol)
Description#
[r, aIdx, opInfo] = swsym.position(sym, r0, fid, tol) generates all
symmetry equivalent atomic positions from a given space group and
coordinates of the symmetry inequivalent atoms. If fid is defined, the
result are printed onto the corresponding file.
Input Arguments#
symEither the label of the space group or the index from the International Tables of Crystallography or string containing the space group operators in the same format as used in the
symmetry.datfile (for details see swsym.str).r0Atomic position in lattice units in a matrix with dimensions of \([3\times n_{atom}]\).
fidIf non-zero, the symmetry operators will be printed to the file identified by
fid, the following values are valid:0no printed output (default),1standard output (Command Line),fidtext file opened before usingfid = fopen(path).
tolTolerance, distance within two atoms are considered identical, default value is \(10^{-5}\) lattice unit. Necessary to check for badly defined atomic positions (when atoms are not exactly on the symmetry element) and to avoid numerical errors.
Output Arguments#
rAll generated atomic positions stored in a matrix with dimensions of \([3\times n_{genAtom}]\).
aIdxThe index of the symmetry inequivalent position for every generated position, stored in a row vector with \(n_{genAtom}\) number of elements.
opInfoStructure with the following fields:
ismovedCell, where each element contains a vector with logical values, whether the given operator moved the atom or not. Each vector has a dimensions of \([1\times n_{sym}]\), where the \(n_{sym}\) is multiplicity of the general position.opmoveThe rotation operator that moved the original atom the equivalent position stored in a matrix with dimensions of \([3\times 3\times n_{genAtom}]\).