Treffer: DanPorter/Dans_Diffraction
Weitere Informationen
Dans_Diffraction is package to read cif files and simulate diffraction patterns, among other things. It uses python and should work in version 2+ and 3+. Python libraries numpy, matplotlib and scipy are required, plus tkinter for gui programming. Full code documentation available here. For comments, queries or bugs - email dan.porter@diamond.ac.uk Installation Requirements: Python 2.7+/3+ with packages: Numpy, Matplotlib, Scipy Stable version from PyPI: $ pip install Dans-Diffraction Latest version from GitHub: $ git clone https://github.com/DanPorter/Dans_Diffraction.git Operation Dans_Diffraction is best run within an interactive python environment: $ ipython -i -m Dans_Diffraction Dans_Diffraction can also be run in scripts as an import, example scripts are provided in the Examples folder. Read CIF file import Dans_Diffraction as dif xtl = dif.Crystal('some_file.cif') xtl.info() # print Crystal structure parameters Alter atomic positions xtl.Cell.latt([2.85,2.85,10.8,90,90,120]) # set lattice parameters xtl.Atoms.info() # Print Symmetric positions xtl.Structure.info() # Print All positions in P1 symmetry (same structure and functions as xtl.Atoms) # Symmetric positions xtl.Atoms.changeatom(idx=0, u=0, v=0, w=0, type='Co', label='Co1') xtl.Atoms.addatom(idx=0, u=0, v=0, w=0, type='Co', label='Co1') # After adding or changing an atom in the Atoms class, re-generate the full structure using symmetry arguments: xtl.generate_lattice() # Full atomic structure in P1 symmetry xtl.Structure.changeatom(idx=0, u=0, v=0, w=0, type='Co', label='Co1') xtl.Structure.addatom(idx=0, u=0, v=0, w=0, type='Co', label='Co1') # Plot crystal Structure xtl.Plot.plot_crystal() # 3D plot xtl.Plot.plot_layers() # 2D plot for layered materials Calculate Structure Factors X-ray or neutron structure factors/ intensities are calculated based on the full unit cell structure, including atomic form-factors (x-rays) or coherent scattering lengths (neutrons). Isotropic thermal factors are also included. Calculation of polarised neutron and ...