Skip to content

gamdrunner will not read pdb files generated in maestro #30

@blakemertz

Description

@blakemertz

Cross-posting this from the sourceforge mailing list, as this may be specific to the implementation in openMM. I am using a PDB file exported from Maestro after using the Protein Preparation Wizard to fill in missing residues. However, when I go to reference it in my xml script, parmed crashes:

gamdRunner -d 0 xml lower-dual1.xml 
Warning: importing 'simtk.openmm' is deprecated.  Import 'openmm' instead.
Traceback (most recent call last):
  File "/usr/local/bin/gamdRunner", line 83, in <module>
    main()
  File "/usr/local/bin/gamdRunner", line 74, in main
    gamdSim = gamdSimulationFactory.createGamdSimulation(
  File "/media/bak11/binaries/git/gamd-openmm/gamd/gamdSimulation.py", line 166, in createGamdSimulation
    positions, box_vectors = load_pdb_positions_and_box_vectors(
  File "/media/bak11/binaries/git/gamd-openmm/gamd/gamdSimulation.py", line 29, in load_pdb_positions_and_box_vectors
    pdb_parmed = parmed.load_file(pdb_coords_filename)
  File "/media/bak11/binaries/miniconda3/envs/openmm/lib/python3.9/site-packages/parmed/formats/registry.py", line 182, in load_file
    raise FormatNotFound('Could not identify file format')
parmed.exceptions.FormatNotFound: Could not identify file format

It appears the issue is that Maestro is generating lines in the header that are incompatible with the pdb file format, and that in combination with the load_file call is causing the error. If I change the parmed call to read_PDB, then the file is read in correctly because parmed ignores all lines except for ATOM/HETATM coordinates. This is mentioned in the parmed issues page: and makes sense when I run it on my pdb in parmed:

python
Python 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:39:03) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import parmed as pmd
Warning: importing 'simtk.openmm' is deprecated.  Import 'openmm' instead.
>>> pmd.load_file('wdr5-8ujy-maestro.pdb')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/media/bak11/binaries/miniconda3/envs/openmm/lib/python3.9/site-packages/parmed/formats/registry.py", line 182, in load_file
    raise FormatNotFound('Could not identify file format')
parmed.exceptions.FormatNotFound: Could not identify file format
>>> pmd.read_PDB('wdr5-8ujy-maestro.pdb')
<Structure 4961 atoms; 338 residues; 5000 bonds; PBC (triclinic); NOT parametrized>

Is there a way to specify this call to parmed in the xml file that is being read in by gamdrunner? Or do I need to modify the source code or find another way to reformat this pdb file before being read by gamdrunner (openbabel, for instance)? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions