Charge neutrality condition

July 5, 2025

From version 1.4.1, it is possible to impose a charge neutrality condition during structure generation in EA-vc. This can be applied to both random structure generation and structure generation by evolutionary operations.

In cryspy.in, the charge corresponding to each atype is specified as charge.

Example of cryspy.in:

...
[structure]
atype = Li Ca Cl
ll_nat = 0 0 0
ul_nat = 8 8 8
charge = 1 2 -1
...

For example, in this case, only structures that satisfy the charge neutrality condition, such as (Li, Ca, Cl) = (4, 0, 4) or (Li, Ca, Cl) = (4, 2, 8), will be generated.

Note that if add_max or elim_max is too small as shown below, there may be no combinations of atom numbers that satisfy the charge neutrality condition when adding or removing atoms, making structure generation impossible.

...
[structure]
atype = Li Ca Cl
ll_nat = 0 0 0
ul_nat = 8 8 8
charge = 1 2 -1
...
...
[EA]
add_max = 1
elim_max = 1

For example, in the above case, if add_max = 1, there are no combinations of atom numbers that satisfy the charge neutrality condition. If add_max = 2, (Li, Ca, Cl) = (1, 0, 1), that is, adding one Li and one Cl atom, satisfies the charge neutrality condition because (+1) + (-1) = 0. If add_max = 3, there are combinations such as (Li, Ca, Cl) = (1, 0, 1) and (0, 1, 2).