Esempio n. 1
0
 def test_read_poscar_yaml(self):
     filename = "POSCAR.yaml"
     cell, poscar_order = read_poscar_yaml(filename)
     for s, p in zip(cell.get_symbols(), cell.get_points().T):
         print s, p
     print write_poscar(cell)
     print poscar_order
Esempio n. 2
0
 def setUp(self):
     filename = "POSCAR.yaml"
     self._cell, poscar_order = read_poscar_yaml(filename)
Esempio n. 3
0
with open("index.rst", 'w') as w:
    w.write(tmpl_index.format(midstart="%d000" % d, midend="%d999" % d))
    for num in numbers:
        print num
        w.write("   mp-{num}\n".format(num=num))
        
# mp-{num}.rst
for num in numbers:
    pretty_formula = ""
    with open("/home/togo/autocalc/MP-data/data/mp-%d.dat" % num) as f:
        for line in f:
            if 'pretty_formula' in line:
                pretty_formula = line.split(':')[1].strip()
                break

    cell = read_poscar_yaml("mp-%d-POSCAR.yaml" % num)[0]
    symmetry = get_symmetry(cell)

    dos_filename = "mp-%d-dos.png" % num
    tprops_filename = "mp-%d-tprops.png" % num
    gruneisen_filename = "mp-%d-gruneisen.png" % num
    qha_filename = "mp-%d-qha.png" % num

    with open("mp-%d.rst" % num, 'w') as w:
        today = date.today()
        contents = ""
        if os.path.exists(dos_filename):
            contents += "d"
        else:
            contents += "."
        if os.path.exists(tprops_filename):