hiphive issueshttps://gitlab.com/materials-modeling/hiphive/-/issues2020-01-08T13:32:28Zhttps://gitlab.com/materials-modeling/hiphive/-/issues/323Improve handling of errors due to maximum cutoff close to neighbor shell2020-01-08T13:32:28ZErik FranssonImprove handling of errors due to maximum cutoff close to neighbor shell## Background
I have a lot of interface systems with different number of vacancies and different ordering.
When relaxing these structures the distribution of distances becomes almost continuous and hence I encounter the error "maximum cu...## Background
I have a lot of interface systems with different number of vacancies and different ordering.
When relaxing these structures the distribution of distances becomes almost continuous and hence I encounter the error "maximum cutoff is close to neighbor shell".
(This has been a minor issue for clathrates).
My solution has been to just hard code a few different cutoff that I know will work but now when doing many different vacancy orderings this becomes fairly annoying.
``` python
# old solution
if n_vac == 0:
cutoff = 5.04
elif n_vac == 3:
cutoff = 5.035
elif n_vac == 4:
cutoff = 5.04
elif n_vac == 8:
cutoff = 5.039
```
## Description
I think the exception is a good idea to have as it prevents strange behavior.
But it would be nice if we can come up for a solution to make my use-case work without too much hassle?
## Suggested solution
1. I do not like flooding `ClusterSpace` with different settings but I guess you could have something like
``` python
cs = ClusterSpace(atoms, cutoffs, ignore_neighborshell_error=True)
```
2. Make the current exception into a warning?
## Exception
```
241 msg = 'Maximum cutoff close to neighbor shell, change cutoff'
--> 242 raise Exception(msg)
243
244 msg = ' Found {} center atom{} with {} images totaling {} atoms'.format(
Exception: Maximum cutoff close to neighbor shell, change cutoff
```1.1