forked from mjohn218/ionerdss
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest_overlap_safety.py
More file actions
35 lines (32 loc) · 1017 Bytes
/
test_overlap_safety.py
File metadata and controls
35 lines (32 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import ionerdss as ion
from ionerdss import build_system_from_pdb
pdb_id = "7pg9"
print("--- Test 1: Triggering warning ---")
try:
system = build_system_from_pdb(
source=pdb_id,
workspace_path=f"test_overlap_dir",
interface_detect_distance_cutoff=0.6,
interface_detect_n_residue_cutoff=3,
chain_grouping_seq_threshold=0.5,
nerdss_overlap_sep_limit=3.0, # This should be too large
ode_enabled=False
)
except Exception as e:
import traceback
traceback.print_exc()
print("\n--- Test 2: Bypassing safety check ---")
try:
system2 = build_system_from_pdb(
source=pdb_id,
workspace_path=f"test_overlap_dir2",
interface_detect_distance_cutoff=0.6,
interface_detect_n_residue_cutoff=3,
chain_grouping_seq_threshold=0.5,
nerdss_overlap_sep_limit=3.0,
disable_overlap_sep_limit_check=True,
ode_enabled=False
)
except Exception as e:
import traceback
traceback.print_exc()