  We present PyXtal, a new package based on the Python programming language,
used to generate structures with specific symmetry and chemical compositions
for both atomic and molecular systems. This soft ware provides support for
various systems described by point, rod, layer, and space group symmetries.
With only the inputs of chemical composition and symmetry group information,
PyXtal can automatically find a suitable combination of Wyckoff positions with
a step-wise merging scheme. Further, when the molecular geometry is given,
PyXtal can generate different dimensional organic crystals with molecules
occupying both general and special Wyckoff positions. Optionally, PyXtal also
accepts user-defined parameters (e.g., cell parameters, minimum distances and
Wyckoff positions). In general, PyXtal serves three purposes: (1) to generate
custom structures, (2) to modulate the structure by symmetry relations, (3) to
interface the existing structure prediction codes that require the generation
of random symmetric structures. In addition, we provide several utilities that
facilitate the analysis of structures, including symmetry analysis, geometry
optimization, and simulations of powder X-ray diffraction (XRD). Full
documentation of PyXtal is available at \url{https://pyxtal.readthedocs.io}.

Materials Science;Computational Physics