Skip to content

Commit

Permalink
add correct sign to Gate.Ef in unit of eV
Browse files Browse the repository at this point in the history
  • Loading branch information
AsymmetryChou committed Feb 5, 2025
1 parent 4d10aa6 commit d89d5c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dptb/negf/poisson_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def get_potential_eps(self,region_list):
if region_list[i].__class__.__name__ == 'Gate':
#attribute gate potential to the corresponding grid points
self.boudnary_points.update({index[i]: "Gate" for i in range(len(index))})
self.lead_gate_potential[index] = region_list[i].Ef
self.lead_gate_potential[index] = -1*region_list[i].Ef
gate_point += len(index)
elif region_list[i].__class__.__name__ == 'Dielectric':
# attribute dielectric permittivity to the corresponding grid points
Expand Down
2 changes: 1 addition & 1 deletion dptb/postprocess/NEGF.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def compute(self):
gate_init = Gate(self.gate_region[gg].get("x_range",None).split(':'),\
self.gate_region[gg].get("y_range",None).split(':'),\
self.gate_region[gg].get("z_range",None).split(':'))
gate_init.Ef = float(self.gate_region[gg].get("voltage",None)) # in unit of volt
gate_init.Ef = -1*float(self.gate_region[gg].get("voltage",None)) # in unit of eV
Gate_list.append(gate_init)

# create dielectric
Expand Down

0 comments on commit d89d5c3

Please sign in to comment.