Skip to content

Error Importing local pdb from VESTA: ValueError: Cannot parse empty string into integer #1091

@MaxPelly

Description

@MaxPelly

Describe the bug
I am trying to import a local pdb structure generated from a cif using VESTA. Both the .pdb and .cif open and display without errors in VESTA however when trying to import the pdb using molecular nodes I get the error shown bellow.

To Reproduce
Steps to reproduce the behavior:

  1. Get a cif (eg from ICSD or attached, will need to strip extra .txt extension, github dosent seem to like cifs)
  2. Using VESTA convert the cif to a .pdb (or use attached, again remove extra .txt)
  3. In blender under the scenes tab find Molecular nodes
  4. Under Import select local and locate the .pdb file
  5. click local to try and import

Expected behavior
The structure is imported

Error Codes
Please include associated error codes that are shown in the python console when the error occurs.

To view the python console on Windows, Window -> Toggle System Console, on Mac you must start Blender from the terminal.

06:40.969  bpy.rna          | ERROR Python script error in MN_OT_import_local.execute
06:40.969  operator         | ERROR Python: Traceback (most recent call last):
                            |   File "C:\Users\mp250\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\blender_org\molecularnodes\entities\molecule\pdb.py", line 31, in get_structure
                            |     array = pdb.get_structure(
                            |             ^^^^^^^^^^^^^^^^^^
                            |   File "C:\Users\mp250\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\.local\lib\python3.11\site-packages\biotite\structure\io\pdb\convert.py", line 96, in get_structure
                            |     return pdb_file.get_structure(model, altloc, extra_fields, include_bonds)
                            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                            |   File "C:\Users\mp250\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\.local\lib\python3.11\site-packages\biotite\structure\io\pdb\file.py", line 421, in get_structure
                            |     res_id[i] = de



code_hybrid36(line[_res_id])
                            |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                            |   File "src/biotite/structure/io/pdb/hybrid36.pyx", line 158, in biotite.structure.io.pdb.hybrid36.decode_hybrid36
                            | ValueError: Cannot parse empty string into integer

Desktop (please complete the following information):

  • OS: Windows 11
  • Hardware: x86 PC
  • Blender Version: 5.0.1
  • MolecularNodes Version: 4.5.10

Additional context
Sr3Ru2O7.pdb.txt
Sr3Ru2O7.cif.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage-issueIssues that are reliant upon updates from the imported python packages.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions