# Sensible default for covalent radius

**URL:** https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648
**Category:** Support
**Created:** [February 18, 2020, 12:31pm UTC](https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648 "2020-02-18T12:31:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jellby](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jellby/32/135_2.png) [@Jellby](https://discourse.vtk.org/u/Jellby)
#### Post date: [February 18, 2020, 12:31pm UTC](https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648/1 "2020-02-18T12:31:49Z")

</div>

I’m using vtkMolecule and vtkSimpleBondPerceiver to display reasonable structures for molecules. But there is a problem when a particular atom does not have a covalent radius specified in the default database: the radius becomes something like 1e38 and the atom appears bonded to every hydrogen in the system. See the following image, where the central atom is Dy (Z=66):

 ![a](https://discourse.vtk.org/uploads/default/original/2X/c/c366d1b915bb325e54a4109518c504a35f17be34.png)

So, first thing, I think the database should be updated (see e.g. [https://periodictable.com/Properties/A/CovalentRadius.v.log.html](https://periodictable.com/Properties/A/CovalentRadius.v.log.html)), and even when there is no data, at least some reasonable value should be used as default (e.g. ~200 pm).

Secondly, how can I specify custom radii for a molecule? I could subclass vtkPeriodicTable, but how can I force vtkSimpleBondPerceiver to use the subclass?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicolas.vuaille/32/5363_2.png) [@nicolas.vuaille](https://discourse.vtk.org/u/nicolas.vuaille)
#### Post date: [February 20, 2020, 4:00pm UTC](https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648/2 "2020-02-20T16:00:12Z")

</div>

> [@Jellby](#):
>
> how can I specify custom radii for a molecule?

Not sure which radii you are talking about. Atoms Covalent Radii ?  
I fear it is not possible without modifications in VTK itself.

---

<div class="post-metadata">

### Author: ![Jellby](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jellby/32/135_2.png) [@Jellby](https://discourse.vtk.org/u/Jellby)
#### Post date: [February 20, 2020, 4:10pm UTC](https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648/3 "2020-02-20T16:10:25Z")

</div>

Yes, covalent radii according to the vtkSimpleBondPerceiver description. I’ve created a VTK issue: [https://gitlab.kitware.com/vtk/vtk/issues/17791](https://gitlab.kitware.com/vtk/vtk/issues/17791), but you already know, I guess 😉

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicolas.vuaille/32/5363_2.png) [@nicolas.vuaille](https://discourse.vtk.org/u/nicolas.vuaille)
#### Post date: [February 21, 2020, 10:58am UTC](https://discourse.vtk.org/t/sensible-default-for-covalent-radius/2648/4 "2020-02-21T10:58:44Z")

</div>

Yup.  
This merge request ([https://gitlab.kitware.com/vtk/vtk/merge\_requests/6494](https://gitlab.kitware.com/vtk/vtk/merge_requests/6494)) updates the database, and should fix your extra-bonds problem (as there is no more undefined values).

Specifying a custom radii should not be very difficult, it can be a good first contrib to VTK for anyone 😉  
(I don’t really have time to do it for now)
