mxtaltools.common.ase_interface
- mxtaltools.common.ase_interface.ase_mol_from_crystaldata(crystal_batch, index: int = None, highlight_canonical_conformer: bool = False, mode=None, cutoff: float = 4, return_crystal: bool = False, highlight_mol_ind: bool = False)[source]
Extract an atomic structure from a Crystaldata object according to its batch index, and convert it into an ase mol object. Several options for visualization of crystals.
- Parameters:
crystal_batch (Crystaldata object)
index (int, optional) – Batch index of Crystaldata object to extract. Default is None.
highlight_canonical_conformer (bool, optional) – Whether to give the canonical conformer a different atom type for color comparison.
mode ('conformer', 'unit cell', 'inside cell', 'convolve with', 'distance', or None (default None)) – Assuming the input Crystaldata is a molecule cluster larger than a single unit cell, we have several options to pare down to the desired visualization. ‘conformer’ : only the ‘canonical conformer’ ‘unit cell’ : all molecules with centroids inside the unit cell ‘inside cell’ : all atoms inside the unit cell ‘convolve with’ : all atoms within convolution range of the canonical conformer ‘distance’ : all atoms within a certain distance of the canonical conformer None : show all atoms in the crystal
cutoff (float, optional) – Distance fed to the ‘distance’ exclusion level option
return_crystal (bool, optional) – Whether to return an ase mol for the crystal. Does not always work properly. Ase does not understand our crystals correctly.
- Return type:
ase mol object