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

Question about cutoff in CustomRateCalculator #22

Open
Helhes opened this issue May 12, 2019 · 1 comment
Open

Question about cutoff in CustomRateCalculator #22

Helhes opened this issue May 12, 2019 · 1 comment

Comments

@Helhes
Copy link

Helhes commented May 12, 2019

I am trying to apply KMCLib on diffusion problem within a hexagonal lattice.
I want the diffusion rate to be calculated from nearest neighbor atoms so I tried CustomRateCalculator.
As there seems to be no explicit nearest neighbor list so I thought that defining cutoff might work.
However the cutoff is seems to be like:

The distance D between a site and the center is calculated as
D = sqrt(x^2 + y^2 + z^2)
where (x,y,z) is the internal coordinate of the site.
Only the sites with D < cutoff will be counted.

So cutoff only works when the lattice is a cubic with a = b = c.
Since I have a hexagonal lattice, in which, for example, the distance between (0,0,0) and (1,1,0) is just the same as that between (0,0,0) and (1,0,0), while setting cutoff to 1 just includes (1,0,0) but excludes (1,1,0).
Is there any way to define cutoff as an absolute distance?

@leetmaa
Copy link
Owner

leetmaa commented Dec 29, 2020

As you have noticed the cutoff is set in primitive cell internal coordinates. I think your best option is to go for a larger cutoff and ignore some of the extra sites you'll inevitable get in the neighbor geometry when you do the rate calculation.

It's been some time now since you asked the question. Did you find a way forward?

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

2 participants