Recent Changes · Search:

Dispense


µSR

Chapters:

  1. Introduction
  2. The muon
  3. Muon production
  4. Spin polarization
  5. Detect the µ spin
  6. Implantation
  7. Paramagnetic species
  8. A special case: a muon with few nuclei
  9. Magnetic materials
  10. Relaxation functions
  11. Superconductors
  12. Mujpy
  13. Mulab
  14. Musite?
  15. More details

Tips

PmWiki

pmwiki.org

edit SideBar

TapasStart

< description of cctbx_source | Index | Muzen: a FORTRAN 77 & c analysis program (historical) >


For the moment just instructions

Dipolar sum conversions:

{$ {\mathbf B}_{dip}= \frac {\mu_0}{4 \pi} \frac{3({\mathbf\mu}_e\cdot \hat r)\hat r-{\mathbf \mu}_e}{r^3} $}

With electron moment {$\mu_e$} in Bohr magnetons and {$r$} in Å the conversion factor in front of the last fraction to get the field in Tesla is

{$ \frac {\mu_0}{4 \pi} \mu_B 10^{30} = 0.9274 $}

How to read in plain CIF data e.g. the YBCO6-jmol.cif file generated from the Bilbao server
from cctbx_source/PyCifRW/example_quartz.py

  1. start ipython with pylab and cctbx (bash script for ipython?) and run
 from PyCifRW import CifFile
 cf=CifFile.ReadCif("/home/roberto.derenzi/ipython/YBCO6-jmol-orig.cif")
 print cf # prints it all
 text=cf.dictionary.items() #  get the header, which is an array containing a tuple (!?!)
 ntext=text[0]  # this is the tuple, mad eof two items, the first is a 
 # string: 'generated_by_bilbao_crystallographic_server'
 word=ntext[0]  # this is the string alone
 cif_global = cf[word] # this is the cif records
 # the rule is to copy everything afted "data_" in the first line
 # obtained from cf.dictionay.keys() as ['generated_by_bilbao_crystallographic_server']
 # not clear how to feed it back
 from cctbx import uctbx, sgtbx, crystal
unit_cell = uctbx.unit_cell([float(cif_global[param])
    for param in [
      "_cell_length_a","_cell_length_b","_cell_length_c",
      "_cell_angle_alpha","_cell_angle_beta","_cell_angle_gamma"]])
  space_group_info = sgtbx.space_group_info(
    symbol=cif_global["_symmetry_space_group_name_H-M"])
  crystal_symmetry = crystal.symmetry(
    unit_cell=unit_cell,
    space_group_info=space_group_info)
  crystal_symmetry.show_summary()


 from cctbx import xray
 structure = xray.structure(crystal_symmetry=crystal_symmetry)
 for label,x,y,z in zip(cif_global["_atom_site_label"],
                         cif_global["_atom_site_fract_x"],
                         cif_global["_atom_site_fract_y"],
                         cif_global["_atom_site_fract_z"]):
    scatterer = xray.scatterer(
      label=label,
      site=[float(s) for s in [x,y,z]])
    structure.add_scatterer(scatterer)
 structure.show_summary()
 structure.show_scatterers()

This produces an output with certain structural information


< description of cctbx_source | Index | Muzen: a FORTRAN 77 & c analysis program (historical) >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on March 20, 2011, at 09:37 AM