# Feedback Wanted - Template / Coordination Tool

**URL:** <https://discuss.avogadro.cc/t/feedback-wanted-template-coordination-tool/3814>\
**Category:** Development\
**Created:** [May 22, 2022, 9:05pm UTC](https://discuss.avogadro.cc/t/feedback-wanted-template-coordination-tool/3814 "2022-05-22T21:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [May 22, 2022, 9:05pm UTC](https://discuss.avogadro.cc/t/feedback-wanted-template-coordination-tool/3814/1 "2022-05-22T21:05:13Z")

</div>

Many people have asked about a “click to add fragment” tool. I asked for some feedback about [fragment images](https://discuss.avogadro.cc/t/fragment-images/3639) before.

Here’s where I’d like some feedback on the UI / experience.

You want to create a metal complex .. maybe a hexa-aqua copper complex or a ferrocene.

So you switch to the template tool and you can pick the element and the coordination geometry:

 ![Screen Shot 2022-05-22 at 4.52.27 PM](https://discuss.avogadro.cc/uploads/default/original/2X/d/de7784449ebd1173c7b5d2a744e7f0ae430b2ee4.png)

Then you’d pick ligands (and the preview would update) and then click on the hydrogen atoms to replace the H with water or other ligands.

Sounds great.

How should the code “know” that you’ve switched from “insert metal with geometry” to “click on H atom to insert ligand?”

## Choice 1: “Metal Center” in ligand menu

For example, the “Ligand” menu should include a default top item of “Metal Center Only” or some text like that. In that case, you could:

- click on empty space to insert your octahedral iron (or whatever you selected)
- click on a H atom to attach an octahedral iron in place of the H atom (e.g., for building metal-metal complexes)

Then if you want to insert ligands / fragments, you’d pick something from the “Ligand” menu:

- Monodentate (water, CO, SH, PH3, pyridine, etc.)
- Bidentate (bipyridine, etc.)
- Tridentate (etc.)

In this case, the code would have to wait until you’ve clicked 2 or 3 atoms to insert bidentate or tridentate ligands.

## Choice 2: Click on 1 or more H atoms to activate the ligand menu

This possibility makes it easier to insert bidentate ligands .. those choices would become enabled once you click on some H atoms.

On the other hand, it’s much less “discoverable”..

Thoughts? Suggestions? Ideas?

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [May 22, 2022, 9:06pm UTC](https://discuss.avogadro.cc/t/feedback-wanted-template-coordination-tool/3814/2 "2022-05-22T21:06:19Z")

</div>

Code for the tool, will go up in this pull request:

> <https://github.com/OpenChemistry/avogadrolibs/pull/900>
>
> Allows you to insert metal / elements with specified geometries.
> 
> Still needed…:
> \- \[\] Click to attach ligands
> \- \[\] Handling multi dentate ligands
> \- \[\] Probably more things that I forgot
> 
> Developer Certificate of Origin
> Version 1.1
> 
> Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
> 1 Letterman Drive
> Suite D4700
> San Francisco, CA, 94129
> 
> Everyone is permitted to copy and distribute verbatim copies of this
> license document, but changing it is not allowed.
> 
> 
> Developer's Certificate of Origin 1.1
> 
> By making a contribution to this project, I certify that:
> 
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license
> indicated in the file; or
> 
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source
> license and I have the right under that license to submit that
> work with modifications, whether created in whole or in part
> by me, under the same open source license (unless I am
> permitted to submit under a different license), as indicated
> in the file; or
> 
> (c) The contribution was provided directly to me by some other
> person who certified (a), (b) or (c) and I have not modified
> it.
> 
> (d) I understand and agree that this project and the contribution
> are public and that a record of the contribution (including all
> personal information I submit with it, including my sign-off) is
> maintained indefinitely and may be redistributed consistent with
> this project or the open source license(s) involved.
