Hi,
I did some more tests using cif files from cod and found out that some of those
trigger errors like this for http://www.crystallography.net/cif/1/1000029.cif:
Traceback (most recent call last):
File "Check_F_calc.py", line 29, in <module>
f_calc = structure.structure_factors(d_min=1.0).f_calc()
File "/home/marten/Arbeit/cctbx-
latest/cctbx_sources/cctbx/xray/structure.py", line 813, in structure_factors
algorithm=algorithm)
File "/home/marten/Arbeit/cctbx-
latest/cctbx_sources/cctbx/xray/structure_factors/from_scatterers.py", line
53, in __call__
miller_set=miller_set)
File "/home/marten/Arbeit/cctbx-
latest/cctbx_sources/cctbx/xray/structure_factors/from_scatterers_fft.py", line
32, in __init__
tolerance_positive_definite=manager.tolerance_positive_definite())
RuntimeError: gaussian not defined for scattering_type "Y4+".
The cif file itself can be read and gives a valid summary:
Number of scatterers: 13
At special positions: 5
Unit cell: (7.82927, 7.82927, 5.70757, 90, 90, 120)
Space group: P 3 1 c (No. 159)
Label, Scattering, Multiplicity, Coordinates, Occupancy, Uiso, Ustar as Uiso
Y1 Y4+ 2 ( 0.3333 0.6667 0.2420) 0.27 0.0000 [ - ]
Si1 Si4+ 6 ( 0.5087 0.0819 0.2130) 0.77 0.0000 [ - ]
Al1 Al3+ 6 ( 0.5087 0.0819 0.2130) 0.23 0.0000 [ - ]
Si2 Si4+ 6 ( 0.1706 0.2533 0.0020) 0.77 0.0000 [ - ]
Al2 Al3+ 6 ( 0.1706 0.2533 0.0020) 0.23 0.0000 [ - ]
N1 N3- 2 ( 0.0000 0.0000 0.0000) 0.94 0.0000 [ - ]
O1 O2- 2 ( 0.0000 0.0000 0.0000) 0.06 0.0000 [ - ]
N2 N3- 2 ( 0.3333 0.6667 0.6530) 0.94 0.0000 [ - ]
O2 O2- 2 ( 0.3333 0.6667 0.6530) 0.06 0.0000 [ - ]
N3 N3- 6 ( 0.3458 -0.0472 -0.0050) 0.94 0.0000 [ - ]
O3 O2- 6 ( 0.3458 -0.0472 -0.0050) 0.06 0.0000 [ - ]
N4 N3- 6 ( 0.3219 0.3180 0.2460) 0.94 0.0000 [ - ]
O4 O2- 6 ( 0.3219 0.3180 0.2460) 0.06 0.0000 [ - ]
Y1: 0.3333 0.6667 0.2420
point group type: 3
special position operator: 1/3,2/3,z
Si1: 0.5087 0.0819 0.2130
point group type: 1
special position operator: x,y,z
Al1: 0.5087 0.0819 0.2130
point group type: 1
special position operator: x,y,z
Si2: 0.1706 0.2533 0.0020
point group type: 1
special position operator: x,y,z
Al2: 0.1706 0.2533 0.0020
point group type: 1
special position operator: x,y,z
N1: 0.0000 0.0000 0.0000
point group type: 3
special position operator: 0,0,z
O1: 0.0000 0.0000 0.0000
point group type: 3
special position operator: 0,0,z
N2: 0.3333 0.6667 0.6530
point group type: 3
special position operator: 1/3,2/3,z
O2: 0.3333 0.6667 0.6530
point group type: 3
special position operator: 1/3,2/3,z
N3: 0.3458 -0.0472 -0.0050
point group type: 1
special position operator: x,y,z
O3: 0.3458 -0.0472 -0.0050
point group type: 1
special position operator: x,y,z
N4: 0.3219 0.3180 0.2460
point group type: 1
special position operator: x,y,z
O4: 0.3219 0.3180 0.2460
point group type: 1
special position operator: x,y,z
Other cif files give other missing gaussians:
http://www.crystallography.net/cif/1/1000145.cif:
> RuntimeError: gaussian not defined for scattering_type "V4+".
http://www.crystallography.net/cif/1/1000181.cif:
> RuntimeError: gaussian not defined for scattering_type "H1+".
http://www.crystallography.net/cif/1/1000353.cif:
> RuntimeError: gaussian not defined for scattering_type "H1+".
I'm not sure if this is a problem related to the notation used in those cif
files or if cctbx is missing some data here that should be added to it.
With regards,
Dipl. Pyhs.
Jan M. Simons
Institute of Crystallography
RWTH Aachen University
Hi,
as I've noticed from the changelogs cctbx is closely following python 2.x
releases. Now I wonder if there are plans to move over to python3 soon?
If I got it right, python 2.6 and 2.7 already offer most of python3 features
and syntax as optional modules, so that the code can be prepared in advance
(like converting print into print()-functions etc.
[1] has some ideas on why and how to do a port.
So I'm interested in your thoughts about python3 and cctbx.
[1] http://peadrop.com/blog/2009/04/05/porting-your-code-to-python-3/
With regards,
Jan M. Simons
Institute of Crystallography
RWTH Aachen
Hi,
I've just started to work up some code for my phd. I've found cctbx to be
quite a nice code base for my goals. So far I've seen that there is quite a
large ammount of functions implemented, but in my opinion documentation on how
to use them is either hidden or not in very verbose state.
So from looking at the source I'm pretty confident that cctbx can load a
crystalstructure from a .cif file (like those obtained from COD,
http://www.crystallography.net/). But so far I've not been able to figure out
how to do this. My experiments included:
from iotbx import crystal_symmetry_from_any as sym_from_any
from iotbx import file_reader
file_name = "./xtal_data/9008806.cif"
structure = file_reader.any_file(file_name) #gives an object, but not a structure
# or
structure = sym_from_any.extract_from(file_name) # returns none
print(str(structure))
structure.show_summary().show_scatterers()
Could you give me a hint into the right direction, please?
With regards,
Jan Simons