Skip to main content

SOLIDS

Crystal structure prediction — a genetic algorithm / stochastic search for periodic solids, built on top of AEGON.

SOLIDS searches 2-D (layer-group) and 3-D (space-group) periodic structures for a given composition, delegating every local optimization to AEGON's calculator registry — the same pattern glomos uses for clusters/molecules. Unlike glomos, both search modes (evolutive GA and stochastic kick) are dispatched from a single entry point, solids.heuristic.mainAlgorithm, selected by one algorithm key in the input file.


Table of Contents


Features

  • Two search drivers, one entry pointmainAlgorithm(inputfile) dispatches on algorithm = evolutive (crossover + lattice-strain/atom-exchange mutation, generational) or algorithm = stochastic (fixed local-opt + niching stages, no evolutionary operators), reading everything else from the same INPUT format.
  • Space-group-aware initial populationaegon.generation.crystal_random generates 3-D structures over all 230 space groups or 2-D slabs over all 80 layer groups, mixed with plain P1/P1-slab random structures in the same population.
  • Own GA operators (solids.generation) — crystal crossover (generation/crystal_crossover.py) and lattice-strain/atom-exchange mutation (generation/crystal_mutant.py), plus fitness-proportional roulette selection (generation/selection.py), live in SOLIDS itself, not AEGON — AEGON only supplies the space-group-aware random generator, geometry utilities, and MBTR discrimination they're built on.
  • Calculator-agnostic — dispatches through AEGON's registry: GULP/VASP (external binaries, periodic-aware — real cell kept intact, not vacuum-boxed like cluster search), EMT (ASE Effective Medium Theory with cell relaxation enabled), generic ASE (any ase.calculators.Calculator by module+class name — this is how MatterSim is used, without adding it as a dependency), and four of the package's own analytic periodic potentials (TIO2_PERIODIC/MGAL2O4_PERIODIC/MGSIO3_PERIODIC/SRTIO3_PERIODIC: Buckingham/LJ + Ewald + UnitCellFilter, Numba-JIT'd).
  • MBTR-based discriminationaegon.discrimination.crystal_mbtr deduplicates periodic pools by a cell-aware descriptor (unlike clusters, USR alone isn't meaningful across different unit cells).
  • Unit-consistent — one units key (eV/atomic/kcal) fixes energy and force together across every calculator.
  • Resumable evolutive runs_find_latest_completed_stage picks up an interrupted GA run from its last completed generation.

Installation

pip install solids

Requires Python >= 3.9.


Dependencies

Package Role
aegon Structure generation (space-group-aware crystals), unit conversion, and the calculator registry
dscribe MBTR descriptors for periodic structure discrimination

MatterSim is not a dependency — like in aegon's own examples, it's used only through the generic ASE calculator, so it never has to be declared. See examples/x_run_solids_mattersim_gega_si8.py, which pins a separate Python interpreter with MatterSim installed rather than requiring it in this environment.


The INPUT file

---COMPOSITION---
Ti   1
O    2
---COMPOSITION---

formula_units           4     #Composition above is multiplied by this
dimension               3     #2 (layer-group slabs) or 3 (space-group bulk)
volume_factor            1.0
tol_atomic_overlap       0.98 #Minimum interatomic distance, as a fraction of the covalent-radii sum

#ALGORITHM PARAMETERS:
algorithm                evolutive   #evolutive | stochastic

#INITIAL POPULATION:
nof_sg_structures        10    #Space-group (dimension=3) / layer-group (dimension=2) structures
nof_random_structures     0    #Plain P1 / P1-slab random structures

#Evolutive-only:
nof_matings              20
nof_strains               2
nof_xchange                2
strain_std                0.5

#NICHING PARAMETERS:
tol_similarity            0.98
cutoff_energy             40.0
cutoff_population          20

#HALT CRITERION:
#Stochastic: nof_stages 2
#Evolutive:
nof_generations             5
nof_repeats                10
nof_stagnant                5

#THEORY LEVEL:
calculator                GULP
nof_processes               10

The ---GULP---/---VASP---/... route block (only for the calculator actually selected) follows the same convention as glomos. Binary paths and scratch folders come from AEGON's site configuration (python -m aegon.config show), though path_exe in the INPUT file overrides it for a one-off run.


Supported calculators

calculator Backend Notes
GULP GULP External binary; periodic-aware (GulpEngine keeps the real cell, no vacuum-boxing)
VASP VASP External binary, periodic DFT; requires a licensed POTCAR
EMT ASE EMT, via the generic ASE strategy Cell relaxation enabled (AEGON's own 'EMT' entry is position-only, insufficient for crystals)
ASE any ase.calculators.Calculator Generic, by ase_module/ase_class — how MatterSim and other ML potentials are used
TIO2_PERIODIC solids.calc, Matsui-Akaogi Buckingham+Ewald No external binary; verified against GULP's own matsui-akaogi.lib
MGAL2O4_PERIODIC solids.calc, LJ+Buckingham+Ewald No external binary; constant-pressure cell relaxation
MGSIO3_PERIODIC solids.calc, LJ+Buckingham+Ewald No external binary; zero-pressure cell relaxation
SRTIO3_PERIODIC solids.calc, LJ+Buckingham+Ewald No external binary; zero-pressure cell relaxation

Usage

from solids.heuristic import mainAlgorithm

population = mainAlgorithm('INPUT_SOLIDS_GULP_GEGA_TiO2.txt')
for mol in population[:5]:
    print(mol.info['i'], mol.info['e'])

Same function for both modes — only the input file's algorithm key (evolutive/stochastic) and its matching parameter block differ. The population is written to summary.vasp after every generation/stage, so progress is never lost if the process is interrupted; an evolutive run also resumes automatically from its last completed generation if restarted with the same working directory.

Examples cover every calculator across representative systems — TiO2, MgAl2O4, MgSiO3, SrTiO3 (GULP and the matching *_PERIODIC potential, both evolutive and stochastic), Al4 (EMT), C8 diamond (GULP and VASP), and Si8 (MatterSim, via the generic ASE strategy):

cd examples
python x_run_solids_gulp_gega_tio2.py      # one example
python run_all_examples.py                 # everything not commented out (VASP skipped -- real DFT)

Each script creates its own run_<code>_<heuristic>_<system>/ working directory and compares the result against reference structures (run_utils.py's compare_against_references) where available — see examples/run_all_examples.py's own header comment for per-example timings and examples/REF_*.vasp for the reference structures used.


Command-line tool

x-solids INPUT_SOLIDS.txt

runs mainAlgorithm directly from an input file. Without an existing input file:

x-solids input_emt    # write a template EMT input file (inputEMT), no external binary
x-solids input_gulp   # write a template GULP input file
x-solids input_vasp   # write a template VASP input file

Citation

If you use SOLIDS in your research, please cite the associated manuscript (in preparation), and the AEGON backend it builds on:

López-Castro C., Ortiz-Chi F., Merino G. An Efficient Growth Pattern Algorithm (GrowPAL) for Cluster Structure Prediction. J. Chem. Theory Comput. 2024, 20, 4939–4948.


Authors

  • Carlos Lopez-Castro — Departamento de Física Aplicada, Cinvestav-IPN, Mérida, México
  • Gabriel Merino — Departamento de Física Aplicada, Cinvestav-IPN, Mérida, México
  • Filiberto Ortiz-Chi — Secihti-Departamento de Física Aplicada, Cinvestav-IPN, Mérida, México

License

See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solids-0.4.1.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solids-0.4.1-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file solids-0.4.1.tar.gz.

File metadata

  • Download URL: solids-0.4.1.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.0

File hashes

Hashes for solids-0.4.1.tar.gz
Algorithm Hash digest
SHA256 cd3afea80c8466ce099f481fcd4d6ce2bdfc5a1b2cb9633ca9201a55cda9e77c
MD5 77176e2dfdade67aa4d7ccba51b7255f
BLAKE2b-256 8be16e0865227df4148b6f76e23e3796f8864e1e7ac4b3482cd735ecd9fb2742

See more details on using hashes here.

File details

Details for the file solids-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: solids-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.0

File hashes

Hashes for solids-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a006e33ef0188b3f334e7e36b9bcc52ab2ba17e9b61b922995bf37d9b8d6fe02
MD5 3462e2bad98f334d32af163b3069149b
BLAKE2b-256 8d9ac4afbd8b556ab5aaed2e84480c3b9a2dd05a4d0ec4005a249baa668abaec

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page