This module handles reading and write crystal files., pt, pts, cell)[source]

Whether or not the pt in within the pts[source]

read the cif, mainly for pyxtal cif output Be cautious in using it to read other cif files

Parameters:filename – path of the structure file
Returns:pyxtal structure, tol=0.2, once=False, ignore_HH=True)[source]

Function to perform to find the molecule in a Pymatgen structure

  • struc – Pymatgen Structure
  • tol – tolerance value to check the connectivity
  • once – search only one molecule or all molecules
  • ignore_HH – whether or not ignore the short H-H in checking molecule

list of pymatgen molecules positions: list of center positions

Return type:


class, ref_mols, tol=0.2, ignore_HH=False, add_H=False, hn=None)[source]

Bases: object

add_Hydrogens(smile, xyz)[source]

add hydrogen for pymtagen molecule


compute the orientation wrt the reference molecule


generate the molecular wyckoff sites

show(overlay=True)[source], filename=None, header='', permission='w', sym_num=None, style='mp')[source]

Export the structure in cif format The default setting for _atom_site follows the materials project cif

  • struc – pyxtal structure object
  • filename – path of the structure file
  • header – additional information
  • permission – write(w) or append(a+) to the given file
  • sym_num – the number of symmetry operations, None means writing all symops
  • styleicsd or mp (used in pymatgen)