Ejemplo n.º 1
0
    def log(self):
        log(" Nr Pop Chg              Energy          Ionization            Affinity")
        log.hline()
        for number, cases in sorted(self.all.iteritems()):
            for pop, energy in sorted(cases.iteritems()):
                energy_prev = cases.get(pop - 1)
                if energy_prev is None:
                    ip_str = ""
                else:
                    ip_str = "% 18.10f" % (energy_prev - energy)

                energy_next = cases.get(pop + 1)
                if energy_next is None:
                    ea_str = ""
                else:
                    ea_str = "% 18.10f" % (energy - energy_next)

                log("%3i %3i %+3i  % 18.10f  %18s  %18s" % (number, pop, number - pop, energy, ip_str, ea_str))
            log.blank()
Ejemplo n.º 2
0
    def log(self):
        log(' Nr Pop Chg              Energy          Ionization            Affinity'
            )
        log.hline()
        for number, cases in sorted(self.all.iteritems()):
            for pop, energy in sorted(cases.iteritems()):
                energy_prev = cases.get(pop - 1)
                if energy_prev is None:
                    ip_str = ''
                else:
                    ip_str = '% 18.10f' % (energy_prev - energy)

                energy_next = cases.get(pop + 1)
                if energy_next is None:
                    ea_str = ''
                else:
                    ea_str = '% 18.10f' % (energy - energy_next)

                log('%3i %3i %+3i  % 18.10f  %18s  %18s' %
                    (number, pop, number - pop, energy, ip_str, ea_str))
            log.blank()