liedllab / surface_analyses

Scores for Hydrophobicity and Charges based on SASAs
MIT License
23 stars 4 forks source link

Is the trajs file necessary and how to generate it ? #25

Closed kehan777 closed 9 months ago

kehan777 commented 9 months ago

pep_patch_electrostatic apbs-input.pdb --apbs_dir apbs --ply_out potential -o patches .csv usage: pep_patch_electrostatic [-h] [--ref REF] [--protein_ref PROTEIN_REF] [--stride STRIDE] [--dx [DX]] [--apbs_dir APBS_DIR] [--probe_radius PROBE_RADIUS] [-o OUT] [-c PATCH_CUTOFF PATCH_CUTOFF] [-ic INTEGRAL_CUTOFF INTEGRAL_CUTOFF] [--surface_type {sas,ses,gauss}] [--ply_out PLY_OUT] [--pos_patch_cmap POS_PATCH_CMAP] [--neg_patch_cmap NEG_PATCH_CMAP] [--ply_cmap PLY_CMAP] [--ply_clim PLY_CLIM PLY_CLIM] [--check_cdrs] [-n N_PATCHES] [-s SIZE_CUTOFF] [--gauss_shift GAUSS_SHIFT] [--gauss_scale GAUSS_SCALE] [--pH PH] [--ion_species [ION_SPECIES ...]] parm trajs [trajs ...] pep_patch_electrostatic: error: the following arguments are required: trajs

Q: Is the trajs file necessary and how to generate it ? by gromacs MD ..?

fwaibl commented 9 months ago

Hi. We recently changed the code to use the same loading function as the _hydrophobic script, and that's why we now ask for a topology and trajectory. If you have a PDB file, you can supply the same file twice, once as topology and once as trajectory. But I agree that this is currently very confusing. We should make it optional, and use the "parm" file as a default.

I hope this helps.

Best, Franz

vhoer commented 9 months ago

For your example, the input would then be the following: pep_patch_electrostatic apbs-input.pdb apbs-input.pdb --apbs_dir apbs --ply_out potential -o patches.csv

fwaibl commented 9 months ago

Yes, that is correct. We will change the README accordingly (and probably update the commandline interface soon). Thanks for pointing this out.

kehan777 commented 9 months ago

pep_patch_electrostatic apbs-input.pdb apbs-input.pdb --apbs_dir apbs --ply_out potential -o patches.csv

Error: pdb2pqr failed: pdb2pqr stdout: b'' pdb2pqr stderr: b'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: input.pdb INFO:Setting up molecule. WARNING:Unable to find amino or nucleic acid definition for NME. Parsing as new residue. WARNING:Unable to find amino or nucleic acid definition for NME. Parsing as new residue. INFO:Created biomolecule object with 229 residues and 3449 atoms. INFO:Setting termini states for biomolecule chains. INFO:Loading forcefield. INFO:Loading hydrogen topology definitions. INFO:This biomolecule is clean. No repair needed. 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. WARNING:Residue NME A 121 has non-integer charge: -0.1438 deviates by 0.1438 from integral, exceeding error tolerance 0.001. WARNING:Residue NME B 229 has non-integer charge: -0.1438 deviates by 0.1438 from integral, exceeding error tolerance 0.001. WARNING:Residue NME A 121 has non-integer charge: -0.1438 deviates by 0.1438 from integral, exceeding error tolerance 0.001 WARNING:Residue NME B 229 has non-integer charge: -0.1438 deviates by 0.1438 from integral, exceeding error tolerance 0.001 CRITICAL:4.712400000000001 deviates by 0.2875999999999994 from integral, exceeding error tolerance 0.001 CRITICAL:Giving up. Traceback (most recent call last): File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/pdb2pqr/main.py", line 792, in main_driver results = non_trivial( File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/pdb2pqr/main.py", line 705, in non_trivial raise ValueError(charge_err) ValueError: 4.712400000000001 deviates by 0.2875999999999994 from integral, exceeding error tolerance 0.001

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

Traceback (most recent call last): File "/home/AB/conda3/envs/ab/bin/pdb2pqr", line 33, in sys.exit(load_entry_point('pdb2pqr==3.6.1', 'console_scripts', 'pdb2pqr')()) File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/pdb2pqr/main.py", line 829, in main if main_driver(args) == 1: File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/pdb2pqr/main.py", line 802, in main_driver raise RuntimeError from err RuntimeError ' Traceback (most recent call last): File "/home/AB/conda3/envs/ab/bin/pep_patch_electrostatic", line 33, in sys.exit(load_entry_point('Surface-analyses==0.1', 'console_scripts', 'pep_patch_electrostatic')()) File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/surface_analyses/commandline_electrostatic.py", line 159, in main griddata = get_apbs_potential_from_mdtraj(traj, args.apbs_dir, args.pH, ion_species) File "/home/AB/conda3/envs/ab/lib/python3.10/site-packages/surface_analyses/commandline_electrostatic.py", line 311, in get_apbs_potential_from_mdtraj raise RuntimeError("pdb2pqr failed") RuntimeError: pdb2pqr failed

// The error message indicates that pdb2pqr failed due to a non-integer charge deviation exceeding the error tolerance. You may need to review the input PDB file and the residues causing the non-integer charges. Additionally, adjusting the error tolerance or checking for any issues in the input file could help resolve the problem.

if i use pdb2pqr directly by: can work and output 2 files : output_pqr & output_pqr.log

pdb2pqr apbs-input.pdb output_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: apbs-input.pdb INFO:Setting up molecule. WARNING:Unable to find amino or nucleic acid definition for NME. Parsing as new residue. WARNING:Unable to find amino or nucleic acid definition for NME. Parsing as new residue. INFO:Created biomolecule object with 229 residues and 3449 atoms. INFO:Setting termini states for biomolecule chains. INFO:Loading forcefield. INFO:Loading hydrogen topology definitions. INFO:This biomolecule is clean. No repair needed. 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:Regenerating headers. INFO:Regenerating PDB lines. WARNING:Ignoring 1164 header lines in output. WARNING:Ignoring 12 missing lines in output.

fwaibl commented 9 months ago

That seems like a problem with the PDB that is written out from mdtraj. Do you have non-standard amino acids in the PDB file? If that is possible, you could send us the PDB file and we could try to have a look at it.

We recently changed the way in which we treat the input. Could you try using the 0.2.0 version? In that case, you would only have to use the PDB file once, and it should get used as it is. If that solves the problem, we might have to think about reverting that change, or find another way to preserve the residue/atom naming.

vhoer commented 9 months ago

The problem is most likely, that your PDB contains a NME capping residue which is appearently not supported by pdb2pqr - maybe remove it for the analysis?

kehan777 commented 9 months ago

yes https://github.com/liedllab/surface_analyses/blob/main/test/trastuzumab/apbs-input.pdb, PDB contains a NME capping, remove it for the analysis is ok ,thank you~