aksell commited on
Commit
79ff34a
·
1 Parent(s): 1c423ed

Show EC class if using ZymCTRL and EC class is available in PDB

Browse files
Files changed (1) hide show
  1. hexviz/app.py +8 -1
hexviz/app.py CHANGED
@@ -34,8 +34,15 @@ with right:
34
  head = head_one - 1
35
 
36
 
37
- with st.expander("Configue parameters", expanded=False):
38
  min_attn = st.slider("Minimum attention", min_value=0.0, max_value=0.4, value=0.1)
 
 
 
 
 
 
 
39
 
40
  attention_pairs = get_attention_pairs(pdb_id, layer, head, min_attn, model_type=selected_model.name)
41
 
 
34
  head = head_one - 1
35
 
36
 
37
+ with st.expander("Configure parameters", expanded=False):
38
  min_attn = st.slider("Minimum attention", min_value=0.0, max_value=0.4, value=0.1)
39
+ try:
40
+ structure = get_structure(pdb_id)
41
+ ec_class = structure.header["compound"]["1"]["ec"]
42
+ except KeyError:
43
+ ec_class = None
44
+ if ec_class and selected_model.name == ModelType.ZymCTRL:
45
+ ec_class = st.text_input("Enzyme classification number fetched from PDB", ec_class)
46
 
47
  attention_pairs = get_attention_pairs(pdb_id, layer, head, min_attn, model_type=selected_model.name)
48