Closed YvetteJxy closed 8 months ago
Hi @YvetteJxy, Not sure if this will work but in your loop codes, could you try loading receptor before ligand, that is, moving
v.set_ligand_from_file(pdbqt_path)
after
v.set_receptor(rigid_pdbqt_filename=f"/hy-tmp/0_999/{i}_{j}.pdbqt")
This was just a thought according to: https://github.com/ccsb-scripps/AutoDock-Vina/blob/d13f9e93e253573b01ffbb28cfd1e2dd26ff9002/src/lib/vina.cpp#L88
Hi @YvetteJxy, Not sure if this will work but in your loop codes, could you try loading receptor before ligand, that is, moving
v.set_ligand_from_file(pdbqt_path)
after
v.set_receptor(rigid_pdbqt_filename=f"/hy-tmp/0_999/{i}_{j}.pdbqt")
This was just a thought according to:
You are right. Now my codes can run. Thank you very much. All Best
Good catch @rwxayheee, thank you!
I encountered some issues when performing batch Vina calculations, but I'm not sure of the specific reasons.
Here is my code:
Below is the error message:
RuntimeError Traceback (most recent call last) Cell In[5], line 20 17 v.compute_vina_maps(center=[0., 0., 0.], box_size=[30, 30, 30]) 18 # print(3) 19 # print(v.score()) ---> 20 print(v.optimize()) 21 v.dock(exhaustiveness=32) 22 energy_minimized = v.optimize()
File /usr/local/miniconda3/lib/python3.8/site-packages/vina/vina.py:453, in Vina.optimize(self, max_steps) 449 raise ValueError('Error: max_steps cannot be negative.') 451 # It does not make sense to report energies with a precision higher than 3 452 # since the coordinates precision is 3. --> 453 energies = np.around(self._vina.optimize(max_steps), decimals=3) 454 return energies
File /usr/local/miniconda3/lib/python3.8/site-packages/vina/vina_wrapper.py:737, in Vina.optimize(self, max_steps) 736 def optimize(self, max_steps=0): --> 737 return _vina_wrapper.Vina_optimize(self, max_steps)
RuntimeError:
Vina runtime error: Cannot do the optimization. Ligand(s) was(ere) not initialized.
However, when I attempted to run AutoDock calculations using the first set of data directly, there were no errors.