{"library":"pyxtal","title":"PyXtal: Crystal Structure Generation","description":"PyXtal is an open-source Python library designed for the ab-initio generation of crystal structures based on symmetry constraints. It supports the generation of atomic and molecular systems across 0D to 3D dimensions, facilitates symmetry analysis, and offers structural manipulation capabilities. The library is currently at version 1.1.3 and is actively maintained with regular updates and contributions from the materials science community.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pyxtal"],"cli":null},"imports":["from pyxtal import pyxtal","from pyxtal.symmetry import Group","from pyxtal.molecule import pyxtal_molecule"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyxtal import pyxtal\n\n# Create a new structure instance\nstruc = pyxtal()\n\n# Generate a random 3D atomic crystal\n# dim=3 (3D), group=227 (Fd-3m, diamond space group), species=['C'], numIons=[8] (8 Carbon atoms per conventional cell)\nstruc.from_random(dim=3, group=227, species=['C'], numIons=[8])\n\nif struc.valid:\n    print(\"Crystal generated successfully:\")\n    print(struc)\n    # To save the structure to a CIF file\n    struc.to_file(\"diamond.cif\")\nelse:\n    print(\"Failed to generate crystal.\")","lang":"python","description":"This quickstart demonstrates how to generate a 3D atomic crystal, specifically a diamond-like carbon structure, using the `pyxtal` class's `from_random` method. It initializes a crystal instance, attempts to generate a structure based on dimension, space group, element, and stoichiometry, and then prints the structure details or saves it to a CIF file if successful.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}