Skip to content

Commit

Permalink
Use directly the PDB reader. For some reason parmed 4.1.0 does not re…
Browse files Browse the repository at this point in the history
…cognise the file format with .pdb extension.
  • Loading branch information
bieniekmateusz committed Aug 20, 2023
1 parent d8c490d commit f40e3b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ties/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,12 @@ def protein(self, path):
print('No protein was select. Skipping protein dG.')
return

if pathlib.Path(path).suffix.lower() != ".pdb":
raise ValueError("The protein file passed is not a PDB")

# can be loaded by parmed?
print(f'Trying to open the protein file {path} with ParmEd..')
parmed.load_file(str(path), structure=True)
parmed.read_pdb(str(path))
self._protein = pathlib.Path(path)

@property
Expand Down

0 comments on commit f40e3b9

Please sign in to comment.