pwtools.pwscf.atpos_str¶
- pwtools.pwscf.atpos_str(symbols, coords, fmt='%.16e', zero_eps=None, eps=np.float64(2.220446049250313e-16), delim=' ')[source]¶
Convenience function to make a string for the ATOMIC_POSITIONS section of a pw.x input file.
- Parameters:
symbols (sequence) – strings with atom symbols, (natoms,), must match with the rows of coords
coords (array (natoms, 3)) – with atomic coords, can also be (natoms, >3) to add constraints on atomic forces in PWscf
eps (float) – Print values as 0.0 where abs(coords[i,j]) < eps. If eps < 0.0, then disable this.
delim (str) – delimiter between columns
- Return type:
string
Examples
>>> print atpos_str(['Al', 'N'], array([[0,0,0], [0,0,1.]])) Al 0.0000000000 0.0000000000 0.0000000000 N 0.0000000000 0.0000000000 1.0000000000