[cctbxbb] How to load a structure from a .cif file?
Jan Marten Simons
marten at xtal.rwth-aachen.de
Fri Dec 10 12:00:40 PST 2010
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
More information about the cctbxbb
mailing list