Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange atom coloring #268

Open
kbarros opened this issue May 25, 2024 · 0 comments
Open

Strange atom coloring #268

kbarros opened this issue May 25, 2024 · 0 comments

Comments

@kbarros
Copy link
Member

kbarros commented May 25, 2024

The atom coloring can be confusing in this case:

using Sunny, GLMakie
positions = [[2/3, 1/3, 0],
             [1/3, 2/3, 0],
             [0, 0, 1/3],
             [1/3, 2/3, 1/3],
             [0, 0, 2/3],
             [2/3, 1/3, 2/3]]
lat_vecs = lattice_vectors(1, 1, 2, 90, 90, 120)
cryst = Crystal(lat_vecs, positions; types=["A", "A", "B", "B", "C", "C"])
view_crystal(cryst)

which infers

Crystal
Spacegroup 'P 3 m 1' (156)
Lattice params a=1, b=1, c=2, α=90°, β=90°, γ=120°
Cell volume 1.732
Type 'A', Wyckoff 1c (point group '3m.'):
   1. [2/3, 1/3, 0]
Type 'A', Wyckoff 1b (point group '3m.'):
   2. [1/3, 2/3, 0]
Type 'B', Wyckoff 1a (point group '3m.'):
   3. [0, 0, 1/3]
Type 'B', Wyckoff 1b (point group '3m.'):
   4. [1/3, 2/3, 1/3]
Type 'C', Wyckoff 1a (point group '3m.'):
   5. [0, 0, 2/3]
Type 'C', Wyckoff 1c (point group '3m.'):
   6. [2/3, 1/3, 2/3]

"B" and "C" are actual elements (boron and carbon), so they can get "real" colors. "A" is not an actual element, so then Sunny assigns the two "A" atoms distinct colors because they are symmetry-inequivalent sites.

image

Maybe if a type is specified, then we should always color by type, and not by symmetry equivalence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant