defs.py
def import_from_iptblk(self, tmp_iptblk):
        """ import atomic species and positions (names) from TMP_INPUT by shirley_xas """
        para = self.para
        self.atomic_species = atomic_species_to_list(tmp_iptblk['TMP_ATOMIC_SPECIES']) # element pseudopotential_file
        self.atomic_pos     = atomic_positions_to_list(tmp_iptblk['TMP_ATOMIC_POSITIONS']) # element x y z
        # para.print(self.atomic_species) # debug
        # para.print(self.atomic_pos) # debug
        # identify the excited atom if any
        self.nspecies   = len(self.atomic_species)
        self.natom      = len(self.atomic_pos)
        self.ind        = {}
        for i in range(self.nspecies):
            if self.atomic_species[i][0][-1] == 'X': self.xs = i
            self.ind[self.atomic_species[i][0]] = i
        for i in range(self.natom):
            if self.atomic_pos[i][0][-1] == 'X': self.x = i
        para.print('  number of atom species                    = {0}'.format(self.nspecies))
        para.print('  number of atoms                           = {0}'.format(self.natom))
        if self.x >= 0: 
            para.print('  The {0}th atom in ATOMIC_POSITIONS ({1}) is excited.'.format(self.x + 1, self.atomic_pos[self.x][0][:-1]))
 import atomic species and positions (names) from TMP_INPUT by shirley_xas 
import atomic species and positions (names) from TMP_INPUT by shirley_xas
import atomic species and positions ( names ) from TMP_INPUT by shirley_xas
def import_from_iptblk(self, tmp_iptblk):
        para = self.para
        self.atomic_species = atomic_species_to_list(tmp_iptblk['TMP_ATOMIC_SPECIES']) 
        self.atomic_pos     = atomic_positions_to_list(tmp_iptblk['TMP_ATOMIC_POSITIONS']) 
        self.nspecies   = len(self.atomic_species)
        self.natom      = len(self.atomic_pos)
        self.ind        = {}
        for i in range(self.nspecies):
            if self.atomic_species[i][0][-1] == 'X': self.xs = i
            self.ind[self.atomic_species[i][0]] = i
        for i in range(self.natom):
            if self.atomic_pos[i][0][-1] == 'X': self.x = i
        para.print('  number of atom species                    = {0}'.format(self.nspecies))
        para.print('  number of atoms                           = {0}'.format(self.natom))
        if self.x >= 0: 
            para.print('  The {0}th atom in ATOMIC_POSITIONS ({1}) is excited.'.format(self.x + 1, self.atomic_pos[self.x][0][:-1]))
def import_from_iptblk ( self , tmp_iptblk ) : para = self . para self . atomic_species = atomic_species_to_list ( tmp_iptblk [ 'TMP_ATOMIC_SPECIES' ] ) self . atomic_pos = atomic_positions_to_list ( tmp_iptblk [ 'TMP_ATOMIC_POSITIONS' ] ) self . nspecies = len ( self . atomic_species ) self . natom = len ( self . atomic_pos ) self . ind = { } for i in range ( self . nspecies ) : if self . atomic_species [ i ] [ 0 ] [ - 1 ] == 'X' : self . xs = i self . ind [ self . atomic_species [ i ] [ 0 ] ] = i for i in range ( self . natom ) : if self . atomic_pos [ i ] [ 0 ] [ - 1 ] == 'X' : self . x = i para . print ( '  number of atom species                    = {0}' . format ( self . nspecies ) ) para . print ( '  number of atoms                           = {0}' . format ( self . natom ) ) if self . x >= 0 : para . print ( '  The {0}th atom in ATOMIC_POSITIONS ({1}) is excited.' . format ( self . x + 1 , self . atomic_pos [ self . x ] [ 0 ] [ : - 1 ] ) )
import atomic species and positions (names) from TMP_INPUT by shirley_xas
import atomic species and positions ( names ) from TMP_INPUT by shirley_xas
""" import atomic species and positions (names) from TMP_INPUT by shirley_xas """ # element pseudopotential_file # element x y z # para.print(self.atomic_species) # debug # para.print(self.atomic_pos) # debug # identify the excited atom if any
self
tmp_iptblk