pyxtal.optimize.QRS module

Global Optimizer base on Quasi-Random Sampling

class pyxtal.optimize.QRS.QRS(smiles: str, workdir: str, sg: int | list, tag: str = 'test', info: dict[any, any] | None = None, ff_opt: bool = False, ff_style: str = 'openff', ff_parameters: str = 'parameters.xml', reference_file: str = 'references.xml', ref_criteria: dict[any, any] | None = None, N_gen: int = 10, N_pop: int = 10, N_cpu: int = 1, cif: str | None = None, block: list[any] | None = None, num_block: list[any] | None = None, composition: list[any] | None = None, lattice: Lattice | None = None, torsions: list[any] | None = None, molecules: list[pyxtal_molecule] | None = None, sites: list[any] | None = None, use_hall: bool = False, skip_ani: bool = True, factor: float = 1.1, eng_cutoff: float = 5.0, E_max: float = 10000000000.0, N_survival: int = 20, verbose: bool = False, random_state: int | None = None, max_time: float | None = None, matcher: StructureMatcher | None = None, early_quit: bool = False, check_stable: bool = False, use_mpi: bool = False)[source]

Bases: GlobalOptimize

Quasi-Random Sampling

Parameters:
  • smiles (str) – smiles string

  • workdir (str) – path of working directory

  • sg (int or list) – space group number or list of spg numbers

  • tag (string) – job prefix

  • ff_opt (bool) – activate on the fly FF mode

  • ff_style (str) – automated force style (gaff or openff)

  • ff_parameters (str or list) – ff parameter xml file or list

  • reference_file (str) – path of reference xml data for FF training

  • N_gen (int) – number of generation (default: 10)

  • N_pop (int) – number of populations (default: 10)

  • N_cpu (int) – number of cpus for parallel calculation (default: 1)

  • cif (str) – cif file name to store all structure information

  • block – block mode

  • num_block – list of blocks

  • compositions – list of composition, (default is [1]*Num_mol)

  • lattice (bool) – whether or not supply the lattice

  • torsions – list of torsion angle

  • molecules (list) – list of pyxtal_molecule objects

  • sites (list) – list of wp sites, e.g., [[‘4a’]]

  • use_hall (bool) – whether or not use hall number (default: False)

  • skip_ani (bool) – whether or not use ani or not (default: True)

  • eng_cutoff (float) – the cutoff energy for FF training

  • E_max (float) – maximum energy defined as an invalid structure

  • verbose (bool) – show more details

  • use_mpi – bool = False,

full_str()[source]
pyxtal.optimize.QRS.generate_qrs_cell(sampler, cell_bounds, ref_volume, ltype)[source]

A routine to generate quasi random samples for lattice and wp

pyxtal.optimize.QRS.generate_qrs_xtals(cell, wp_bounds, N_pop, smiles, comp, sampler_wp=None, d_tol=0.85)[source]

Get the qrs xtal samples

Parameters:
  • cell (list) – [hall, a, b, c]

  • wp_bounds (list) – [[wp0], [wp1], …]

  • N_pop (int) – number of valid candidates

  • smiles (list) – []

  • comp (list) – [1]

  • sampler_wp – sampler

  • d_tol (float) – short distance tolerance value