Skip to content

Commit 151554b

Browse files
committed
Modeller license fix
1 parent f471602 commit 151554b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

prepmd/align_together.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
#from Bio.PDB import StructureAlignment
1616
import Bio.PDB
1717
from Bio.PDB.mmcifio import MMCIFIO
18-
import modeller
18+
try:
19+
import modeller
20+
modeller_found = True
21+
except ImportError:
22+
modeller_found = False
23+
pass
1924
from prepmd import get_residues, model
2025
import argparse
2126
# from Bio import Align
@@ -46,6 +51,8 @@ def align_modeller(s1, s2, code1="AAAA", code2="BBBB", outfile="alignment.out"):
4651
file.write("".join(pdb1_res))
4752
with open(code2+".seq", "w") as file:
4853
file.write("".join(pdb2_res))
54+
if not modeller_found:
55+
raise ImportError("Problem with MODELLER license key or installation")
4956
env = modeller.environ()
5057
print("Aligning sequences...")
5158
aln = modeller.Alignment(env)

0 commit comments

Comments
 (0)