Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
talagayev authored Aug 6, 2024
1 parent 98ee9e0 commit 872fd1f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions package/MDAnalysis/topology/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 872fd1f

Please sign in to comment.