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

producing pqr file for ligand only (not protein) - error message: ValueError: 'P' is not in list #360

Open evelyne-deplazes opened 1 year ago

evelyne-deplazes commented 1 year ago

Hi

I have used pdb2pqr before but only for proteins, never for ligands.

I want to produce a .pqr file and APBS input for a ligand only ie no protein.

I tried the following command

pdb2pqr -apbs-input --ligand Cage_fromMD_freeCageinWater_800ns.mol2 Cage_fromMD_freeCageinWater_800ns.pdb test.pqr

The .pdb and mol2 files are both just the ligand, as I don't have a protein

I get the error File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/ligand/mol2.py", line 294, in formal_charge p_atom = self.bonds[0].atoms[elements.index("P")] ValueError: 'P' is not in list

My ligand does not have P atoms, only N.3, C.3, O.3 and H

I can find the section of code in mol2.py, but I am not sure how to fix the error. Or whether I am using the wrong command in the first place to deal with a ligand only.

thanks a lot Evelyne


Files attached ligand in pdb and mol2 format (.txt added as Github does not accept .pdb and .mol2 files) test.log, output of pdb2pqr command screendump.log, the full error message printed to the screen

Cage_fromMD_freeCageinWater_800ns.mol2.txt Cage_fromMD_freeCageinWater_800ns.pdb.txt screendump.log test.log

evelyne-deplazes commented 1 year ago

I forgot to say I got the same error when using the web server version.

I had a look at the files init.py, where I think the atoms are defined but not sure on how to fix (or whether the issue is how I use the --ligand flag and my mol2 file) Evelyne

sobolevnrm commented 1 year ago

Hello -- I am not sure when I will have time to look at this in detail. However, have you tried adding a protein to the system? The protein does not necessarily need to interact with the ligand.

There was an issue in the past where PDB2PQR failed when a protein wasn't present. I thought we had fixed the bug but it is the first thing I would try when debugging the issue you're experiencing.

Thank you

evelyne-deplazes commented 1 year ago

Hi Nathan

Thanks for the prompt reply … so I just add the protein to the same .pdb file?

I can try that Evelyne

From: Nathan Baker @.> Reply to: Electrostatics/pdb2pqr @.> Date: Monday, 15 May 2023 at 1:13 am To: Electrostatics/pdb2pqr @.> Cc: Evelyne Deplazes @.>, Author @.***> Subject: Re: [Electrostatics/pdb2pqr] producing pqr file for ligand only (not protein) - error message: ValueError: 'P' is not in list (Issue #360)

Hello -- I am not sure when I will have time to look at this in detail. However, have you tried adding a protein to the system? The protein does not necessarily need to interact with the ligand.

There was an issue in the past where PDB2PQR failed when a protein wasn't present. I thought we had fixed the bug but it is the first thing I would try when debugging the issue you're experiencing.

Thank you

— Reply to this email directly, view it on GitHubhttps://github.com/Electrostatics/pdb2pqr/issues/360#issuecomment-1546922188, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2H772743GNODILWHGBHJADXGDZCDANCNFSM6AAAAAAX4X7CFI. You are receiving this because you authored the thread.Message ID: @.***>

evelyne-deplazes commented 1 year ago

Hi Nathan

I tried adding a peptide but I still get the same error message

If you have any idea on how to fix this, it would be greatly appreciated. Happy to dig into some files…

I am trying to finish a manuscript and would like to add the electrostatic surface potential to the paper

Cheers Evelyne.

Dr Evelyne Deplazes (she/her) Senior Lecturer (Biochemistry)

School of Chemistry and Molecular Biosciences The University of Queensland Brisbane Qld 4072 Australia

The University of Queensland (UQ) acknowledges the Traditional Owners and their custodianship of the lands on which UQ operates. We pay our respects to their Ancestors and their descendants, who continue cultural and spiritual connections to Country. We recognise their valuable contributions to Australian and global society.

From: Evelyne Deplazes @.> Date: Monday, 15 May 2023 at 9:25 pm To: Electrostatics/pdb2pqr @.>, Electrostatics/pdb2pqr @.> Cc: Author @.> Subject: Re: [Electrostatics/pdb2pqr] producing pqr file for ligand only (not protein) - error message: ValueError: 'P' is not in list (Issue #360)

Hi Nathan

Thanks for the prompt reply … so I just add the protein to the same .pdb file?

I can try that Evelyne

From: Nathan Baker @.> Reply to: Electrostatics/pdb2pqr @.> Date: Monday, 15 May 2023 at 1:13 am To: Electrostatics/pdb2pqr @.> Cc: Evelyne Deplazes @.>, Author @.***> Subject: Re: [Electrostatics/pdb2pqr] producing pqr file for ligand only (not protein) - error message: ValueError: 'P' is not in list (Issue #360)

Hello -- I am not sure when I will have time to look at this in detail. However, have you tried adding a protein to the system? The protein does not necessarily need to interact with the ligand.

There was an issue in the past where PDB2PQR failed when a protein wasn't present. I thought we had fixed the bug but it is the first thing I would try when debugging the issue you're experiencing.

Thank you

— Reply to this email directly, view it on GitHubhttps://github.com/Electrostatics/pdb2pqr/issues/360#issuecomment-1546922188, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2H772743GNODILWHGBHJADXGDZCDANCNFSM6AAAAAAX4X7CFI. You are receiving this because you authored the thread.Message ID: @.***>

(base) UTS033591:APBS evelyne$ pdb2pqr -apbs-input --ligand test_Cage.mol2 test_Cage_LFG.pdb test_Cage_LFG.pqr
INFO:PDB2PQR v3.6.1: biomolecular structure conversion software. INFO:Please cite: Jurrus E, et al. Improvements to the APBS biomolecular solvation software suite. Protein Sci 27 112-128 (2018). INFO:Please cite: Dolinsky TJ, et al. PDB2PQR: expanding and upgrading automated preparation of biomolecular structures for molecular simulations. Nucleic Acids Res 35 W522-W525 (2007). INFO:Checking and transforming input arguments. INFO:Loading topology files. INFO:Loading molecule: test_Cage_LFG.pdb INFO:Setting up molecule. WARNING:Unable to find amino or nucleic acid definition for JTQ. Parsing as new residue. INFO:Created biomolecule object with 31 residues and 505 atoms. INFO:Setting termini states for biomolecule chains. INFO:Loading forcefield. INFO:Loading hydrogen topology definitions. WARNING:Missing atom OXT in residue ARG B 30 WARNING:Missing atom OXT in residue ARG B 30 INFO:Attempting to repair 1 missing atoms in biomolecule. WARNING:Missing atom OXT in residue ARG B 30 INFO:Added atom OXT to residue ARG B 30 at coordinates 11.293, 39.766, 87.653 INFO:Updating disulfide bridges. INFO:Debumping biomolecule. INFO:Adding hydrogens to biomolecule. INFO:Debumping biomolecule (again). INFO:Optimizing hydrogen bonds INFO:Applying force field to biomolecule states. INFO:Processing ligand. WARNING:Using ZAP9 forcefield for ligand radii. CRITICAL:'P' is not in list CRITICAL:Giving up. Traceback (most recent call last): File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/main.py", line 792, in main_driver results = non_trivial( File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/main.py", line 672, in non_trivial ligand.assign_parameters() File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/ligand/mol2.py", line 330, in assign_parameters self.assign_charges() File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/ligand/mol2.py", line 348, in assign_charges atom.charge = atom.formal_charge File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/ligand/mol2.py", line 294, in formal_charge p_atom = self.bonds[0].atoms[elements.index("P")] ValueError: 'P' is not in list

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/evelyne/opt/anaconda3/bin/pdb2pqr", line 8, in sys.exit(main()) File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/main.py", line 829, in main if main_driver(args) == 1: File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/main.py", line 802, in main_driver raise RuntimeError from err RuntimeError

jbardhan commented 7 months ago

Hi,

It looks like mol2.py 's formal_charge expects that any atom of type O.3 with bond order 1 and formal_charge 1 will be connected to a phosphorus atom. The third atom in this ligand, name "O1", triggers that elif(), which then tries to find the P atom bonded to it. When it doesn't find such a P, the method raises the exception and dies.

I don't know how to fix this at the moment. In the meantime, @evelyne-deplazes, if you're still seeking a resolution, can you please re-confirm that all the oxygen atoms in your ligand are indeed the SYBYL sp3 oxygen (O.3)?

Thanks very much, Jay