Skip to content

Commit

Permalink
ENH: DXA colours for BCC & FCC
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-rocke committed Sep 10, 2024
1 parent f834c4f commit 4f87a8e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions matscipy/dislocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3474,14 +3474,30 @@ def inf_line_transform(p, z_max):
return np.array(points)
from fractions import Fraction

# Ovito colours for dislocation lines (as of v 3.10.1)
# Ovito colours for dislocation lines (as of v 3.10.1)
# Keys are abs of burgers as fractions, sorted in descending order
# (to collapse rotational symmetries)
disloc_colours = {
"diamond" : {
"default" : [230, 51, 51], # Red
"1/2 1/2 0" : [51, 51, 255], # Dark Blue; Screw, 60 degree
"1/3 1/6 1/6" : [0, 255, 0], # Green; 30 & 90 degree Partials
"1/6 1/6 0" : [255, 0, 255], # Pink
"1/3 1/3 1/3" : [0, 255, 255] # Light Blue
},
"bcc" : {
"default" : [230, 51, 51], # Red
"1/2 1/2 1/2" : [0, 255, 0], # Green; Screw/Edge 111
"1 0 0" : [255, 77, 204], # Pink; Edge 100
"1 1 0" : [51, 128, 255] # Blue
},
"fcc" : {
"default" : [230, 51, 51], # Red
"1/2 1/2 0" : [51, 51, 255], # Blue; Screw/Edge 110
"1/3 1/6 1/6" : [0, 255, 0], # Green; Shockley Partials
"1/6 1/6 0" : [255, 0, 255], # Pink; Stair Rod
"1/3 0 0" : [255, 255, 0], # Yellow; Hirth
"1/3 1/3 1/3" : [0, 255, 255] # Cyan; Frank
}
}

Expand Down Expand Up @@ -4532,7 +4548,7 @@ def build_kink_quadrupole_from_glide_structs(self, ref_bulk, glide_structs, kink

bulk = bulk[mask]
bulk.set_cell(cell)

kink_quad = kink_quad[mask]
kink_quad.set_cell(cell, scale_atoms=False)

Expand Down

0 comments on commit 4f87a8e

Please sign in to comment.