From 872fd1fad14d26e5649bab6f66ddf5d36b5641d0 Mon Sep 17 00:00:00 2001 From: Valerij Talagayev <82884038+talagayev@users.noreply.github.com> Date: Tue, 6 Aug 2024 23:17:10 +0200 Subject: [PATCH] Update base.py --- package/MDAnalysis/topology/base.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package/MDAnalysis/topology/base.py b/package/MDAnalysis/topology/base.py index 77ee38fb866..435f80fe9e5 100644 --- a/package/MDAnalysis/topology/base.py +++ b/package/MDAnalysis/topology/base.py @@ -115,12 +115,20 @@ class TopologyReaderBase(IOBase, metaclass=_Topologymeta): Added keyword 'universe' to pass to Atom creation. """ def __init__(self, filename): - + + unwanted_substrings = { + "MMTF": None, + "Parmed": None, + "OpenMM": None, + "Parser": None, + "parmed": None, + "openmm": None, + } if isinstance(filename, util.NamedStream): self.filename = filename else: self.filename = str(filename) - if "Parser" in self.filename: + if any(substring in self.filename for substring in unwanted_substrings): self.filename = filename def parse(self, **kwargs): # pragma: no cover