Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
117 stars 34 forks source link

Error in ligand processing #376

Open adventureneed opened 6 months ago

adventureneed commented 6 months ago

Hello,

I have reproduced the same error as here (https://github.com/Electrostatics/pdb2pqr/issues/369) both in web and in local pdb2pqr environment. I believe, there should be an if statement in mol2.py file, regarding "P" atoms calculation as it should only be done, when "P" atoms are in elements list as my ligand in .mol2 file does not have any kind of P atoms. Could it be fixed in any way?

In PDB2PQR web page

2023-12-13 11:36:43,704 INFO:main.py:670:non_trivial:Processing ligand.
2023-12-13 11:36:43,704 WARNING:main.py:671:non_trivial:Using ZAP9 forcefield for ligand radii.
2023-12-13 11:36:43,704 CRITICAL:main.py:800:main_driver:'P' is not in list
2023-12-13 11:36:43,704 CRITICAL:main.py:801:main_driver:Giving up.

On pdb2pqr local environment

WARNING:Using ZAP9 forcefield for ligand radii.
CRITICAL:'P' is not in list
CRITICAL:Giving up.
Traceback (most recent call last):
  File "/home/psi4conda/lib/python3.6/site-packages/pdb2pqr/main.py", line 790, in main_driver
    is_cif=is_cif,
  File "/home/psi4conda/lib/python3.6/site-packages/pdb2pqr/main.py", line 665, in non_trivial
    ligand.assign_parameters()
  File "/home/psi4conda/lib/python3.6/site-packages/pdb2pqr/ligand/mol2.py", line 331, in assign_parameters
    self.assign_charges()
  File "/home/psi4conda/lib/python3.6/site-packages/pdb2pqr/ligand/mol2.py", line 349, in assign_charges
    atom.charge = atom.formal_charge
  File "/home/psi4conda/lib/python3.6/site-packages/pdb2pqr/ligand/mol2.py", line 295, in formal_charge
    p_atom = self.bonds[0].atoms[elements.index("P")]
ValueError: 'P' is not in list

Using 6A2W PDB structure with its ligands.

sobolevnrm commented 6 months ago

Can you provide a PDB ID for a structure that generates this error?

adventureneed commented 5 months ago

Hello,

Sorry for the late reply. As I have stated above, it is the 6A2W PDB structure.