From f40e3b9630b2c71ce044e56ba45f0c85732bdf38 Mon Sep 17 00:00:00 2001 From: bieniekmat Date: Sun, 20 Aug 2023 17:57:05 +0100 Subject: [PATCH] Use directly the PDB reader. For some reason parmed 4.1.0 does not recognise the file format with .pdb extension. --- ties/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ties/config.py b/ties/config.py index 1d8573d..1a892fd 100644 --- a/ties/config.py +++ b/ties/config.py @@ -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