You can restrict the interatomic distance in structure generation.
Here is an example of [structure] section in the input file to limit minimum interatomic distance for a A-B binary system.
[structure]natot =8atype = A B
nat =44mindist_1 = 2.0 1.8
mindist_2 = 1.8 1.5
This means that minimum interatomic distances of A-A, A-B, and B-B are limited to 2.0, 1.8, and 1.5 Å, respectively.
Structures with interatomic distances shorter than these values are automatically eliminated.
For ternary systems, you will need mindist_1, mindist_2, and mindist_3.
Mindist matrix must be a symmetric matrix.
Since CrySPY version 1.4.0, the minimum interatomic distance check is also performed after structure relaxation.
This feature was introduced because, with machine learning potentials, structures with nearly overlapping atoms can sometimes be obtained.
You can disable this feature by adding the following line to cryspy.in (it is enabled by default):
[2024-04-23 13:46:28,598][cryspy_init][INFO]Start CrySPY 1.2.3
[2024-04-23 13:46:28,598][cryspy_init][INFO]# ---------- Read input file, cryspy.in[2024-04-23 13:46:28,598][read_input][INFO] Save input data in cryspy.stat
[2024-04-23 13:46:28,599][gen_init_struc][INFO]# ------ mindist[2024-04-23 13:46:28,601][struc_util][INFO] Na - Na: 1.66
[2024-04-23 13:46:28,602][struc_util][INFO] Na - Cl: 1.3399999999999999
[2024-04-23 13:46:28,602][struc_util][INFO] Cl - Cl: 1.02
...
In the default settings of PyXtal, atoms can sometimes be too close to each other, as shown in the figure above,
so it is recommended to set the mindist parameter.
That would help simplify DFT calculations.