From 2b673f79264fd6b238f02ae793c54ffb19593e1e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 8 Apr 2020 15:51:27 -0400 Subject: [PATCH] [py3] In Python3 xrange was replaced by range --- python/converters/plovasp/elstruct.py | 2 +- python/converters/plovasp/proj_group.py | 2 +- python/converters/plovasp/proj_shell.py | 2 +- python/converters/plovasp/vaspio.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/converters/plovasp/elstruct.py b/python/converters/plovasp/elstruct.py index 0040f789..ad421ed0 100644 --- a/python/converters/plovasp/elstruct.py +++ b/python/converters/plovasp/elstruct.py @@ -142,7 +142,7 @@ class ElectronicStructure: ## Construct a map to access coordinates by index # self.structure['ion_index'] = [] # for isort, nq in enumerate(self.structure['nq_types']): -# for iq in xrange(nq): +# for iq in range(nq): # self.structure['ion_index'].append((isort, iq)) diff --git a/python/converters/plovasp/proj_group.py b/python/converters/plovasp/proj_group.py index 6a4af019..0237ae6e 100644 --- a/python/converters/plovasp/proj_group.py +++ b/python/converters/plovasp/proj_group.py @@ -335,7 +335,7 @@ class ProjectorGroup: 1. Orthogonality is ensured on each site (NORMION = True). For each site 'ion' we have the following mapping: - block_maps = [bl_map[ion] for ion in xrange(shell.nion) + block_maps = [bl_map[ion] for ion in range(shell.nion) for shell in shells] bl_map = [((i1_start, i1_end), (i1_shell, ion)), diff --git a/python/converters/plovasp/proj_shell.py b/python/converters/plovasp/proj_shell.py index fde27ac0..27bb9fc8 100644 --- a/python/converters/plovasp/proj_shell.py +++ b/python/converters/plovasp/proj_shell.py @@ -262,7 +262,7 @@ class ProjectorShell: for ip, par in enumerate(proj_params): if par['isite'] - 1 == ion and par['l'] == self.lorb and par['m'] == m: self.proj_arr[io, :, :, m, :] = proj_raw[ip, :, :, :] -# for ik in xrange(nk): +# for ik in range(nk): # kp = kmesh['kpoints'][ik] ## kphase = np.exp(-2.0j * np.pi * np.dot(kp, qcoord)) # kphase = 1.0 diff --git a/python/converters/plovasp/vaspio.py b/python/converters/plovasp/vaspio.py index 03dd0acb..5cf3cb2f 100644 --- a/python/converters/plovasp/vaspio.py +++ b/python/converters/plovasp/vaspio.py @@ -435,7 +435,7 @@ class Poscar: # print # print " Coords:" -# for it in xrange(ntypes): +# for it in range(ntypes): # print " Element:", el_names[it] # print q_at[it]