# Path: molml/constants.py
# ELE_TO_NUM = bidict({
#     'H': 1,
#     'C': 6,
#     'N': 7,
#     'O': 8,
#     'F': 9,
#     'P': 15,
#     'S': 16,
#     'Cl': 17,
#     'Br': 35,
#     'I': 53,
#     'Se': 34
# })
# 
# TYPE_ORDER = ['1', 'Ar', '2', '3']
# 
# BOND_LENGTHS = {
#     "C": {
#         "3":   0.62,
#         "2":   0.69,
#         "Ar": 0.72,
#         "1":   0.85,
#     },
#     "Cl": {
#         "1":   1.045,
#     },
#     "F": {
#         "1":   1.23,
#     },
#     "H": {
#         "1":   0.6,
#     },
#     "N": {
#         "3":   0.565,
#         "2":   0.63,
#         "Ar": 0.655,
#         "1":   0.74,
#     },
#     "O": {
#         "3":   0.53,
#         "2":   0.59,
#         "Ar": 0.62,
#         "1":   0.695,
#     },
#     "P": {
#         "2":   0.945,
#         "Ar": 0.985,
#         "1":   1.11,
#     },
#     "S": {
#         "2":   0.905,
#         "Ar": 0.945,
#         "1":   1.07,
#     },
# }
# 
# UNKNOWN = 'UNKNOWN'


from builtins import range
from collections import Counter
from itertools import product, combinations
from scipy.spatial.distance import cdist
from scipy.special import expit
from .constants import ELE_TO_NUM, TYPE_ORDER, BOND_LENGTHS, UNKNOWN
import importlib
import json
import warnings
import numpy
import scipy.stats
        if self._connections is None:
            self._connections = get_connections(self.elements, self.coords)
        return self._connections

    @property
    def unit_cell(self):
        if self._unit_cell is None:
            raise ValueError("No unit cell exists.")
        return self._unit_cell

    @property
    def coords(self):
        if self._coords is None:
            raise ValueError("No coordinates exist.")
        return self._coords

    @property
    def numbers(self):
        if self._numbers is None:
            if self._elements is not None:
                temp = [ELE_TO_NUM[x] for x in self._elements]
                self._numbers = numpy.array(temp)
            else:
                raise ValueError("No elements to convert to numbers.")
        return self._numbers

    @property
    def elements(self):
        if self._elements is None:
            if self._numbers is not None:

# Path: molml/constants.py
# ELE_TO_NUM = bidict({
#     'H': 1,
#     'C': 6,
#     'N': 7,
#     'O': 8,
#     'F': 9,
#     'P': 15,
#     'S': 16,
#     'Cl': 17,
#     'Br': 35,
#     'I': 53,
#     'Se': 34
# })
# 
# TYPE_ORDER = ['1', 'Ar', '2', '3']
# 
# BOND_LENGTHS = {
#     "C": {
#         "3":   0.62,
#         "2":   0.69,
#         "Ar": 0.72,
#         "1":   0.85,
#     },
#     "Cl": {
#         "1":   1.045,
#     },
#     "F": {
#         "1":   1.23,
#     },
#     "H": {
#         "1":   0.6,
#     },
#     "N": {
#         "3":   0.565,
#         "2":   0.63,
#         "Ar": 0.655,
#         "1":   0.74,
#     },
#     "O": {
#         "3":   0.53,
#         "2":   0.59,
#         "Ar": 0.62,
#         "1":   0.695,
#     },
#     "P": {
#         "2":   0.945,
#         "Ar": 0.985,
#         "1":   1.11,
#     },
#     "S": {
#         "2":   0.905,
#         "Ar": 0.945,
#         "1":   1.07,
#     },
# }
# 
# UNKNOWN = 'UNKNOWN'


# Path: molml/utils.py
from builtins import range
from collections import Counter
from itertools import product, combinations
from scipy.spatial.distance import cdist
from scipy.special import expit
from .constants import ELE_TO_NUM, TYPE_ORDER, BOND_LENGTHS, UNKNOWN
import importlib
import json
import warnings
import numpy
import scipy.stats

        if self._connections is None:
            self._connections = get_connections(self.elements, self.coords)
        return self._connections

    @property
    def unit_cell(self):
        if self._unit_cell is None:
            raise ValueError("No unit cell exists.")
        return self._unit_cell

    @property
    def coords(self):
        if self._coords is None:
            raise ValueError("No coordinates exist.")
        return self._coords

    @property
    def numbers(self):
        if self._numbers is None:
            if self._elements is not None:
                temp = [ELE_TO_NUM[x] for x in self._elements]
                self._numbers = numpy.array(temp)
            else:
                raise ValueError("No elements to convert to numbers.")
        return self._numbers

    @property
    def elements(self):
        if self._elements is None:
            if self._numbers is not None:

                temp = [ELE_TO_NUM.inv[x] for x in self._numbers]