Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDB2PQR Unable to load parameter file for forcefield #6

Closed
kozlac opened this issue Jun 12, 2020 · 4 comments · Fixed by #372
Closed

PDB2PQR Unable to load parameter file for forcefield #6

kozlac opened this issue Jun 12, 2020 · 4 comments · Fixed by #372

Comments

@kozlac
Copy link
Contributor

kozlac commented Jun 12, 2020

PDB2PQR fails to find the dat folder when running from outside the source folder with error:
$ raise RuntimeError("Unable to load parameter file for forcefield %s" % args.ff)
$ RuntimeError: Unable to load parameter file for forcefield charmm

kozlac referenced this issue in Electrostatics/apbs-pdb2pqr Jun 12, 2020
@sobolevnrm
Copy link
Member

Can you post the command you used to generate the error above? I'm trying to reproduce the problem.

@intendo
Copy link
Collaborator

intendo commented Jun 12, 2020

pip install -e ~/git/propka-3.1

python pdb2pqr/pdb2pqr.py --ff=PARSE --with-ph=7.0 --titration-state-method=propka ./pdb2pqr/examples/1a1p/1a1p.pdb ./pdb2pqr/examples/1a1p/1a1p.pqr
DEBUG:PDB2PQR3.0:Invoked with arguments: Namespace(alignment=None, apbs_input=None, assign_only=False, chains=None, clean=False, debump=True, display_coupled_residues=False, drop_water=False, ff='PARSE', ffout=None, filenames=[], generate_propka_input=False, grid=(0.0, 14.0, 0.1), include_header=False, input_path='./pdb2pqr/examples/1a1p/1a1p.pdb', keep_chain=False, keep_protons=False, ligand=None, log_level='INFO', mutations=None, mutator=None, mutator_options=None, neutralc=False, neutraln=False, opt=True, output_pqr='./pdb2pqr/examples/1a1p/1a1p.pqr', pH=7.0, pairene=1.0, parameters='/Users/d3c572/git/propka-3.1/propka/propka.cfg', pdb2pka_out='pdb2pka_output', pdb2pka_resume=False, pdie=8.0, ph=7.0, pka_method='propka', protonate_all=False, reference='neutral', reuse_ligand_mol2_file=False, sdie=80.0, thermophiles=None, titrate_only=None, userff=None, usernames=None, version_label='Jan15', whitespace=False, window=(0.0, 14.0, 1.0))
DEBUG:PDB2PQR3.0:Args:  Namespace(alignment=None, apbs_input=None, assign_only=False, chains=None, clean=False, debump=True, display_coupled_residues=False, drop_water=False, ff='PARSE', ffout=None, filenames=[], generate_propka_input=False, grid=(0.0, 14.0, 0.1), include_header=False, input_path='./pdb2pqr/examples/1a1p/1a1p.pdb', keep_chain=False, keep_protons=False, ligand=None, log_level='INFO', mutations=None, mutator=None, mutator_options=None, neutralc=False, neutraln=False, opt=True, output_pqr='./pdb2pqr/examples/1a1p/1a1p.pqr', pH=7.0, pairene=1.0, parameters='/Users/d3c572/git/propka-3.1/propka/propka.cfg', pdb2pka_out='pdb2pka_output', pdb2pka_resume=False, pdie=8.0, ph=7.0, pka_method='propka', protonate_all=False, reference='neutral', reuse_ligand_mol2_file=False, sdie=80.0, thermophiles=None, titrate_only=None, userff=None, usernames=None, version_label='Jan15', whitespace=False, window=(0.0, 14.0, 1.0))
INFO:PDB2PQR3.0:PDB2PQR v3.0 - biomolecular structure conversion software
INFO:PDB2PQR3.0:Please cite:  Jurrus E, et al.  Improvements to the APBS biomolecular solvation software suite.  Protein Sci 27 112-128 (2018).
INFO:PDB2PQR3.0: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:PDB2PQR3.0:Checking and transforming input arguments.
WARNING:pdb2pqr.input_output:Unable to find DAT file for PARSE
Traceback (most recent call last):
  File "pdb2pqr/pdb2pqr.py", line 23, in <module>
    main(args)
  File "/Users/d3c572/git/apbs-pdb2pqr/pdb2pqr/pdb2pqr/main.py", line 507, in main
    check_files(args)
  File "/Users/d3c572/git/apbs-pdb2pqr/pdb2pqr/pdb2pqr/main.py", line 162, in check_files
    raise RuntimeError("Unable to load parameter file for forcefield %s" % args.ff)
RuntimeError: Unable to load parameter file for forcefield parse

The problem is that the args.ff is a keyword (e.g. PARSE) and the code needs to find the file named PARSE.DAT and it looks in your path. One fix is to search for the file relative to the location of the python file looking for it.

@sobolevnrm
Copy link
Member

Got it. Is PR Electrostatics/apbs-pdb2pqr#605 the right way to fix this? I wonder if it would be better to create some type of path-like variable higher up in the code that could be modified via config files and argparse to include additional paths.

In particular, I'm curious why this problem happens when running from the source distro and not after the code is built/installed. What is different about those two scenarios? Can the code be fixed a different way without making assumptions about the location of the DAT file relative to the source file?

@sobolevnrm sobolevnrm transferred this issue from Electrostatics/apbs-pdb2pqr Jun 30, 2020
@sobolevnrm
Copy link
Member

This issue was resolved a while ago (can't find specific commit number...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants