| 1 |
|
| 2 |
|
| 3 |
from __future__ import print_function |
| 4 |
from CifFile import ValidCifFile,CifDic |
| 5 |
|
| 6 |
|
| 7 |
test_dic = "../dictionaries/cif_core.dic" |
| 8 |
test_data = "../drel/testing/data/nacltest.cif" |
| 9 |
|
| 10 |
|
| 11 |
my_cif = ValidCifFile(datasource=test_data,dic=CifDic(test_dic)) |
| 12 |
|
| 13 |
|
| 14 |
my_data_block = my_cif.first_block() |
| 15 |
|
| 16 |
|
| 17 |
cela = my_data_block["_cell_length_a"] |
| 18 |
name = my_data_block["_symmetry_cell_setting"] |
| 19 |
|
| 20 |
allnames = my_data_block.keys() |
| 21 |
|
| 22 |
data = my_data_block[allnames[0]] |
| 23 |
|
| 24 |
|
| 25 |
print("%s %s" % (allnames[0],data)) |
| 26 |
|
| 27 |
|
| 28 |
names = my_data_block["_atom_site_label"] |
| 29 |
xsxs = my_data_block["_atom_site_fract_x"] |
| 30 |
processed = zip(names,xsxs) |
| 31 |
for label, data in processed: |
| 32 |
print("%s %s" % (label,data)) |