From 9dfd87a0ebfd4e9e1a12149e9d8e7a621a446fc9 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Tue, 10 Nov 2020 19:05:19 +0100 Subject: [PATCH] Fix handling of multi-model PDB without MODEL 1 Fixes https://github.com/jensengroup/propka/issues/95 --- propka/molecular_container.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/propka/molecular_container.py b/propka/molecular_container.py index 5b7e99b..45473b2 100644 --- a/propka/molecular_container.py +++ b/propka/molecular_container.py @@ -48,10 +48,10 @@ def __init__(self, parameters, options=None): def top_up_conformations(self): """Makes sure that all atoms are present in all conformations.""" - for name in self.conformation_names: - if (name != '1A' and (len(self.conformations[name]) - < len(self.conformations['1A']))): - self.conformations[name].top_up(self.conformations['1A']) + first = self.conformations[self.conformation_names[0]] + for name in self.conformation_names[1:]: + if len(self.conformations[name]) < len(first): + self.conformations[name].top_up(first) def find_covalently_coupled_groups(self): """Find covalently coupled groups."""