# Path: molmod/units.py
# def parse_unit(expression):


import sys
import os
import platform
import datetime
import getpass
import codecs
import locale
import functools
    from time import process_time
    from time import clock as process_time
from contextlib import contextmanager
from molmod.units import kjmol, kcalmol, electronvolt, angstrom, nanometer, \
    femtosecond, picosecond, amu, deg, gram, centimeter
                log('The following units will be used below:')
                log.hline()
                log('Kind          Conversion               Format Notation')
                log.hline()
                for unit in self.units:
                    log('%13s %21.15e %9s %s' % (unit.kind, unit.conversion, unit.format, unit.notation))
                log.hline()
                log('The internal data is divided by the corresponding conversion factor before it gets printed on screen.')

    def apply(self, some):
        for unit in self.units:
            some.__dict__[unit.kind] = unit


class ScreenLog(object):
    # log levels
    silent = 0
    warning = 1
    low = 2
    medium = 3
    high = 4
    debug = 5

    # screen parameters
    margin = 8
    width = 72

    # unit systems
    # TODO: the formats may need some tuning
    joule = UnitSystem(

# Path: molmod/units.py
# def parse_unit(expression):


# Path: molmod/log.py
import sys
import os
import platform
import datetime
import getpass
import codecs
import locale
import functools
    from time import process_time
    from time import clock as process_time
from contextlib import contextmanager
from molmod.units import kjmol, kcalmol, electronvolt, angstrom, nanometer, \
    femtosecond, picosecond, amu, deg, gram, centimeter

                log('The following units will be used below:')
                log.hline()
                log('Kind          Conversion               Format Notation')
                log.hline()
                for unit in self.units:
                    log('%13s %21.15e %9s %s' % (unit.kind, unit.conversion, unit.format, unit.notation))
                log.hline()
                log('The internal data is divided by the corresponding conversion factor before it gets printed on screen.')

    def apply(self, some):
        for unit in self.units:
            some.__dict__[unit.kind] = unit


class ScreenLog(object):
    # log levels
    silent = 0
    warning = 1
    low = 2
    medium = 3
    high = 4
    debug = 5

    # screen parameters
    margin = 8
    width = 72

    # unit systems
    # TODO: the formats may need some tuning
    joule = UnitSystem(

        Unit('energy', kjmol, 'kJ/mol', '%10.1f'),