Код: Выделить всё
from openbabel import pybel
cif_file = 'annoying_structure.cif'
structure = pybel.readfile('cif', cif_file) # this returns a generator
print(structure)
for smiles in structure:
print(smiles) # this line never finishes
Сам файл, насколько я вижу, не отличается от других файлов в наборе данных с точки зрения длины, содержания и т. д. Я использую эту базу данных:
https://archive.materialscloud.org/records/cjhyq-nr115
и проблемный файл (среди прочего) — linker99_CH_linker81_N_qtz_relaxed.cif, содержащийся в https://archive.materialscloud.org/reco ... download=1 (примечание: загрузка 1,1 ГиБ)
Любая помощь приветствуется!
Подробнее здесь: https://stackoverflow.com/questions/798 ... tor-values
Мобильная версия