httk.iface package

Submodules

httk.iface.ase_if module

httk.iface.ase_if.rc_structure_to_symbols_and_scaled_positions(struct)[source]
httk.iface.ase_if.uc_structure_to_symbols_and_scaled_positions(struct)[source]

httk.iface.cif2cell_if module

httk.iface.cif2cell_if.out_to_struct(ioa)[source]

Example input:

OUTPUT CELL INFORMATION
Symmetry information:
Trigonal crystal system.
Space group number     : 165
Hall symbol            : -P 3 2"c
Hermann-Mauguin symbol : P-3c1

Bravais lattice vectors :
  0.8660254  -0.5000000   0.0000000 
  0.0000000   1.0000000   0.0000000 
  0.0000000   0.0000000   1.0231037 
All sites, (lattice coordinates):
Atom           a1          a2          a3 
La      0.6609000   0.0000000   0.2500000
La      0.3391000   0.0000000   0.7500000
...
F       0.0000000   0.0000000   0.2500000
F       0.0000000   0.0000000   0.7500000

Unit cell volume  : 328.6477016 A^3
Unit cell density :   3.5764559 u/A^3 =   5.9388437 g/cm^3

httk.iface.gulp_if module

httk.iface.gulp_if.generate_fake_potentials(species)[source]
httk.iface.gulp_if.generate_fake_potentials_try2(species)[source]
httk.iface.gulp_if.structure_to_gulp(iof, struct, runspec='single conp', postcards=[], potentials=None)[source]

Writes a file on gulp input format.

httk.iface.isotropy_if module

httk.iface.isotropy_if.out_to_cif(ioa, assignments, getwyckoff=False)[source]
httk.iface.isotropy_if.reduced_coordgroups_to_input(coordgroups, cell, comment='FINDSYM input', accuracy=0.001)[source]
httk.iface.isotropy_if.struct_to_input(struct)[source]

httk.iface.jmol_if module

httk.iface.jmol_if.structure_to_jmol(iof, struct, extbonds=True, repeat=None, copies=None)[source]

Converts structure into jmol format.

Example output format::
load data ‘model’ 1 Computation1 Al 0 0 0 end ‘model’ { 4 4 4 } supercell “x, y, z ” unitcell [ 2.025 2.025 0 2.025 0 2.025 0 2.025 2.025 ] set slabByAtom TRUE unitcell {1/1 1/1 1/1} delete (NOT (unitcell OR connected(unitcell))) {connected(unitcell) AND NOT unitcell}.radius = 0 restrict cell={2 2 2} center visible zoom 0

httk.iface.openbabel_if_notstable module

httk.iface.openbabel_if_notstable.readstruct(ioa, struct, importers=None)[source]

httk.iface.platon_if module

This module is a mess and in need of heavy cleanup.

httk.iface.platon_if.get_stidy_spacegroup(parse)[source]
httk.iface.platon_if.platon_lis_to_struct_broken(ioa)[source]

Example input format:

                                                       ============
====================================================== Crystal Data ================================================================
                                                       ============
                        Input Cell  (Lattice Type: P)   -   Temp =   0K             Reduced Cell     (Acta Cryst.(1976),A32,297-298)
---------------------------------------------------------------------------------   ------------------------------------------------
a =       3.47100  Angstrom                alpha =            90 Degree             a  =    3.471     alpha  =   90.00  V  =    79.6
b =       3.47100                           beta =            90                    b  =    3.471     beta   =   90.00              
c =       6.60300                          gamma =            90                    c  =    6.603     gamma  =   90.00              

...

