# 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
        self.units = units
        # check for duplicates
        for i0, unit0 in enumerate(self.units):
            for unit1 in self.units[:i0]:
                if unit0.kind == unit1.kind:
                    raise ValueError('The unit of \'%s\' is encountered twice.' % unit0.kind)

    def log_info(self, log):
        if log.do_low:
            with log.section('UNITS'):
                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

# 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

        self.units = units
        # check for duplicates
        for i0, unit0 in enumerate(self.units):
            for unit1 in self.units[:i0]:
                if unit0.kind == unit1.kind:
                    raise ValueError('The unit of \'%s\' is encountered twice.' % unit0.kind)

    def log_info(self, log):
        if log.do_low:
            with log.section('UNITS'):
                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