I am attempting to save a model I created from a set of atoms I got using the .atoms_in_sphere() function. This is the code and the traceback I am getting.
pdb = atomium.open(pdb_path)
pdb.model.optimise_distances()
pocket_atoms = pdb.model.atoms_in_sphere((25.55,13.88,-29.54), 8)
pocket = atomium.structures.Residue(*pocket_atoms, id='A', name='A')
x = set()
x.add(pocket)
new_chain = atomium.Chain(id='A', *x)
new_model = atomium.Model(new_chain)
new_model.save("test.pdb")
Traceback (most recent call last):
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 182, in
describe_pockets('./data/4bcf.pdb')
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 178, in describe_pockets
get_pocket_atoms(pdb_path)
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 129, in get_pocket_atoms
new_model.save("pocket_ctsb_test.pdb")
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/structures.py", line 231, in save
string = structure_to_pdb_string(self)
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/pdb.py", line 565, in structure_to_pdb_string
atom_to_atom_line(atom, lines)
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/pdb.py", line 606, in atom_to_atom_line
residue_id = int("".join([c for c in id_ if c.isdigit() or c == "-"]))
ValueError: invalid literal for int() with base 10: ''
I am attempting to save a model I created from a set of atoms I got using the .atoms_in_sphere() function. This is the code and the traceback I am getting.
pdb = atomium.open(pdb_path)
pdb.model.optimise_distances()
pocket_atoms = pdb.model.atoms_in_sphere((25.55,13.88,-29.54), 8)
pocket = atomium.structures.Residue(*pocket_atoms, id='A', name='A')
x = set()
x.add(pocket)
new_chain = atomium.Chain(id='A', *x)
new_model = atomium.Model(new_chain)
new_model.save("test.pdb")
Traceback (most recent call last):
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 182, in
describe_pockets('./data/4bcf.pdb')
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 178, in describe_pockets
get_pocket_atoms(pdb_path)
File "/home/ray/Pocket-Prediction/src/describe_pocket.py", line 129, in get_pocket_atoms
new_model.save("pocket_ctsb_test.pdb")
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/structures.py", line 231, in save
string = structure_to_pdb_string(self)
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/pdb.py", line 565, in structure_to_pdb_string
atom_to_atom_line(atom, lines)
File "/home/ray/anaconda3/lib/python3.8/site-packages/atomium/pdb.py", line 606, in atom_to_atom_line
residue_id = int("".join([c for c in id_ if c.isdigit() or c == "-"]))
ValueError: invalid literal for int() with base 10: ''