# Path: veidt/monte_carlo/base.py
# class StaticState(State):
#     """
#     StaticState does not change the state when calling the change method
#     """
# 
#     def change(self):
#         pass
# 
# Path: veidt/monte_carlo/state.py
# class Chain(object):
#     """
#     A chain of states class
# 
#     To do, need to check states variable changes over steps"""
# 
#     def __init__(self):
#         self.chain = defaultdict(list)
#         self.length = 0
#         self.current_state = None
# 
#     def append(self, state_dict):
#         """Append new states
#         :param state_dict: StateDict object
#         """
# 
#         # append state variables
#         for state_name, state in state_dict.items():
#             if not isinstance(state, StaticState):
#                 self.chain[state_name].append(state.state)
#                 # state can observe the chain change
#                 state._chain = self
#         self.length += 1
#         self.current_state = state_dict
# 
#     @property
#     def state_names(self):
#         """
#         state name list
#         :return: list, state names
#         """
#         return list(self.chain.keys())
# 
#     def clear(self):
#         self.chain = defaultdict(list)


from veidt.monte_carlo.base import StaticState
from veidt.monte_carlo.state import Chain

kb = 8.61733e-5


class Sampler(object):
    def __init__(self, state_structure, ensemble):
        """

        :param state_structure: StateStructure object
        :param ensemble: Ensemble object
        """
        self.state_structure = state_structure
        self.ensemble = ensemble
        self.chain = Chain()

        # Add static state as attributes, e.g., constant temperature etc
        for i, j in self.state_structure.state_dict.items():

# Path: veidt/monte_carlo/base.py
# class StaticState(State):
#     """
#     StaticState does not change the state when calling the change method
#     """
# 
#     def change(self):
#         pass
# 
# Path: veidt/monte_carlo/state.py
# class Chain(object):
#     """
#     A chain of states class
# 
#     To do, need to check states variable changes over steps"""
# 
#     def __init__(self):
#         self.chain = defaultdict(list)
#         self.length = 0
#         self.current_state = None
# 
#     def append(self, state_dict):
#         """Append new states
#         :param state_dict: StateDict object
#         """
# 
#         # append state variables
#         for state_name, state in state_dict.items():
#             if not isinstance(state, StaticState):
#                 self.chain[state_name].append(state.state)
#                 # state can observe the chain change
#                 state._chain = self
#         self.length += 1
#         self.current_state = state_dict
# 
#     @property
#     def state_names(self):
#         """
#         state name list
#         :return: list, state names
#         """
#         return list(self.chain.keys())
# 
#     def clear(self):
#         self.chain = defaultdict(list)


# Path: veidt/monte_carlo/samplers/base.py
from veidt.monte_carlo.base import StaticState
from veidt.monte_carlo.state import Chain


kb = 8.61733e-5


class Sampler(object):
    def __init__(self, state_structure, ensemble):
        """

        :param state_structure: StateStructure object
        :param ensemble: Ensemble object
        """
        self.state_structure = state_structure
        self.ensemble = ensemble
        self.chain = Chain()

        # Add static state as attributes, e.g., constant temperature etc
        for i, j in self.state_structure.state_dict.items():

            if isinstance(j, StaticState):