importCIF - asche1/PyCrystalField GitHub Wiki
importCIF
importCIF(ciffile, mag_ion, Zaxis = None, Yaxis = None, LS_Coupling = None,
crystalImage=False, NumIonNeighbors=1, ForceImaginary=False,
ionL = None, ionS = None, CoordinationNumber = None)
Create a point charge model from a .cif file.
Parameters
cif_file
: cif file locationmag_ion
: which ion to treat as the central magnetic ionZaxis
: optional, list[a, b, c]
defining the desired z axis for the point charge model (using unit cell axes). IfNone
, the axis with the highest rotational symmetry is chosen.Yaxis
: optional, list[a, b, c]
defining the desired y axis (using unit cell axes). IfNone
, a mirror plane with the normal orthogonal toZaxis
(if one exists) is chosen.LS_Coupling
: optional, float, spin-orbit coupling of the magnetic ion. If None, PyCrystalField will compute in the J basis. If not None, PyCrystalField will compute in the LS basis.crystalImage
: optional, boolean, whether to export a sketch of the ligand environment and the defined axes. Default: False.NumIonNeighbors
: optional, int, number of nearest neighbor groups to include in the point charge model. If the first six nearest neighbors are all oxygen ions, these are considered as a group. If the next nearest neighbors are two Zn ions, these are considered as a group. etc. Default: 1.ForceImaginary
: optional, boolean, force PyCrystalField to include the -m terms in the point charge model (can be useful for comparing two ion sites with different symmetry). Default: False.ionL
: if the ion is not a rare earth, must be specified for the LS coupling calculations. Default: NoneionS
= if the ion is not a rare earth, must be specified for the LS coupling calculations. Default: NoneCoordinationNumber
= Number of ions to include in the coordination sphere. If this is specified, it will override whatever is put for NumIonNeighbors. IfNone
, PyCrystalField will guess the number of ions in the coordination sphere.
Returns
-
Lig
: aLigands
object used to make the point charge model. (For most purposes, this can be ignored.) -
PCM
: aCFLevels
object. -
If multiple possible atomic positions are found in the .cif file, then importCIF will return a list of possibilities:
[Lig0, PCM0], [Lig1, PCM1], [Lig2, PCM2](/asche1/PyCrystalField/wiki/Lig0,-PCM0],-[Lig1,-PCM1],-[Lig2,-PCM2)
where 0 treats all listed sites as atoms, 1 gives atoms in position a, and 2 gives atoms in position b.
Examples:
>>> import PyCrystalField as cef
>>> YTOLig, Yb = cef.importCIF('yto.cif','Yb1')
>>> import PyCrystalField as cef
>>> YTOLig, Yb = cef.importCIF('yto.cif','Yb1', Zaxis = [1,1,0])