volkamerlab / opencadd

A Python library for structural cheminformatics
https://opencadd.readthedocs.io
MIT License
89 stars 18 forks source link

NGLview: Read PDB text via TextStructure #76

Closed dominiquesydow closed 3 years ago

dominiquesydow commented 3 years ago

Description

Update nglview API usage when adding a component from a PDB block string.

Instead of

view = nglview.NGLWidget()
view.add_component(pdb_text, ext="pdb")

use

view = nglview.NGLWidget()
component = nglview.TextStructure(pdb_text, ext="pdb")
view.add_component(component)

Todos

Notable points that this PR has either accomplished or will accomplish.

Questions

None

Status

codecov-commenter commented 3 years ago

Codecov Report

Merging #76 (0d7e3fe) into master (8a03435) will decrease coverage by 0.03%. The diff coverage is 66.66%.