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

Support minimize_energy! for systems with vacancies #283

Closed
kbarros opened this issue Jul 1, 2024 · 1 comment · Fixed by #331
Closed

Support minimize_energy! for systems with vacancies #283

kbarros opened this issue Jul 1, 2024 · 1 comment · Fixed by #331

Comments

@kbarros
Copy link
Member

kbarros commented Jul 1, 2024

Minimal reproducer:

using Sunny

latvecs = lattice_vectors(1, 1, 10, 90, 90, 90)
cryst = Crystal(latvecs, [[0,0,0]])
sys = System(cryst, (10,10,1), [SpinInfo(1, S=1, g=2)], :dipole; seed=1)
sys2 = to_inhomogeneous(sys)

set_vacancy_at!(sys2, (1,1,1,1))
minimize_energy!(sys2) # AssertionError: n' * n ≈ 1

Bug reported by Lázaro Cabán Cabrera.

@kbarros
Copy link
Member Author

kbarros commented Jul 15, 2024

@ddahlbom proposed the workaround:

sys.κs[site] = 0.001

which can be used in place of set_vacancy_at!(sys, site).

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

Successfully merging a pull request may close this issue.

1 participant