From 282b8d103b5a6292b56de02ead280285aa63964e Mon Sep 17 00:00:00 2001 From: Jenny Fothergill Date: Tue, 28 Sep 2021 10:33:50 -0600 Subject: [PATCH] Use untyped system to remove H - foyer.Forcefield.apply does not carry over the set atomic_number info from the pmd_structure. mosdef-hub/foyer/issues/466 This workaround will fix it. --- planckton/init.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/planckton/init.py b/planckton/init.py index 1129f99..19e27c4 100644 --- a/planckton/init.py +++ b/planckton/init.py @@ -181,9 +181,7 @@ def pack(self, box_expand_factor=5): pmd_system = system.to_parmed(residues=[self.residues]) typed_system = self.ff.apply(pmd_system, **self.foyer_kwargs) if self.remove_hydrogen_atoms: - typed_system.strip( - [a.atomic_number == 1 for a in typed_system.atoms] - ) + typed_system.strip([a.atomic_number == 1 for a in pmd_system.atoms]) return typed_system def _calculate_L(self):