HI Allen,
welcome to the mailing list.
The problem you experience seems to be unrelated to the CIF file import.
The code you sent works for me by only printing a message (a warning).
GaAs = xu.materials.Crystal.fromCIF("gaas4.cif")
XU.materials: element As used instead of As3-
This warning informs you that for the oxidation state used in the CIF file
no atomic form factors are available and that the neutral atom is used
instead.
Only for selected elements form factor information is available for various
oxidation states. Here xrayutilities just relies on information from common
databases. If there are some available which contain more information it
could be included. The oxidation state does however usually not change much
with respect to X-ray diffraction (only would slightly change the
intensities of peaks).
The error you mention seems to be related to the fact that you forgot to
specify the second obligatory argument to the HXRD class constructor.
HXRD is derived from Experiment which documents the parameters which need
to be used here:
https://xrayutilities.sourceforge.io/xrayutilities.html?highlight=hxrd#xrayutilities.experiment.Experiment.__init__
A full example of HXRD use can be found here:
https://xrayutilities.sourceforge.io/examples.html#angle-calculation-using-experiment-and-materials-classes
or here:
https://github.com/dkriegner/xrayutilities/blob/main/examples/xrayutilities_show_reciprocal_space_plane.py
The latter script directly produces a plot which shows the various Bragg
peaks within one plane of reciprocal space. If you use some interactive
plot backend you can click on a peak and get its diffraction angles.
cheers
Dominik
On Fri, Dec 10, 2021 at 9:49 PM Allen Hall <aj...@gm...> wrote:
> Hi XrayUtilities Mailing list!!
>
> Great python package!!
>
> I'm attempting to use the CIF import to run an RS visualization on a
> substrate (for peak finding purposes), and I'm using the following for
> import:
>
> import os
>
> import numpy
> import xrayutilities as xu
>
> # create material
> GaAs = xu.materials.Crystal.fromCIF(os.path.join("data", "gaas4.cif"))
>
> The error:
> XU.materials: element As used instead of As3-
> Traceback (most recent call last):
>
> File "/Users/allenhall/Desktop/reciprocal
> space/xrayutilities-main/examples/GaAs RSM attempt.py", line 18, in
> <module>
> geom = xu.HXRD(GaAs.Q(1, 1, 1))
>
> TypeError: __init__() missing 1 required positional argument: 'ndir'
>
> To help in completeness, I'm adding the full text of the CIF file I have
> for GaAs here:
>
> data_43359-ICSD
> #©2003 by Fachinformationszentrum Karlsruhe, and the U.S. Secretary of
> #Commerce on behalf of the United States. All rights reserved.
> _database_code_ICSD 43359
> _audit_creation_date 2000/07/15
> _chemical_name_systematic 'Gallium Arsenide'
> _chemical_formula_structural 'Ga As'
> _chemical_formula_sum 'As1 Ga1'
> _publ_section_title
> ;
> An X-ray study of some A(III) B(V) compounds which display deviataion
> from stoichoimetry
> ;
> loop_
> _citation_id
> _citation_journal_abbrev
> _citation_year
> _citation_journal_volume
> _citation_page_first
> _citation_page_last
> _citation_journal_id_ASTM
> primary Kristallografiya 1962 7 850 853 KRISAJ
> loop_
> _publ_author_name
> 'Ozolins, G.'
> 'Averkieva, G.K.'
> 'Ievins, A.'
> 'Goryunova, N.A.'
> _cell_length_a 5.65317(10)
> _cell_length_b 5.65317
> _cell_length_c 5.65317
> _cell_angle_alpha 90.
> _cell_angle_beta 90.
> _cell_angle_gamma 90.
> _cell_volume 180.67
> _cell_formula_units_Z 4
> _symmetry_space_group_name_H-M 'F -4 3 m'
> _symmetry_Int_Tables_number 216
> loop_
> _symmetry_equiv_pos_site_id
> _symmetry_equiv_pos_as_xyz
> 1 '-z, -y, x'
> 2 '-y, -x, z'
> 3 '-x, -z, y'
> 4 '-z, -x, y'
> 5 '-y, -z, x'
> 6 '-x, -y, z'
> 7 '-z, y, -x'
> 8 '-y, x, -z'
> 9 '-x, z, -y'
> 10 '-z, x, -y'
> 11 '-y, z, -x'
> 12 '-x, y, -z'
> 13 'z, -y, -x'
> 14 'y, -x, -z'
> 15 'x, -z, -y'
> 16 'z, -x, -y'
> 17 'y, -z, -x'
> 18 'x, -y, -z'
> 19 'z, y, x'
> 20 'y, x, z'
> 21 'x, z, y'
> 22 'z, x, y'
> 23 'y, z, x'
> 24 'x, y, z'
> 25 '-z, -y+1/2, x+1/2'
> 26 '-z+1/2, -y, x+1/2'
> 27 '-z+1/2, -y+1/2, x'
> 28 '-y, -x+1/2, z+1/2'
> 29 '-y+1/2, -x, z+1/2'
> 30 '-y+1/2, -x+1/2, z'
> 31 '-x, -z+1/2, y+1/2'
> 32 '-x+1/2, -z, y+1/2'
> 33 '-x+1/2, -z+1/2, y'
> 34 '-z, -x+1/2, y+1/2'
> 35 '-z+1/2, -x, y+1/2'
> 36 '-z+1/2, -x+1/2, y'
> 37 '-y, -z+1/2, x+1/2'
> 38 '-y+1/2, -z, x+1/2'
> 39 '-y+1/2, -z+1/2, x'
> 40 '-x, -y+1/2, z+1/2'
> 41 '-x+1/2, -y, z+1/2'
> 42 '-x+1/2, -y+1/2, z'
> 43 '-z, y+1/2, -x+1/2'
> 44 '-z+1/2, y, -x+1/2'
> 45 '-z+1/2, y+1/2, -x'
> 46 '-y, x+1/2, -z+1/2'
> 47 '-y+1/2, x, -z+1/2'
> 48 '-y+1/2, x+1/2, -z'
> 49 '-x, z+1/2, -y+1/2'
> 50 '-x+1/2, z, -y+1/2'
> 51 '-x+1/2, z+1/2, -y'
> 52 '-z, x+1/2, -y+1/2'
> 53 '-z+1/2, x, -y+1/2'
> 54 '-z+1/2, x+1/2, -y'
> 55 '-y, z+1/2, -x+1/2'
> 56 '-y+1/2, z, -x+1/2'
> 57 '-y+1/2, z+1/2, -x'
> 58 '-x, y+1/2, -z+1/2'
> 59 '-x+1/2, y, -z+1/2'
> 60 '-x+1/2, y+1/2, -z'
> 61 'z, -y+1/2, -x+1/2'
> 62 'z+1/2, -y, -x+1/2'
> 63 'z+1/2, -y+1/2, -x'
> 64 'y, -x+1/2, -z+1/2'
> 65 'y+1/2, -x, -z+1/2'
> 66 'y+1/2, -x+1/2, -z'
> 67 'x, -z+1/2, -y+1/2'
> 68 'x+1/2, -z, -y+1/2'
> 69 'x+1/2, -z+1/2, -y'
> 70 'z, -x+1/2, -y+1/2'
> 71 'z+1/2, -x, -y+1/2'
> 72 'z+1/2, -x+1/2, -y'
> 73 'y, -z+1/2, -x+1/2'
> 74 'y+1/2, -z, -x+1/2'
> 75 'y+1/2, -z+1/2, -x'
> 76 'x, -y+1/2, -z+1/2'
> 77 'x+1/2, -y, -z+1/2'
> 78 'x+1/2, -y+1/2, -z'
> 79 'z, y+1/2, x+1/2'
> 80 'z+1/2, y, x+1/2'
> 81 'z+1/2, y+1/2, x'
> 82 'y, x+1/2, z+1/2'
> 83 'y+1/2, x, z+1/2'
> 84 'y+1/2, x+1/2, z'
> 85 'x, z+1/2, y+1/2'
> 86 'x+1/2, z, y+1/2'
> 87 'x+1/2, z+1/2, y'
> 88 'z, x+1/2, y+1/2'
> 89 'z+1/2, x, y+1/2'
> 90 'z+1/2, x+1/2, y'
> 91 'y, z+1/2, x+1/2'
> 92 'y+1/2, z, x+1/2'
> 93 'y+1/2, z+1/2, x'
> 94 'x, y+1/2, z+1/2'
> 95 'x+1/2, y, z+1/2'
> 96 'x+1/2, y+1/2, z'
> loop_
> _atom_type_symbol
> _atom_type_oxidation_number
> As3- -3
> Ga3+ 3
> loop_
> _atom_site_label
> _atom_site_type_symbol
> _atom_site_symmetry_multiplicity
> _atom_site_Wyckoff_symbol
> _atom_site_fract_x
> _atom_site_fract_y
> _atom_site_fract_z
> _atom_site_occupancy
> _atom_site_attached_hydrogens
> Ga1 Ga3+ 4 a 0 0 0 1. 0
> As2 As3- 4 c 0.25 0.25 0.25 1. 0
>
> #End of data_43359-ICSD
>
>
>
> --
> Allen Hall
> aj...@gm...
> al...@il...
>
>
>
> _______________________________________________
> xrayutilities-users mailing list
> xra...@li...
> https://lists.sourceforge.net/lists/listinfo/xrayutilities-users
>
|