From 6340aa67511a5998051af068fb01eb9b655bc3a2 Mon Sep 17 00:00:00 2001 From: peastman Date: Mon, 4 Nov 2024 07:52:59 -0800 Subject: [PATCH] removeHeterogens() returns the Residues that were removed --- pdbfixer/pdbfixer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdbfixer/pdbfixer.py b/pdbfixer/pdbfixer.py index 5b8046d..fc204aa 100644 --- a/pdbfixer/pdbfixer.py +++ b/pdbfixer/pdbfixer.py @@ -1332,6 +1332,10 @@ def removeHeterogens(self, keepWater=True): keepWater : bool, optional, default=True If True, water molecules will not be removed. + Returns + ------- + a list of Residue objects that were removed + Examples -------- @@ -1355,6 +1359,7 @@ def removeHeterogens(self, keepWater=True): modeller.delete(toDelete) self.topology = modeller.topology self.positions = modeller.positions + return toDelete def addMissingHydrogens(self, pH=7.0, forcefield=None): """Add missing hydrogen atoms to the structure.