orgdisord.utils.reload_as_molecular_crystal#

orgdisord.utils.reload_as_molecular_crystal(images: List[ase.atoms.Atoms], parallel: bool = True, cheap: bool = False, wrap: bool = False)[source]#

takes in a list of atoms, identifies molecules, unwraps molecules so that they’re ‘connected’ across periodic boundaries TODO: Test wrap in parallel mode and in cheap mode.

Parameters
  • images (list) – list of atoms objects

  • parallel (bool) – whether to use parallel processing. Only gives a speedup if there are ~100 structures per core. Fewer than that and we just run in serial Default: True

  • cheap (bool) – whether to use cheap mode. This is faster, but doesn’t work for all lists of structures. Avoid if possible. It assumes that the molecules in each structure have the same indices. (i.e. it only looks at the connectivity of the first structure and assumes that the connectivity is the same for all structures). Default: False.

  • wrap (bool) – whether to wrap molecules Default: False

Returns

list of atoms objects

Return type

images_new (list)