コード例 #1
0
ファイル: system.py プロジェクト: cpoli/tbee
    def set_onsite_dis(self, alpha):
        '''
        Set uniform onsite disorder. 

        :param alpha: Complex or Real number. Disorder stength.

        Example usage::

        sys.set_onsite_dis(alpha=0.1)

        '''
        error_handling.empty_onsite(self.onsite)
        error_handling.number(alpha, 'alpha')
        self.onsite += alpha * rand.uniform(-1., 1., self.lat.sites)
コード例 #2
0
ファイル: system.py プロジェクト: cationly/tbee
    def set_onsite_dis(self, alpha):
        '''
        Set uniform onsite disorder. 

        :param alpha: Complex or Real number. Disorder stength.

        Example usage::

        sys.set_onsite_dis(alpha=0.1)

        '''
        error_handling.empty_onsite(self.onsite)
        error_handling.number(alpha, 'alpha')
        self.onsite += alpha * rand.uniform(-1., 1., self.lat.sites)
コード例 #3
0
ファイル: system.py プロジェクト: cpoli/tbee
    def set_onsite_def(self, onsite_def):
        '''
        Set specific onsite energies.

        :param onsite_def:  Dictionary. 
            key: site indices, val: onsite values.

        Example usage::

            set_onsite_def(0: 1., 1: -1j)
        '''
        error_handling.empty_onsite(self.onsite)
        error_handling.set_onsite_def(onsite_def, self.lat.sites)
        for i, o in onsite_def.items():
            self.onsite[i] = o
コード例 #4
0
ファイル: system.py プロジェクト: cationly/tbee
    def set_onsite_def(self, onsite_def):
        '''
        Set specific onsite energies.

        :param onsite_def:  Dictionary. 
            key: site indices, val: onsite values.

        Example usage::

            set_onsite_def(0: 1., 1: -1j)
        '''
        error_handling.empty_onsite(self.onsite)
        error_handling.set_onsite_def(onsite_def, self.lat.sites)
        for i, o in onsite_def.items():
            self.onsite[i] = o