Skip to content
Snippets Groups Projects
Commit 92e56783 authored by marco's avatar marco
Browse files

detect .pdb.gz and .ent.gz files as being of type PDB.

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1892 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent d3ce59a9
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,12 @@ def _load_files(): ...@@ -69,8 +69,12 @@ def _load_files():
graphical_objects=[] graphical_objects=[]
try: try:
for f in input_files: for f in input_files:
e=os.path.splitext(f[0])[1] is_pdb_file=False
if e in ['.pdb', '.ent', '.ent.gz', '.pdb.gz']: for ext in ['.pdb', '.ent', '.ent.gz', '.pdb.gz']:
if f[0].endswith(ext):
is_pdb_file=True
break
if is_pdb_file:
es=io.LoadPDB(f[0], load_multi=True) es=io.LoadPDB(f[0], load_multi=True)
for i, e in enumerate(es): for i, e in enumerate(es):
index+=1 index+=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment