Create Next Generation

Last updated: October 16, 2026

First Run

When you run cryspy, the program enters structure generation mode. It generates the first generation of random structures and then exits.

cryspy

It can be confirmed from the output that structures are generated with the number of atoms within the range specified by ll_nat and ul_nat.

...
[2026-07-07 15:18:02,548][cryspy_init][INFO] # ---------- Initial structure generation
[2026-07-07 15:18:02,548][rs_gen][INFO] # ------ mindist
[2026-07-07 15:18:02,549][struc_util][INFO] Cu - Cu: 1.32
[2026-07-07 15:18:02,549][struc_util][INFO] Cu - Ag: 1.385
[2026-07-07 15:18:02,549][struc_util][INFO] Cu - Au: 1.34
[2026-07-07 15:18:02,549][struc_util][INFO] Ag - Ag: 1.45
[2026-07-07 15:18:02,549][struc_util][INFO] Ag - Au: 1.405
[2026-07-07 15:18:02,549][struc_util][INFO] Au - Au: 1.36
[2026-07-07 15:18:02,549][rs_gen][INFO] # ------ Generate random structures
[2026-07-07 15:18:02,712][gen_pyxtal][INFO] Structure ID      0: (6, 6, 2) Space group: 196 --> 216 F-43m
[2026-07-07 15:18:02,721][gen_pyxtal][WARNING] Compoisition [7 5 3] not compatible with symmetry 224:     spg = 224 retry.
[2026-07-07 15:18:02,726][gen_pyxtal][WARNING] Compoisition [3 3] not compatible with symmetry 134:     spg = 134 retry.
[2026-07-07 15:18:02,733][gen_pyxtal][WARNING] Compoisition [ 6  4 16] not compatible with symmetry 140:     spg = 140 retry.
[2026-07-07 15:18:02,822][gen_pyxtal][INFO] Structure ID      1: (1, 4, 3) Space group:  23 -->  71 Immm
[2026-07-07 15:18:02,839][gen_pyxtal][INFO] Structure ID      2: (2, 2, 8) Space group: 150 --> 150 P321
...

The file cryspy.stat shows that the current generation’s information is being added during the EA process.

[status]
generation = 1
id_queueing = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Optimize Structures

After running cryspy several times and completing the structure optimization for the first generation, the output will appear as shown below.

...
[2026-07-07 15:21:18,273][ea_next_gen][INFO] Done generation 1
[2026-07-07 15:21:18,273][ea_next_gen][INFO] Calculate convex hull for generation 1
Ignoring fixed y limits to fulfill fixed data aspect with adjustable data limits.
[2026-07-07 15:21:18,772][ea_next_gen][INFO] 
EA is ready

Convex Hull

At this point, the hull distance data and the convex hull plot have been output to ./data/convex_hull/.

  • hull_dist_all_gen_1
      ID    hull distance (eV/atom)    Num_atom
      14                   0.000000    (0, 1, 3)
       9                   0.088493    (2, 8, 8)
      15                   0.105278    (8, 7, 5)
      10                   0.200962    (8, 0, 7)
       8                   0.210806    (0, 3, 3)
      13                   0.247862    (5, 6, 8)
      19                   0.258563    (6, 6, 1)
       5                   0.261977    (2, 6, 4)
       6                   0.269711    (7, 7, 2)
      18                   0.290792    (1, 6, 6)
      11                   0.292541    (8, 3, 1)
      16                   0.356158    (6, 2, 4)
       2                   0.373888    (2, 2, 8)
       7                   0.514507    (0, 4, 4)
      12                   0.548770    (3, 4, 4)
       1                   0.617685    (1, 4, 3)
       3                   0.761585    (1, 0, 8)
      17                   0.934091    (6, 4, 7)
       4                   0.955053    (2, 8, 4)
       0                   1.019078    (6, 6, 2)
  • conv_hull_gen_1.svg conv_hull_gen_1.svg conv_hull_gen_1.svg

Create Next Generation

Once all preparations are complete, running cryspy again starts generating the next-generation structures. By default (backup_interval = 1), an automatic backup is performed immediately before generating these structures. From v1.5.0, backup_interval in the [option] section can be used to change the interval in generations; 0 disables automatic backups. See Features > Backup for details.

cryspy
...
[2026-07-07 15:29:32,182][ea_next_gen][INFO] Done generation 1
[2026-07-07 15:29:32,505][utility][INFO] Backup data
[2026-07-07 15:29:32,512][ea_next_gen][INFO] # ---------- Evolutionary algorithm
[2026-07-07 15:29:32,512][ea_next_gen][INFO] Generation 2
[2026-07-07 15:29:32,512][ea_next_gen][INFO] # ------ Apply nat/composition constraints
[2026-07-07 15:29:32,512][ea_next_gen][INFO] Current candidates after constraint filter: 20
[2026-07-07 15:29:32,513][ea_next_gen][INFO] Elite structures after constraint filter: 0
[2026-07-07 15:29:32,513][ea_next_gen][INFO] # ------ natural selection
[2026-07-07 15:29:32,515][ea_next_gen][INFO] ranking without duplication (including elite):
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     14, fitness:    0.00000
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID      9, fitness:    0.08849
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     15, fitness:    0.10528
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     10, fitness:    0.20096
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID      8, fitness:    0.21081
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     13, fitness:    0.24786
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     19, fitness:    0.25856
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID      5, fitness:    0.26198
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID      6, fitness:    0.26971
[2026-07-07 15:29:32,515][ea_next_gen][INFO] Structure ID     18, fitness:    0.29079
[2026-07-07 15:29:32,515][ea_next_gen][INFO] # ------ Generate children
[2026-07-07 15:29:32,515][ea_child][INFO] # -- mindist
[2026-07-07 15:29:32,517][struc_util][INFO] Cu - Cu: 1.32
[2026-07-07 15:29:32,517][struc_util][INFO] Cu - Ag: 1.385
[2026-07-07 15:29:32,517][struc_util][INFO] Cu - Au: 1.34
[2026-07-07 15:29:32,517][struc_util][INFO] Ag - Ag: 1.45
[2026-07-07 15:29:32,517][struc_util][INFO] Ag - Au: 1.405
[2026-07-07 15:29:32,517][struc_util][INFO] Au - Au: 1.36
[2026-07-07 15:29:32,521][ea_child][INFO] eligible candidates for crossover and strain: 10
[2026-07-07 15:29:32,521][ea_child][INFO] eligible candidates for permutation: 10
[2026-07-07 15:29:32,521][ea_child][INFO] eligible candidates for addition: 10
[2026-07-07 15:29:32,522][ea_child][INFO] eligible candidates for elimination: 10
[2026-07-07 15:29:32,522][ea_child][INFO] eligible candidates for substitution: 10
[2026-07-07 15:29:32,527][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,532][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,537][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,541][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,547][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,551][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,556][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,561][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,564][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,569][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,592][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,622][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,644][crossover][WARNING] remove_within_mindist: some atoms within mindist. retry.
[2026-07-07 15:29:32,667][crossover][INFO] Structure ID     20 (8, 3, 5) was generated from     10 and     15 by crossover. Space group:   1 P1
[2026-07-07 15:29:32,668][crossover][INFO] Structure ID     21 (0, 1, 5) was generated from     14 and      8 by crossover. Space group:   1 P1
...
...
...
[2026-07-07 15:29:33,401][ea_next_gen][INFO] # ------ Apply nat/composition constraints to elite candidates
[2026-07-07 15:29:33,401][ea_next_gen][INFO] Elite candidates after constraint filter: 20
[2026-07-07 15:29:33,401][ea_next_gen][INFO] Structure ID     14 keeps as the elite
[2026-07-07 15:29:33,401][ea_next_gen][INFO] Structure ID      9 keeps as the elite

After that, simply running cryspy repeatedly will advance the structure search.