def _accept(self, system_changes):
        """Accept trial move.

        :param list system_changes: Proposed changes

        :return: True/False, if True the move is accepted
        :rtype: bool
        """
        move_accepted = Montecarlo._accept(self, system_changes)

        if not self.move_ok():
            return False
        return move_accepted
示例#2
0
    def _accept(self, system_changes):
        """Accept trial move.

        :param list system_changes: Proposed changes

        :return: True/False, if True the move is accepted
        :rtype: bool
        """
        # Note that we have to call the parent's accept first,
        # as the _mc_step function assumes that an energy
        # evaluation have been performed, prior to accepting
        # or rejecting the move
        move_accepted = Montecarlo._accept(self, system_changes)
        if self.network.move_creates_new_cluster(system_changes):
            return False

        # if not self.move_ok():
        #     return False
        return move_accepted
示例#3
0
 def _accept(self, system_changes):
     move_accepted = Montecarlo._accept(self, system_changes)
     in_window = self.nuc_sampler.is_in_window(self.network)
     return move_accepted and in_window