httk.iface.vasp_if module¶
-
httk.iface.vasp_if.
poscar_to_strs
(fio, included_decimals='')[source]¶ - Parses a file on VASPs POSCAR format. Returns
- (cell, scale, vol, coords, coords_reduced, counts, occupations, comment)
- where
- cell: 3x3 nested list of strings designating the cell scale: string representing the overall scale of the cell vol: string representing the volume of the cell (only one of scale and vol will be set, the other one = None) coords: Nx3 nested list of strings designating the coordinates coords_reduced: bool, true = coords are given in reduced coordinate (in vasp D or Direct), false = coords are given in cartesian coordinates counts: how many atoms of each type occupations: which species of each atom type (integers), or -1, … -N if no species are given. comment: the comment string given at the top of the file
-
httk.iface.vasp_if.
prepare_single_run
(dirpath, struct, poscarspath=None, template='t:/vasp/single/static', overwrite=False)[source]¶
-
httk.iface.vasp_if.
structure_to_poscar
(f, struct, fix_negative_determinant=False, comment=None, primitive_cell=True)[source]¶
-
httk.iface.vasp_if.
write_kpoints_file
(fio, kpoints, comment=None, mp=True, gamma_centered=False)[source]¶
-
httk.iface.vasp_if.
write_poscar
(fio, cell, coords, coords_reduced, counts, occupations, comment='Comment', scale='1', vol=None)[source]¶ Writes a file on VASPs POSCAR format. Where it says string below, any type that works with str(x) is also ok.
- Input arguments
- f: file stream to put output on cell: 3x3 nested list of strings designating the cell coords: Nx3 nested list of strings designating the coordinates coords_reduced: bool, true = coords are given in reduced coordinate (in vasp D or Direct), false = coords are given in cartesian coordinates counts: how many atoms of each type occupations: which species of each atom type comment: (optional) the comment string given at the top of the file scale: (optional) string representing the overall scale of the cell vol: string representing the volume of the cell (only one of scale and vol can be set)