------------------------------------------------------------------------------------------------------------------------------------
Flags Label         Fractional Coordinates (x,y,z)          Orthogonal Coordinates (XO,YO,ZO)   Site SSN*SSOF =    S.O.F   Move Type
------------------------------------------------------------------------------------------------------------------------------------
-     Ag(1)              1/4            1/4        0.61200      0.8677      0.8677      4.0410   4mm  8   1/8          1    -    Met
-     Zr(2)              1/4            1/4        0.13700      0.8677      0.8677      0.9046   4mm  8   1/8          1    -    Met
-     Ag(1)a            -1/4           -1/4       -0.61200     -0.8677     -0.8677     -4.0410   4mm  8   1/8          1   5.455 Met
-     Zr(2)a            -1/4           -1/4       -0.13700     -0.8677     -0.8677     -0.9046   4mm  8   1/8          1   5.455 Met
-     Ag(1)b            -1/4           -1/4        0.38800     -0.8678     -0.8678      2.5620   4mm  8   1/8          1   5.456 Met
-     Zr(2)b            -1/4           -1/4        0.86300     -0.8678     -0.8678      5.6984   4mm  8   1/8          1   5.456 Met
-     Ag(1)c            -1/4            3/4       -0.61200     -0.8677      2.6033     -4.0410   4mm  8   1/8          1   5.465 Met
-     Zr(2)c            -1/4            3/4       -0.13700     -0.8678      2.6033     -0.9046   4mm  8   1/8          1   5.465 Met
-     Ag(1)d            -1/4            3/4        0.38800     -0.8678      2.6033      2.5620   4mm  8   1/8          1   5.466 Met
-     Zr(2)d            -1/4            3/4        0.86300     -0.8678      2.6032      5.6984   4mm  8   1/8          1   5.466 Met
-     Ag(1)e             3/4           -1/4       -0.61200      2.6033     -0.8677     -4.0410   4mm  8   1/8          1   5.555 Met
-     Zr(2)e             3/4           -1/4       -0.13700      2.6033     -0.8677     -0.9046   4mm  8   1/8          1   5.555 Met
-     Ag(1)f             3/4           -1/4        0.38800      2.6033     -0.8678      2.5620   4mm  8   1/8          1   5.556 Met
-     Zr(2)f             3/4           -1/4        0.86300      2.6032     -0.8678      5.6984   4mm  8   1/8          1   5.556 Met
-     Ag(1)g             3/4            3/4       -0.61200      2.6033      2.6033     -4.0410   4mm  8   1/8          1   5.565 Met
-     Zr(2)g             3/4            3/4       -0.13700      2.6033      2.6033     -0.9046   4mm  8   1/8          1   5.565 Met
-     Ag(1)h             3/4            3/4        0.38800      2.6033      2.6033      2.5620   4mm  8   1/8          1   5.566 Met
-     Zr(2)h             3/4            3/4        0.86300      2.6032      2.6032      5.6984   4mm  8   1/8          1   5.566 Met
====================================================================================================================================
httk.iface.platon_if.platon_lis_to_struct_broken2(ioa)[source]

Example input:

                                                       ============
====================================================== Crystal Data ================================================================
                                                       ============
                        Input Cell  (Lattice Type: P)   -   Temp =   0K             Reduced Cell     (Acta Cryst.(1976),A32,297-298)
---------------------------------------------------------------------------------   ------------------------------------------------
a =       3.47100  Angstrom                alpha =            90 Degree             a  =    3.471     alpha  =   90.00  V  =    79.6
b =       3.47100                           beta =            90                    b  =    3.471     beta   =   90.00              
c =       6.60300                          gamma =            90                    c  =    6.603     gamma  =   90.00              

...

====================================================================================================================================
10.0 Angstrom Coordination Sphere Around Atom I = Ag(1)  [ARU = 1555.01]             1/4      1/4  0.61200    0.8677  0.8677  4.0410
------------------------------------------------------------------------------------------------------------------------------------
 Nr     d(I,J) To  Atom J  Symm_Oper. on Atom J    ARU(J)  Type     Phi     Mu         X        Y        Z        XO      YO      ZO
------------------------------------------------------------------------------------------------------------------------------------
 1      2.9615 --  Zr(4)  [                    =         ] Intra-135.00  34.03      -1/4     -1/4  0.86300   -0.8678 -0.8678  5.6984
 2      2.9615 --  Zr(4)n [1+x,1+y,z           =  1665.01] Intra  45.00  34.03       3/4      3/4  0.86300    2.6032  2.6032  5.6984
 3      2.9615 --  Zr(4)j [x,1+y,z             =  1565.01] Intra 135.00  34.03      -1/4      3/4  0.86300   -0.8678  2.6032  5.6984
 4      2.9615 --  Zr(4)l [1+x,y,z             =  1655.01] Intra -45.00  34.03       3/4     -1/4  0.86300    2.6032 -0.8678  5.6984
 5      3.1364 --  Zr(3)  [                    =         ] Intra   0.00 -90.00       1/4      1/4  0.13700    0.8677  0.8677  0.9046
httk.iface.platon_if.platon_sites_to_styin(ioa, sites, cell)[source]

Example input:

P 4 B M              
    5.5179    5.5179    3.9073   90.0000   90.0000   90.0000
Bi1       0.50000   0.00000   0.54500   0.50000
Ti1       0.00000   0.00000   0.00000
Na1       0.50000   0.00000   0.54500   0.50000
O1        0.00000   0.00000   0.51000
O2        0.72900   0.22900   0.01500
END
END
httk.iface.platon_if.platon_styin_to_sgstruct(ioa)[source]

Example input:

F -4 3 M id=[0] dblock_code=[44325-ICSD] formula= 5.5000 5.5000 5.5000 90.0000 90.0000 90.0000 N Sb1 0.25000 0.25000 0.25000 Al1 0.00000 0.00000 0.00000 END END
httk.iface.platon_if.platon_styout_to_sgstruct(ioa)[source]

Example input:

