vincefn / pyobjcryst

Python bindings to ObjCryst++ Object-Oriented Crystallographic Library
Other
0 stars 0 forks source link

3D Crystal view: better control on bonds #2

Closed vincefn closed 3 years ago

vincefn commented 3 years ago

The bonds displayed in the 3D crystal view do not correspond to those defined in objcryst - they are automatically added by 3dmol.js based on atomic distances and element radii, with quite strict limits.

It may be necessary to switch to a different intermediate format than CIF to show the bonds which are defined in objcryst, because 3dmol.js can't extract the bonds from a CIF.

Maybe use a CIF model to define the unit cell, and use a different model to define the atoms and mods. See https://github.com/3dmol/3Dmol.js/blob/master/3Dmol/parsers.js