Skip to content

Commit

Permalink
Fix unit of r_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRue committed Nov 30, 2023
1 parent 014413b commit 38b5466
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aiida_kkr/tools/tools_STM_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from aiida_kkr.tools import find_parent_structure
from aiida_kkr.tools.combine_imps import get_scoef_single_imp
from aiida_kkr.tools.imp_cluster_tools import pos_exists_already, combine_clusters
from masci_tools.io.common_functions import get_alat_from_bravais

__copyright__ = (u'Copyright (c), 2023, Forschungszentrum Jülich GmbH, '
'IAS-1/PGI-1, Germany. All rights reserved.')
Expand Down Expand Up @@ -79,6 +80,10 @@ def get_r_offset(clust1, clust2, host_structure, add_position):
# combine to offset vector
r_offset = r_out_of_plane + r_in_plane

# convert from Ang to alat units (used internally in KKR)
alat = get_alat_from_bravais(np.array(host_structure.cell), host_structure.pbc[2])
r_offset /= alat

return r_offset


Expand Down

0 comments on commit 38b5466

Please sign in to comment.