Results for  id=[0] dblock_code=[44325-I New: F-43m 
=====================================================

Pearson code : cF   8  Sb  4.0  Al  4.0
Cell parameters :   7.7782  7.7782  7.7782   90.000   90.000   90.000
Space group symbol : F -4 3 m   Number in IT : 216

Setting x,y,z             Origin ( 0.0000 0.0000 0.0000)  Gamma =  0.4330

       Al1       4(c)  1/4     1/4     1/4                             Al   1
      Sb1        4(a)  0       0       0                               Sb   1

Wyckoff sequence : c a                                                                                                         

Volume of Unit Cell :   470.5842


OTHER Standardization with Similar Gamma :

Setting -x,-y,-z          Origin ( 0.7500 0.7500 0.7500)  Gamma =  0.4330

      Sb1        4(c)  1/4     1/4     1/4                             Sb   1
       Al1       4(a)  0       0       0                               Al   1

Wyckoff sequence : c a                                                                                                         

Volume of Unit Cell :   470.5842
httk.iface.platon_if.platon_styout_to_structure(ioa, based_on_struct=None)[source]

Example input:

Results for  id=[0] dblock_code=[44325-I New: F-43m 
=====================================================

Pearson code : cF   8  Sb  4.0  Al  4.0
Cell parameters :   7.7782  7.7782  7.7782   90.000   90.000   90.000
Space group symbol : F -4 3 m   Number in IT : 216

Setting x,y,z             Origin ( 0.0000 0.0000 0.0000)  Gamma =  0.4330

       Al1       4(c)  1/4     1/4     1/4                             Al   1
      Sb1        4(a)  0       0       0                               Sb   1

Wyckoff sequence : c a                                                                                                         

Volume of Unit Cell :   470.5842


OTHER Standardization with Similar Gamma :

Setting -x,-y,-z          Origin ( 0.7500 0.7500 0.7500)  Gamma =  0.4330

      Sb1        4(c)  1/4     1/4     1/4                             Sb   1
       Al1       4(a)  0       0       0                               Al   1

Wyckoff sequence : c a                                                                                                         

Volume of Unit Cell :   470.5842
httk.iface.platon_if.sites_to_platon(ioa, sites, cell, precards, postcards)[source]

Writes a file on PLATONS input format.

httk.iface.platon_if.structure_to_platon(ioa, struct, precards, postcards)[source]

Writes a file on PLATONS input format.

httk.iface.spglib_if module

httk.iface.spglib_if.spglib_out_to_struct(out)[source]

httk.iface.vasp_if module

class httk.iface.vasp_if.DoscarReader(ioa)[source]
parse()[source]
class httk.iface.vasp_if.KpointsReader(ioa)[source]
parse()[source]
class httk.iface.vasp_if.OutcarReader(ioa, get_fermi=True, get_kpts_and_eigvals=True)[source]
parse()[source]
class httk.iface.vasp_if.PoscarReader(ioa)[source]
parse()[source]
httk.iface.vasp_if.calculate_kpoints(struct, dens=20)[source]
httk.iface.vasp_if.construct_klists(klines, points, recbasis)[source]
httk.iface.vasp_if.copy_template(dirtemplate, dirname, templatename)[source]
httk.iface.vasp_if.eigenvalues_to_bandlines(eigenvalues, klist)[source]

Returns bandlines which is an array per spin per each kline, containing a list with one entry per bands of [‘relative kpoint distance’, ‘energy’] for each kpoint in that kline

httk.iface.vasp_if.gapdata_dos(energies, tdos, fermi)[source]
httk.iface.vasp_if.gapdata_eigenvalues(eigenvalues, kpts, fermi)[source]
httk.iface.vasp_if.get_magmom(symbol)[source]
httk.iface.vasp_if.get_magnetizations(ionlist, high, low)[source]
httk.iface.vasp_if.get_pseudopotential(species, poscarspath=None)[source]
httk.iface.vasp_if.is_dualmagnetic(ion, ionlist)[source]
httk.iface.vasp_if.magnetization_recurse(basemags, dualmags, high, low)[source]
httk.iface.vasp_if.parse_doscar(ioa)[source]
httk.iface.vasp_if.parse_kpoints(ioa)[source]
httk.iface.vasp_if.parse_outcar(ioa, get_fermi=True, get_kpts_and_eigvals=True)[source]
httk.iface.vasp_if.poscar_to_strs(fio)[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.poscar_to_structure(f)[source]
httk.iface.vasp_if.prepare_single_run(dirpath, struct, poscarspath=None, template='t:/vasp/single/static', overwrite=False)[source]
httk.iface.vasp_if.read_doscar(ioa)[source]
httk.iface.vasp_if.read_kpoints(ioa)[source]
httk.iface.vasp_if.read_outcar(ioa)[source]
httk.iface.vasp_if.read_poscar(ioa)[source]
httk.iface.vasp_if.structure_to_comment(struct)[source]
httk.iface.vasp_if.structure_to_poscar(f, struct, fix_negative_determinant=False, comment=None)[source]
httk.iface.vasp_if.write_generic_kpoints_file(fio, comment=None, mp=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)

Module contents

httk Interface module

  • The interface between httk and other software. Note: the idea is that this module should be useable without the other software installed. E.g., generation of input files to gulp shouldn’t require gulp installed.