Example #1
0
        if os.path.exists(gruneisen_filename):
            contents += "g"
        else:
            contents += "."
        if os.path.exists(qha_filename):
            contents += "q"
        else:
            contents += "."

        w.write(tmpl_mp.format(mid=num,
                               pretty_formula=pretty_formula,
                               contents=contents,
                               spg="%s (%d) / %s" % (symmetry['international'],
                                                     symmetry['number'],
                                                     symmetry['hall']),
                               num_units="%d" % get_Z(cell.get_numbers()),
                               filename="mp-%d.tar.lzma" % num,
                               date="%d-%d-%d" % (today.year,
                                                  today.month,
                                                  today.day)))
    
        if os.path.exists(dos_filename):
            w.write("Phonon DOS\n")
            w.write("-----------\n\n")
            w.write(".. image:: mp-{mid}-dos.png\n\n".format(mid=num))

        if os.path.exists(tprops_filename):
            w.write("Thermal properties at constant volume\n")
            w.write("--------------------------------------\n\n")
            w.write(".. image:: mp-{mid}-tprops.png\n\n".format(mid=num))
Example #2
0
 def _get_Z(self):
     primitive = self._phonon.get_primitive()
     numbers = primitive.get_atomic_numbers()
     return get_Z(numbers)