# Path: pytim/atoms_maps.py



from abc import abstractproperty
from .atoms_maps import atoms_maps
from difflib import get_close_matches
import MDAnalysis
import importlib
import numpy as np
        universe.add_TopologyAttr(missing_class(values))
        if name == 'elements':
            types = MDAnalysis.topology.guessers.guess_types(group.names)
            # is there an inconsistency in the way 'element' is defined
            # in different modules in MDA?
            # Note: the second arg in .get() is the default.
            group.elements = np.array([t.ljust(2) for t in types])
        if name == 'radii':
            guess_radii(interface)


def weighted_close_match(string, dictionary):
    # increase weight of the first letter
    # this fixes problems with atom names like CH12
    _wdict = {}
    _dict = dictionary
    _str = string[0] + string[0] + string
    for key in _dict.keys():
        _wdict[key[0] + key[0] + key] = _dict[key]
    m = get_close_matches(_str, _wdict.keys(), n=1, cutoff=0.1)[0]
    return m[2:]


def _guess_radii_from_masses(interface, group, guessed):
    radii = np.copy(group.radii)
    masses = group.masses
    types = group.types
    unique_masses = np.unique(masses)
    # Let's not consider atoms with zero mass.
    unique_masses = unique_masses[unique_masses > 0]

# Path: pytim/atoms_maps.py



# Path: pytim/properties.py
from abc import abstractproperty
from .atoms_maps import atoms_maps
from difflib import get_close_matches
import MDAnalysis
import importlib
import numpy as np

        universe.add_TopologyAttr(missing_class(values))
        if name == 'elements':
            types = MDAnalysis.topology.guessers.guess_types(group.names)
            # is there an inconsistency in the way 'element' is defined
            # in different modules in MDA?
            # Note: the second arg in .get() is the default.
            group.elements = np.array([t.ljust(2) for t in types])
        if name == 'radii':
            guess_radii(interface)


def weighted_close_match(string, dictionary):
    # increase weight of the first letter
    # this fixes problems with atom names like CH12
    _wdict = {}
    _dict = dictionary
    _str = string[0] + string[0] + string
    for key in _dict.keys():
        _wdict[key[0] + key[0] + key] = _dict[key]
    m = get_close_matches(_str, _wdict.keys(), n=1, cutoff=0.1)[0]
    return m[2:]


def _guess_radii_from_masses(interface, group, guessed):
    radii = np.copy(group.radii)
    masses = group.masses
    types = group.types
    unique_masses = np.unique(masses)
    # Let's not consider atoms with zero mass.
    unique_masses = unique_masses[unique_masses > 0]

    d = atoms_maps