Atomium and big pdb file?
See original GitHub issueHello Brady 😃
Long time ago I made a video on VMD of my Norovirus Capsid, and I thought that it could be a good test for your tool (Since I have 600K+ atom in the PDB). Here it is (just 1 state) morph_state001-capsid.zip
The problem is that only one part seems to be read since the numbering stop at 99999 (cf. Screenshot 1). I tried different format (convertion with Pymol to mmtf, mmcif, cif, pdb.gz, cif.gz) and it fails for other format (But here the problem seems to come from the atomium library for reading mmtf or mmcif when the output comme from Pymol maybe ?)
For this issue maybe the problem come from the atomium library itself ? But I wanted to repport it since with this new render system it seems possible to load very big systems, and unfortunatly the “assembly” coming from the PDB is splitted into different models (so your addon think it’s a trajectory)
Anyway, here’s some extra information ⤵️ and thank you again for this already great piece of work =D Thibault.
Screenshot 1:
traceback for loading when it’s mmtf
Python: Traceback (most recent call last):
File "C:\Users\tubia\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\molecular_nodes\__init__.py", line 80, in execute
sna_func_import_structure_EE5B6(bpy.context.scene.sna_pdb_code,
File "C:\Users\tubia\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\molecular_nodes\__init__.py", line 1137, in sna_func_import_structure_EE5B6
pdb = atomium.open(pdb_path)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\utilities.py", line 41, in open
return parse_string(filestring, path, *args, **kwargs)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\utilities.py", line 122, in parse_string
parsed = file_func(filestring)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\mmtf.py", line 18, in mmtf_bytes_to_mmtf_dict
return decode_dict(raw)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\mmtf.py", line 40, in decode_dict
new_value = [decode_dict(x) for x in new_value]
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\mmtf.py", line 40, in <listcomp>
new_value = [decode_dict(x) for x in new_value]
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\mmtf.py", line 37, in decode_dict
new_value = parse_binary_field(new_value)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\mmtf.py", line 56, in parse_binary_field
codec, length, params = struct.unpack(">iii", b[:12])
struct.error: unpack requires a buffer of 12 bytes
location: <unknown location>:-1
Traceback for loading when it’s mmcif
Python: Traceback (most recent call last):
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 506, in add_atom_to_non_polymer
] = atom_line_to_dict(line, aniso_dict)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 530, in atom_line_to_dict
a["x"] = float(line[30:38].strip())
ValueError: could not convert string to float: '9 ? -57.'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\tubia\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\molecular_nodes\__init__.py", line 80, in execute
sna_func_import_structure_EE5B6(bpy.context.scene.sna_pdb_code,
File "C:\Users\tubia\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\molecular_nodes\__init__.py", line 1137, in sna_func_import_structure_EE5B6
pdb = atomium.open(pdb_path)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\utilities.py", line 41, in open
return parse_string(filestring, path, *args, **kwargs)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\utilities.py", line 124, in parse_string
parsed = data_func(parsed)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 86, in pdb_dict_to_data_dict
update_models_list(pdb_dict, data_dict)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 158, in update_models_list
add_atom_to_non_polymer(line, model, res_id, aniso, full_names)
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 512, in add_atom_to_non_polymer
"atoms": {int(line[6:11]): atom_line_to_dict(line, aniso_dict)}
File "C:\Users\tubia\AppData\Roaming\Python\Python310\site-packages\atomium\pdb.py", line 530, in atom_line_to_dict
a["x"] = float(line[30:38].strip())
ValueError: could not convert string to float: '9 ? -57.'
location: <unknown location>:-1
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
Hey 😃 Since it is an issue from atomium I didn’t try it again XD I will try to make a file with my morphing states and paste the REMARK350 lines to check if it can works ^^ In the meantime I guess this issue can be closed since the issue is coming from Atomium 😃
Thanks @RodenLuo for the feedback! Good to know that it builds OK from
.mmcif
format. Seems like the problem might be resolved.