Closed panda-byte closed 1 year ago
Resolves #980. AlphaFold-DB structures in .cif format seem to miss pdbx_PDB_helix_class values, which causes an error. The introduced check prevents this issue. Example: https://alphafold.ebi.ac.uk/files/AF-Q5VSL9-F1-model_v4.cif
pdbx_PDB_helix_class
How to reproduce:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="build/js/ngl.dev.js"></script> </head> <body> <div id="viewport" style="width:400px; height:400px; "></div> <script> new NGL.Stage("viewport", {backgroundColor: 'grey'}).loadFile( 'https://alphafold.ebi.ac.uk/files/AF-Q5VSL9-F1-model_v4.cif' ).then(structure => { structure.addRepresentation("cartoon"); structure.autoView(); } ).catch(alert); </script> </body> </html>
Before the change, this code snippet should throw an error, because sc.pdbx_PDB_helix_class is undefined. After the proposed change, the error is resolved.
sc.pdbx_PDB_helix_class
Do I need to update the dist directory as well?
dist
No. This will be generated when we are releasing a new version with the update. Thank-you for your contribution!
Resolves #980. AlphaFold-DB structures in .cif format seem to miss
pdbx_PDB_helix_class
values, which causes an error. The introduced check prevents this issue. Example: https://alphafold.ebi.ac.uk/files/AF-Q5VSL9-F1-model_v4.cifHow to reproduce:
Before the change, this code snippet should throw an error, because
sc.pdbx_PDB_helix_class
is undefined. After the proposed change, the error is resolved.