pyxtal.representation module

class pyxtal.representation.representation(x, smiles=None)[source]

Bases: object

A class to handle the 1D representation of molecular crystal Works for Zprime > 1

Parameters:
  • x – a list of [cell, site_1, site_2, …]

  • smiles – a list of [smile_1, smile_2, …]

classmethod from_pyxtal(struc, standard=False)[source]

Initialize 1D rep. from the pyxtal object

Parameters:

struc – pyxtal object

classmethod from_string(inputs, smiles, composition=None)[source]

Initialize 1D rep. from the string

Parameters:
  • inputs – input string

  • smiles – list of smiles

get_dist(rep)[source]

get distance with the other rep1 Now only supports Z’=1

same_smiles(smiles)[source]
to_pyxtal(smiles=None, composition=None)[source]

Export the pyxtal structure

Parameters:
  • smiles – list of smiles

  • compoisition – list of composition

to_standard_setting()[source]
to_string(time=None, eng=None, tag=None)[source]

Export string representation

Parameters:
  • time – float

  • eng – float

  • tag – string

class pyxtal.representation.representation_atom(x)[source]

Bases: object

A class to handle the 1D representation of atomic crystal Works for Zprime > 1

Parameters:

x – a list of [cell, site_1, site_2, …]

classmethod from_pyxtal(struc, standard=False)[source]

Initialize 1D rep. from the pyxtal object

Parameters:

struc – pyxtal object

to_array()[source]

Export only varibles to a 1d numpy array

to_pyxtal()[source]

Export the pyxtal structure

Parameters:
  • smiles – list of smiles

  • compoisition – list of composition

to_standard_setting()[source]
to_string(time=None, eng=None, tag=None)[source]

Export string representation

Parameters:
  • time – float

  • eng – float

  • tag – string