if prepare_protein == True:
prepared_receptor = prepare_protein_protoss(receptor)
else:
prepared_receptor = receptor
#Create a temporary folder for all further calculations
w_dir = prepared_receptor.parent / prepared_receptor.stem
print('The working directory has been set to:', w_dir)
(w_dir).mkdir(exist_ok=True)
if pocket == 'Reference':
pocket_definition = get_pocket(ref_file, prepared_receptor, 10)
print(pocket_definition)
if pocket == 'RoG':
pocket_definition = get_pocket_RoG(ref_file, prepared_receptor)
print(pocket_definition)
elif pocket == 'Dogsitescorer':
pocket_definition = binding_site_coordinates_dogsitescorer(prepared_receptor, w_dir, method='Volume')
This code gave the following error.
{
"name": "JSONDecodeError",
"message": "Expecting value: line 1 column 1 (char 0)",
"stack": "---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
File ~/opt/anaconda3/envs/dockm8/lib/python3.10/site-packages/requests/models.py:974, in Response.json(self, **kwargs)
973 try:
--> 974 return complexjson.loads(self.text, **kwargs)
975 except JSONDecodeError as e:
976 # Catch JSON-related errors and raise as requests.JSONDecodeError
977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
File ~/opt/anaconda3/envs/dockm8/lib/python3.10/json/init.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
File ~/opt/anaconda3/envs/dockm8/lib/python3.10/json/decoder.py:337, in JSONDecoder.decode(self, s, _w)
333 """Return the Python representation of s
(a str
instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
File ~/opt/anaconda3/envs/dockm8/lib/python3.10/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
JSONDecodeError Traceback (most recent call last)
Cell In[4], line 2
1 if prepare_protein == True:
----> 2 prepared_receptor = prepare_protein_protoss(receptor)
3 else:
4 prepared_receptor = receptor
File ~/Desktop/tik/DockM8/scripts/protein_preparation.py:81, in prepare_protein_protoss(receptor)
79 query = {'protein_file': upload_file}
80 # Submit the job to ProtoSS and get the job submission response
---> 81 job_submission = requests.post(PROTOSS, files=query).json()
83 # Poll the job status until it is completed
84 protoss_job = poll_job(job_submission['job_id'], PROTOSS_JOBS)
File ~/opt/anaconda3/envs/dockm8/lib/python3.10/site-packages/requests/models.py:978, in Response.json(self, **kwargs)
974 return complexjson.loads(self.text, **kwargs)
975 except JSONDecodeError as e:
976 # Catch JSON-related errors and raise as requests.JSONDecodeError
977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 978 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
}