nglviewer / ngl

WebGL protein viewer
http://nglviewer.org/ngl/
MIT License
657 stars 168 forks source link

Improve handling of Alphafold mmcif #991

Open ppillot opened 1 year ago

ppillot commented 1 year ago

PR #990 fixes the issue of not being able to load cif files coming from alphafold. By improving the parser for cif files to specifically handle information from alphafold, we could do the following:

pLDDT loop

loop_
_ma_qa_metric_local.label_asym_id
_ma_qa_metric_local.label_comp_id
_ma_qa_metric_local.label_seq_id
_ma_qa_metric_local.metric_id
_ma_qa_metric_local.metric_value
_ma_qa_metric_local.model_id
_ma_qa_metric_local.ordinal_id
A MET 1   2 39.15 1 1   
A GLU 2   2 37.73 1 2   
A PRO 3   2 46.58 1 3   
A ALA 4   2 38.07 1 4   
A VAL 5   2 43.19 1 5   
A GLY 6   2 41.76 1 6   
A GLY 7   2 41.86 1 7   
...

secondary structure prediction loop

loop_
_struct_conf.beg_auth_asym_id
_struct_conf.beg_auth_comp_id
_struct_conf.beg_auth_seq_id
_struct_conf.beg_label_asym_id
_struct_conf.beg_label_comp_id
_struct_conf.beg_label_seq_id
_struct_conf.conf_type_id
_struct_conf.end_auth_asym_id
_struct_conf.end_auth_comp_id
_struct_conf.end_auth_seq_id
_struct_conf.end_label_asym_id
_struct_conf.end_label_comp_id
_struct_conf.end_label_seq_id
_struct_conf.id
_struct_conf.pdbx_beg_PDB_ins_code
_struct_conf.pdbx_end_PDB_ins_code
A GLY 6   A GLY 6   HELX_LH_PP_P A LEU 11  A LEU 11  HELX_LH_PP_P1  ? ? 
A GLN 17  A GLN 17  HELX_LH_PP_P A PRO 33  A PRO 33  HELX_LH_PP_P2  ? ? 
A LYS 47  A LYS 47  BEND         A GLU 50  A GLU 50  BEND1          ? ? 
A PHE 51  A PHE 51  TURN_TY1_P   A GLN 55  A GLN 55  TURN_TY1_P1    ? ? 
A ARG 56  A ARG 56  BEND         A LYS 57  A LYS 57  BEND2          ? ? 
A ASP 58  A ASP 58  TURN_TY1_P   A SER 59  A SER 59  TURN_TY1_P2    ? ? 
A GLU 60  A GLU 60  BEND         A GLY 61  A GLY 61  BEND3          ? ?